diff --git a/Makefile b/Makefile index 5a5ccbf2..75625549 100644 --- a/Makefile +++ b/Makefile @@ -88,7 +88,7 @@ distclean: clean ### Protobuf ### ############################################################################### -protoVer=0.11.6 +protoVer=0.14.0 protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) diff --git a/api/tibc/apps/mt_transfer/v1/query_grpc.pb.go b/api/tibc/apps/mt_transfer/v1/query_grpc.pb.go index a3774a97..d26f98de 100644 --- a/api/tibc/apps/mt_transfer/v1/query_grpc.pb.go +++ b/api/tibc/apps/mt_transfer/v1/query_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: tibc/apps/mt_transfer/v1/query.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Query_ClassTrace_FullMethodName = "/tibc.apps.mt_transfer.v1.Query/ClassTrace" @@ -26,6 +26,8 @@ const ( // QueryClient is the client API for Query service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Query provides defines the gRPC querier service. type QueryClient interface { // ClassTrace queries a class trace information. ClassTrace(ctx context.Context, in *QueryClassTraceRequest, opts ...grpc.CallOption) (*QueryClassTraceResponse, error) @@ -42,8 +44,9 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { } func (c *queryClient) ClassTrace(ctx context.Context, in *QueryClassTraceRequest, opts ...grpc.CallOption) (*QueryClassTraceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryClassTraceResponse) - err := c.cc.Invoke(ctx, Query_ClassTrace_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Query_ClassTrace_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -51,8 +54,9 @@ func (c *queryClient) ClassTrace(ctx context.Context, in *QueryClassTraceRequest } func (c *queryClient) ClassTraces(ctx context.Context, in *QueryClassTracesRequest, opts ...grpc.CallOption) (*QueryClassTracesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryClassTracesResponse) - err := c.cc.Invoke(ctx, Query_ClassTraces_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Query_ClassTraces_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -61,7 +65,9 @@ func (c *queryClient) ClassTraces(ctx context.Context, in *QueryClassTracesReque // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer -// for forward compatibility +// for forward compatibility. +// +// Query provides defines the gRPC querier service. type QueryServer interface { // ClassTrace queries a class trace information. ClassTrace(context.Context, *QueryClassTraceRequest) (*QueryClassTraceResponse, error) @@ -70,9 +76,12 @@ type QueryServer interface { mustEmbedUnimplementedQueryServer() } -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} +// UnimplementedQueryServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedQueryServer struct{} func (UnimplementedQueryServer) ClassTrace(context.Context, *QueryClassTraceRequest) (*QueryClassTraceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClassTrace not implemented") @@ -81,6 +90,7 @@ func (UnimplementedQueryServer) ClassTraces(context.Context, *QueryClassTracesRe return nil, status.Errorf(codes.Unimplemented, "method ClassTraces not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} +func (UnimplementedQueryServer) testEmbeddedByValue() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to QueryServer will @@ -90,6 +100,13 @@ type UnsafeQueryServer interface { } func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + // If the following call pancis, it indicates UnimplementedQueryServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Query_ServiceDesc, srv) } diff --git a/api/tibc/apps/mt_transfer/v1/tx.pulsar.go b/api/tibc/apps/mt_transfer/v1/tx.pulsar.go index d399c811..c7c7dc3f 100644 --- a/api/tibc/apps/mt_transfer/v1/tx.pulsar.go +++ b/api/tibc/apps/mt_transfer/v1/tx.pulsar.go @@ -2,6 +2,7 @@ package mt_transferv1 import ( + _ "cosmossdk.io/api/cosmos/msg/v1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" @@ -1234,6 +1235,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// MsgMtTransfer defines the Msg/MtTransfer request type. type MsgMtTransfer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1368,46 +1370,49 @@ var file_tibc_apps_mt_transfer_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x2e, 0x6d, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xf2, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x4d, 0x74, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, - 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, - 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x6c, 0x61, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x61, 0x6c, 0x61, 0x79, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, - 0x63, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x08, - 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x4d, - 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x32, 0x6d, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x66, 0x0a, 0x0a, 0x4d, 0x74, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x61, 0x70, - 0x70, 0x73, 0x2e, 0x6d, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x1a, - 0x2f, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x2e, 0x6d, 0x74, 0x5f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x74, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0xef, 0x01, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x61, 0x70, - 0x70, 0x73, 0x2e, 0x6d, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2e, 0x76, - 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x47, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x69, 0x61, 0x6e, 0x6a, 0x69, 0x65, - 0x61, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, - 0x69, 0x62, 0x63, 0x2f, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x6d, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x41, 0x4d, 0xaa, 0x02, 0x17, 0x54, 0x69, - 0x62, 0x63, 0x2e, 0x41, 0x70, 0x70, 0x73, 0x2e, 0x4d, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x17, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x41, 0x70, 0x70, - 0x73, 0x5c, 0x4d, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x23, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x41, 0x70, 0x70, 0x73, 0x5c, 0x4d, 0x74, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1a, 0x54, 0x69, 0x62, 0x63, 0x3a, 0x3a, 0x41, 0x70, - 0x70, 0x73, 0x3a, 0x3a, 0x4d, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, + 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfd, 0x01, 0x0a, + 0x0d, 0x4d, 0x73, 0x67, 0x4d, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, + 0x6c, 0x61, 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x74, + 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, + 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x6c, 0x61, + 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, + 0x65, 0x61, 0x6c, 0x61, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, + 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, + 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x17, 0x0a, 0x15, + 0x4d, 0x73, 0x67, 0x4d, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x74, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x66, 0x0a, 0x0a, + 0x4d, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x74, 0x69, 0x62, + 0x63, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x2e, 0x6d, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x1a, 0x2f, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x2e, + 0x6d, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x4d, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xef, 0x01, 0x0a, 0x1c, + 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x2e, 0x6d, 0x74, + 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x69, 0x61, 0x6e, 0x6a, 0x69, 0x65, 0x61, 0x69, 0x2f, 0x74, 0x69, + 0x62, 0x63, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x61, + 0x70, 0x70, 0x73, 0x2f, 0x6d, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2f, + 0x76, 0x31, 0x3b, 0x6d, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x54, 0x41, 0x4d, 0xaa, 0x02, 0x17, 0x54, 0x69, 0x62, 0x63, 0x2e, 0x41, 0x70, + 0x70, 0x73, 0x2e, 0x4d, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x17, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x41, 0x70, 0x70, 0x73, 0x5c, 0x4d, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x23, 0x54, 0x69, 0x62, + 0x63, 0x5c, 0x41, 0x70, 0x70, 0x73, 0x5c, 0x4d, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x1a, 0x54, 0x69, 0x62, 0x63, 0x3a, 0x3a, 0x41, 0x70, 0x70, 0x73, 0x3a, 0x3a, 0x4d, + 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/tibc/apps/mt_transfer/v1/tx_grpc.pb.go b/api/tibc/apps/mt_transfer/v1/tx_grpc.pb.go index 0290f82f..d436207b 100644 --- a/api/tibc/apps/mt_transfer/v1/tx_grpc.pb.go +++ b/api/tibc/apps/mt_transfer/v1/tx_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: tibc/apps/mt_transfer/v1/tx.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Msg_MtTransfer_FullMethodName = "/tibc.apps.mt_transfer.v1.Msg/MtTransfer" @@ -25,6 +25,8 @@ const ( // MsgClient is the client API for Msg service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Msg defines the tibc/MtTransfer Msg service. type MsgClient interface { // MtTransfer defines a rpc handler method for MsgMtTransfer. MtTransfer(ctx context.Context, in *MsgMtTransfer, opts ...grpc.CallOption) (*MsgMtTransferResponse, error) @@ -39,8 +41,9 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { } func (c *msgClient) MtTransfer(ctx context.Context, in *MsgMtTransfer, opts ...grpc.CallOption) (*MsgMtTransferResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgMtTransferResponse) - err := c.cc.Invoke(ctx, Msg_MtTransfer_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Msg_MtTransfer_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -49,21 +52,27 @@ func (c *msgClient) MtTransfer(ctx context.Context, in *MsgMtTransfer, opts ...g // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer -// for forward compatibility +// for forward compatibility. +// +// Msg defines the tibc/MtTransfer Msg service. type MsgServer interface { // MtTransfer defines a rpc handler method for MsgMtTransfer. MtTransfer(context.Context, *MsgMtTransfer) (*MsgMtTransferResponse, error) mustEmbedUnimplementedMsgServer() } -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} +// UnimplementedMsgServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedMsgServer struct{} func (UnimplementedMsgServer) MtTransfer(context.Context, *MsgMtTransfer) (*MsgMtTransferResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MtTransfer not implemented") } func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} +func (UnimplementedMsgServer) testEmbeddedByValue() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MsgServer will @@ -73,6 +82,13 @@ type UnsafeMsgServer interface { } func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + // If the following call pancis, it indicates UnimplementedMsgServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Msg_ServiceDesc, srv) } diff --git a/api/tibc/apps/nft_transfer/v1/query_grpc.pb.go b/api/tibc/apps/nft_transfer/v1/query_grpc.pb.go index f994515c..8620d016 100644 --- a/api/tibc/apps/nft_transfer/v1/query_grpc.pb.go +++ b/api/tibc/apps/nft_transfer/v1/query_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: tibc/apps/nft_transfer/v1/query.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Query_ClassTrace_FullMethodName = "/tibc.apps.nft_transfer.v1.Query/ClassTrace" @@ -26,6 +26,8 @@ const ( // QueryClient is the client API for Query service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Query provides defines the gRPC querier service. type QueryClient interface { // ClassTrace queries a class trace information. ClassTrace(ctx context.Context, in *QueryClassTraceRequest, opts ...grpc.CallOption) (*QueryClassTraceResponse, error) @@ -42,8 +44,9 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { } func (c *queryClient) ClassTrace(ctx context.Context, in *QueryClassTraceRequest, opts ...grpc.CallOption) (*QueryClassTraceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryClassTraceResponse) - err := c.cc.Invoke(ctx, Query_ClassTrace_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Query_ClassTrace_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -51,8 +54,9 @@ func (c *queryClient) ClassTrace(ctx context.Context, in *QueryClassTraceRequest } func (c *queryClient) ClassTraces(ctx context.Context, in *QueryClassTracesRequest, opts ...grpc.CallOption) (*QueryClassTracesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(QueryClassTracesResponse) - err := c.cc.Invoke(ctx, Query_ClassTraces_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Query_ClassTraces_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -61,7 +65,9 @@ func (c *queryClient) ClassTraces(ctx context.Context, in *QueryClassTracesReque // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer -// for forward compatibility +// for forward compatibility. +// +// Query provides defines the gRPC querier service. type QueryServer interface { // ClassTrace queries a class trace information. ClassTrace(context.Context, *QueryClassTraceRequest) (*QueryClassTraceResponse, error) @@ -70,9 +76,12 @@ type QueryServer interface { mustEmbedUnimplementedQueryServer() } -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} +// UnimplementedQueryServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedQueryServer struct{} func (UnimplementedQueryServer) ClassTrace(context.Context, *QueryClassTraceRequest) (*QueryClassTraceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClassTrace not implemented") @@ -81,6 +90,7 @@ func (UnimplementedQueryServer) ClassTraces(context.Context, *QueryClassTracesRe return nil, status.Errorf(codes.Unimplemented, "method ClassTraces not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} +func (UnimplementedQueryServer) testEmbeddedByValue() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to QueryServer will @@ -90,6 +100,13 @@ type UnsafeQueryServer interface { } func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + // If the following call pancis, it indicates UnimplementedQueryServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Query_ServiceDesc, srv) } diff --git a/api/tibc/apps/nft_transfer/v1/tx.pulsar.go b/api/tibc/apps/nft_transfer/v1/tx.pulsar.go index d68b7129..b7f37955 100644 --- a/api/tibc/apps/nft_transfer/v1/tx.pulsar.go +++ b/api/tibc/apps/nft_transfer/v1/tx.pulsar.go @@ -2,6 +2,7 @@ package nft_transferv1 import ( + _ "cosmossdk.io/api/cosmos/msg/v1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" @@ -1186,6 +1187,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// MsgNftTransfer defines the Msg/NftTransfer request type. type MsgNftTransfer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1311,46 +1313,48 @@ var file_tibc_apps_nft_transfer_v1_tx_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x4e, 0x66, 0x74, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x61, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x6c, 0x61, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x61, 0x6c, 0x61, 0x79, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x73, - 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0xe8, - 0xa0, 0x1f, 0x00, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x4e, 0x66, 0x74, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x72, 0x0a, - 0x03, 0x4d, 0x73, 0x67, 0x12, 0x6b, 0x0a, 0x0b, 0x4e, 0x66, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x12, 0x29, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x2e, - 0x6e, 0x66, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x4e, 0x66, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x1a, 0x31, - 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x5f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4e, 0x66, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, + 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6, + 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x4e, 0x66, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, + 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x64, + 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x64, 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, + 0x61, 0x6c, 0x61, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x72, 0x65, 0x61, 0x6c, 0x61, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x23, 0x0a, + 0x0d, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x3a, 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, + 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x4e, 0x66, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0xf6, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x61, + 0x65, 0x32, 0x79, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x6b, 0x0a, 0x0b, 0x4e, 0x66, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x29, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x2e, 0x6e, 0x66, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x69, 0x61, 0x6e, 0x6a, - 0x69, 0x65, 0x61, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x6e, 0x66, 0x74, 0x5f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x6e, 0x66, 0x74, 0x5f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x41, 0x4e, 0xaa, - 0x02, 0x18, 0x54, 0x69, 0x62, 0x63, 0x2e, 0x41, 0x70, 0x70, 0x73, 0x2e, 0x4e, 0x66, 0x74, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x18, 0x54, 0x69, 0x62, - 0x63, 0x5c, 0x41, 0x70, 0x70, 0x73, 0x5c, 0x4e, 0x66, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x65, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x24, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x41, 0x70, 0x70, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4e, 0x66, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x1a, 0x31, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x2e, 0x6e, + 0x66, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x4e, 0x66, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xf6, 0x01, 0x0a, + 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x2e, 0x6e, + 0x66, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, + 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x69, 0x61, 0x6e, 0x6a, 0x69, 0x65, 0x61, 0x69, 0x2f, + 0x74, 0x69, 0x62, 0x63, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, + 0x2f, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x6e, 0x66, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x6e, 0x66, 0x74, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x41, 0x4e, 0xaa, 0x02, 0x18, 0x54, 0x69, 0x62, + 0x63, 0x2e, 0x41, 0x70, 0x70, 0x73, 0x2e, 0x4e, 0x66, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x18, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x41, 0x70, 0x70, 0x73, 0x5c, 0x4e, 0x66, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x54, - 0x69, 0x62, 0x63, 0x3a, 0x3a, 0x41, 0x70, 0x70, 0x73, 0x3a, 0x3a, 0x4e, 0x66, 0x74, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0xe2, 0x02, 0x24, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x41, 0x70, 0x70, 0x73, 0x5c, 0x4e, 0x66, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x54, 0x69, 0x62, 0x63, 0x3a, 0x3a, + 0x41, 0x70, 0x70, 0x73, 0x3a, 0x3a, 0x4e, 0x66, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/tibc/apps/nft_transfer/v1/tx_grpc.pb.go b/api/tibc/apps/nft_transfer/v1/tx_grpc.pb.go index 45c0e3d3..18a824b3 100644 --- a/api/tibc/apps/nft_transfer/v1/tx_grpc.pb.go +++ b/api/tibc/apps/nft_transfer/v1/tx_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: tibc/apps/nft_transfer/v1/tx.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( Msg_NftTransfer_FullMethodName = "/tibc.apps.nft_transfer.v1.Msg/NftTransfer" @@ -25,6 +25,8 @@ const ( // MsgClient is the client API for Msg service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Msg defines the tibc/nftTransfer Msg service. type MsgClient interface { // NftTransfer defines a rpc handler method for MsgNftTransfer. NftTransfer(ctx context.Context, in *MsgNftTransfer, opts ...grpc.CallOption) (*MsgNftTransferResponse, error) @@ -39,8 +41,9 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { } func (c *msgClient) NftTransfer(ctx context.Context, in *MsgNftTransfer, opts ...grpc.CallOption) (*MsgNftTransferResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MsgNftTransferResponse) - err := c.cc.Invoke(ctx, Msg_NftTransfer_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Msg_NftTransfer_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -49,21 +52,27 @@ func (c *msgClient) NftTransfer(ctx context.Context, in *MsgNftTransfer, opts .. // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer -// for forward compatibility +// for forward compatibility. +// +// Msg defines the tibc/nftTransfer Msg service. type MsgServer interface { // NftTransfer defines a rpc handler method for MsgNftTransfer. NftTransfer(context.Context, *MsgNftTransfer) (*MsgNftTransferResponse, error) mustEmbedUnimplementedMsgServer() } -// UnimplementedMsgServer must be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} +// UnimplementedMsgServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedMsgServer struct{} func (UnimplementedMsgServer) NftTransfer(context.Context, *MsgNftTransfer) (*MsgNftTransferResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method NftTransfer not implemented") } func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} +func (UnimplementedMsgServer) testEmbeddedByValue() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MsgServer will @@ -73,6 +82,13 @@ type UnsafeMsgServer interface { } func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + // If the following call pancis, it indicates UnimplementedMsgServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&Msg_ServiceDesc, srv) } diff --git a/api/tibc/core/client/v1/client.pulsar.go b/api/tibc/core/client/v1/client.pulsar.go new file mode 100644 index 00000000..718d0dec --- /dev/null +++ b/api/tibc/core/client/v1/client.pulsar.go @@ -0,0 +1,5404 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package clientv1 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_IdentifiedClientState protoreflect.MessageDescriptor + fd_IdentifiedClientState_chain_name protoreflect.FieldDescriptor + fd_IdentifiedClientState_client_state protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_client_proto_init() + md_IdentifiedClientState = File_tibc_core_client_v1_client_proto.Messages().ByName("IdentifiedClientState") + fd_IdentifiedClientState_chain_name = md_IdentifiedClientState.Fields().ByName("chain_name") + fd_IdentifiedClientState_client_state = md_IdentifiedClientState.Fields().ByName("client_state") +} + +var _ protoreflect.Message = (*fastReflection_IdentifiedClientState)(nil) + +type fastReflection_IdentifiedClientState IdentifiedClientState + +func (x *IdentifiedClientState) ProtoReflect() protoreflect.Message { + return (*fastReflection_IdentifiedClientState)(x) +} + +func (x *IdentifiedClientState) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_client_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_IdentifiedClientState_messageType fastReflection_IdentifiedClientState_messageType +var _ protoreflect.MessageType = fastReflection_IdentifiedClientState_messageType{} + +type fastReflection_IdentifiedClientState_messageType struct{} + +func (x fastReflection_IdentifiedClientState_messageType) Zero() protoreflect.Message { + return (*fastReflection_IdentifiedClientState)(nil) +} +func (x fastReflection_IdentifiedClientState_messageType) New() protoreflect.Message { + return new(fastReflection_IdentifiedClientState) +} +func (x fastReflection_IdentifiedClientState_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_IdentifiedClientState +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_IdentifiedClientState) Descriptor() protoreflect.MessageDescriptor { + return md_IdentifiedClientState +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_IdentifiedClientState) Type() protoreflect.MessageType { + return _fastReflection_IdentifiedClientState_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_IdentifiedClientState) New() protoreflect.Message { + return new(fastReflection_IdentifiedClientState) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_IdentifiedClientState) Interface() protoreflect.ProtoMessage { + return (*IdentifiedClientState)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_IdentifiedClientState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_IdentifiedClientState_chain_name, value) { + return + } + } + if x.ClientState != nil { + value := protoreflect.ValueOfMessage(x.ClientState.ProtoReflect()) + if !f(fd_IdentifiedClientState_client_state, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_IdentifiedClientState) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.IdentifiedClientState.chain_name": + return x.ChainName != "" + case "tibc.core.client.v1.IdentifiedClientState.client_state": + return x.ClientState != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedClientState")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedClientState does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_IdentifiedClientState) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.IdentifiedClientState.chain_name": + x.ChainName = "" + case "tibc.core.client.v1.IdentifiedClientState.client_state": + x.ClientState = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedClientState")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedClientState does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_IdentifiedClientState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.IdentifiedClientState.chain_name": + value := x.ChainName + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.IdentifiedClientState.client_state": + value := x.ClientState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedClientState")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedClientState does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_IdentifiedClientState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.IdentifiedClientState.chain_name": + x.ChainName = value.Interface().(string) + case "tibc.core.client.v1.IdentifiedClientState.client_state": + x.ClientState = value.Message().Interface().(*anypb.Any) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedClientState")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedClientState does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_IdentifiedClientState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.IdentifiedClientState.client_state": + if x.ClientState == nil { + x.ClientState = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.ClientState.ProtoReflect()) + case "tibc.core.client.v1.IdentifiedClientState.chain_name": + panic(fmt.Errorf("field chain_name of message tibc.core.client.v1.IdentifiedClientState is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedClientState")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedClientState does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_IdentifiedClientState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.IdentifiedClientState.chain_name": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.IdentifiedClientState.client_state": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedClientState")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedClientState does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_IdentifiedClientState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.IdentifiedClientState", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_IdentifiedClientState) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_IdentifiedClientState) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_IdentifiedClientState) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_IdentifiedClientState) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*IdentifiedClientState) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ClientState != nil { + l = options.Size(x.ClientState) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*IdentifiedClientState) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ClientState != nil { + encoded, err := options.Marshal(x.ClientState) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*IdentifiedClientState) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: IdentifiedClientState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: IdentifiedClientState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClientState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ClientState == nil { + x.ClientState = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ClientState); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_IdentifiedRelayers_2_list)(nil) + +type _IdentifiedRelayers_2_list struct { + list *[]string +} + +func (x *_IdentifiedRelayers_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_IdentifiedRelayers_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_IdentifiedRelayers_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_IdentifiedRelayers_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_IdentifiedRelayers_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message IdentifiedRelayers at list field Relayers as it is not of Message kind")) +} + +func (x *_IdentifiedRelayers_2_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_IdentifiedRelayers_2_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_IdentifiedRelayers_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_IdentifiedRelayers protoreflect.MessageDescriptor + fd_IdentifiedRelayers_chain_name protoreflect.FieldDescriptor + fd_IdentifiedRelayers_relayers protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_client_proto_init() + md_IdentifiedRelayers = File_tibc_core_client_v1_client_proto.Messages().ByName("IdentifiedRelayers") + fd_IdentifiedRelayers_chain_name = md_IdentifiedRelayers.Fields().ByName("chain_name") + fd_IdentifiedRelayers_relayers = md_IdentifiedRelayers.Fields().ByName("relayers") +} + +var _ protoreflect.Message = (*fastReflection_IdentifiedRelayers)(nil) + +type fastReflection_IdentifiedRelayers IdentifiedRelayers + +func (x *IdentifiedRelayers) ProtoReflect() protoreflect.Message { + return (*fastReflection_IdentifiedRelayers)(x) +} + +func (x *IdentifiedRelayers) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_client_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_IdentifiedRelayers_messageType fastReflection_IdentifiedRelayers_messageType +var _ protoreflect.MessageType = fastReflection_IdentifiedRelayers_messageType{} + +type fastReflection_IdentifiedRelayers_messageType struct{} + +func (x fastReflection_IdentifiedRelayers_messageType) Zero() protoreflect.Message { + return (*fastReflection_IdentifiedRelayers)(nil) +} +func (x fastReflection_IdentifiedRelayers_messageType) New() protoreflect.Message { + return new(fastReflection_IdentifiedRelayers) +} +func (x fastReflection_IdentifiedRelayers_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_IdentifiedRelayers +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_IdentifiedRelayers) Descriptor() protoreflect.MessageDescriptor { + return md_IdentifiedRelayers +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_IdentifiedRelayers) Type() protoreflect.MessageType { + return _fastReflection_IdentifiedRelayers_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_IdentifiedRelayers) New() protoreflect.Message { + return new(fastReflection_IdentifiedRelayers) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_IdentifiedRelayers) Interface() protoreflect.ProtoMessage { + return (*IdentifiedRelayers)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_IdentifiedRelayers) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_IdentifiedRelayers_chain_name, value) { + return + } + } + if len(x.Relayers) != 0 { + value := protoreflect.ValueOfList(&_IdentifiedRelayers_2_list{list: &x.Relayers}) + if !f(fd_IdentifiedRelayers_relayers, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_IdentifiedRelayers) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.IdentifiedRelayers.chain_name": + return x.ChainName != "" + case "tibc.core.client.v1.IdentifiedRelayers.relayers": + return len(x.Relayers) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedRelayers")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedRelayers does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_IdentifiedRelayers) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.IdentifiedRelayers.chain_name": + x.ChainName = "" + case "tibc.core.client.v1.IdentifiedRelayers.relayers": + x.Relayers = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedRelayers")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedRelayers does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_IdentifiedRelayers) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.IdentifiedRelayers.chain_name": + value := x.ChainName + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.IdentifiedRelayers.relayers": + if len(x.Relayers) == 0 { + return protoreflect.ValueOfList(&_IdentifiedRelayers_2_list{}) + } + listValue := &_IdentifiedRelayers_2_list{list: &x.Relayers} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedRelayers")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedRelayers does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_IdentifiedRelayers) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.IdentifiedRelayers.chain_name": + x.ChainName = value.Interface().(string) + case "tibc.core.client.v1.IdentifiedRelayers.relayers": + lv := value.List() + clv := lv.(*_IdentifiedRelayers_2_list) + x.Relayers = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedRelayers")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedRelayers does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_IdentifiedRelayers) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.IdentifiedRelayers.relayers": + if x.Relayers == nil { + x.Relayers = []string{} + } + value := &_IdentifiedRelayers_2_list{list: &x.Relayers} + return protoreflect.ValueOfList(value) + case "tibc.core.client.v1.IdentifiedRelayers.chain_name": + panic(fmt.Errorf("field chain_name of message tibc.core.client.v1.IdentifiedRelayers is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedRelayers")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedRelayers does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_IdentifiedRelayers) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.IdentifiedRelayers.chain_name": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.IdentifiedRelayers.relayers": + list := []string{} + return protoreflect.ValueOfList(&_IdentifiedRelayers_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedRelayers")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedRelayers does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_IdentifiedRelayers) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.IdentifiedRelayers", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_IdentifiedRelayers) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_IdentifiedRelayers) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_IdentifiedRelayers) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_IdentifiedRelayers) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*IdentifiedRelayers) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Relayers) > 0 { + for _, s := range x.Relayers { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*IdentifiedRelayers) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Relayers) > 0 { + for iNdEx := len(x.Relayers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Relayers[iNdEx]) + copy(dAtA[i:], x.Relayers[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Relayers[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*IdentifiedRelayers) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: IdentifiedRelayers: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: IdentifiedRelayers: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relayers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Relayers = append(x.Relayers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ConsensusStateWithHeight protoreflect.MessageDescriptor + fd_ConsensusStateWithHeight_height protoreflect.FieldDescriptor + fd_ConsensusStateWithHeight_consensus_state protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_client_proto_init() + md_ConsensusStateWithHeight = File_tibc_core_client_v1_client_proto.Messages().ByName("ConsensusStateWithHeight") + fd_ConsensusStateWithHeight_height = md_ConsensusStateWithHeight.Fields().ByName("height") + fd_ConsensusStateWithHeight_consensus_state = md_ConsensusStateWithHeight.Fields().ByName("consensus_state") +} + +var _ protoreflect.Message = (*fastReflection_ConsensusStateWithHeight)(nil) + +type fastReflection_ConsensusStateWithHeight ConsensusStateWithHeight + +func (x *ConsensusStateWithHeight) ProtoReflect() protoreflect.Message { + return (*fastReflection_ConsensusStateWithHeight)(x) +} + +func (x *ConsensusStateWithHeight) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_client_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ConsensusStateWithHeight_messageType fastReflection_ConsensusStateWithHeight_messageType +var _ protoreflect.MessageType = fastReflection_ConsensusStateWithHeight_messageType{} + +type fastReflection_ConsensusStateWithHeight_messageType struct{} + +func (x fastReflection_ConsensusStateWithHeight_messageType) Zero() protoreflect.Message { + return (*fastReflection_ConsensusStateWithHeight)(nil) +} +func (x fastReflection_ConsensusStateWithHeight_messageType) New() protoreflect.Message { + return new(fastReflection_ConsensusStateWithHeight) +} +func (x fastReflection_ConsensusStateWithHeight_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ConsensusStateWithHeight +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ConsensusStateWithHeight) Descriptor() protoreflect.MessageDescriptor { + return md_ConsensusStateWithHeight +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ConsensusStateWithHeight) Type() protoreflect.MessageType { + return _fastReflection_ConsensusStateWithHeight_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ConsensusStateWithHeight) New() protoreflect.Message { + return new(fastReflection_ConsensusStateWithHeight) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ConsensusStateWithHeight) Interface() protoreflect.ProtoMessage { + return (*ConsensusStateWithHeight)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ConsensusStateWithHeight) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Height != nil { + value := protoreflect.ValueOfMessage(x.Height.ProtoReflect()) + if !f(fd_ConsensusStateWithHeight_height, value) { + return + } + } + if x.ConsensusState != nil { + value := protoreflect.ValueOfMessage(x.ConsensusState.ProtoReflect()) + if !f(fd_ConsensusStateWithHeight_consensus_state, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ConsensusStateWithHeight) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.ConsensusStateWithHeight.height": + return x.Height != nil + case "tibc.core.client.v1.ConsensusStateWithHeight.consensus_state": + return x.ConsensusState != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.ConsensusStateWithHeight")) + } + panic(fmt.Errorf("message tibc.core.client.v1.ConsensusStateWithHeight does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConsensusStateWithHeight) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.ConsensusStateWithHeight.height": + x.Height = nil + case "tibc.core.client.v1.ConsensusStateWithHeight.consensus_state": + x.ConsensusState = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.ConsensusStateWithHeight")) + } + panic(fmt.Errorf("message tibc.core.client.v1.ConsensusStateWithHeight does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ConsensusStateWithHeight) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.ConsensusStateWithHeight.height": + value := x.Height + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.client.v1.ConsensusStateWithHeight.consensus_state": + value := x.ConsensusState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.ConsensusStateWithHeight")) + } + panic(fmt.Errorf("message tibc.core.client.v1.ConsensusStateWithHeight does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConsensusStateWithHeight) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.ConsensusStateWithHeight.height": + x.Height = value.Message().Interface().(*Height) + case "tibc.core.client.v1.ConsensusStateWithHeight.consensus_state": + x.ConsensusState = value.Message().Interface().(*anypb.Any) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.ConsensusStateWithHeight")) + } + panic(fmt.Errorf("message tibc.core.client.v1.ConsensusStateWithHeight does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConsensusStateWithHeight) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.ConsensusStateWithHeight.height": + if x.Height == nil { + x.Height = new(Height) + } + return protoreflect.ValueOfMessage(x.Height.ProtoReflect()) + case "tibc.core.client.v1.ConsensusStateWithHeight.consensus_state": + if x.ConsensusState == nil { + x.ConsensusState = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.ConsensusState.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.ConsensusStateWithHeight")) + } + panic(fmt.Errorf("message tibc.core.client.v1.ConsensusStateWithHeight does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ConsensusStateWithHeight) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.ConsensusStateWithHeight.height": + m := new(Height) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.client.v1.ConsensusStateWithHeight.consensus_state": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.ConsensusStateWithHeight")) + } + panic(fmt.Errorf("message tibc.core.client.v1.ConsensusStateWithHeight does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ConsensusStateWithHeight) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.ConsensusStateWithHeight", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ConsensusStateWithHeight) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConsensusStateWithHeight) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ConsensusStateWithHeight) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ConsensusStateWithHeight) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ConsensusStateWithHeight) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Height != nil { + l = options.Size(x.Height) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ConsensusState != nil { + l = options.Size(x.ConsensusState) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ConsensusStateWithHeight) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ConsensusState != nil { + encoded, err := options.Marshal(x.ConsensusState) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if x.Height != nil { + encoded, err := options.Marshal(x.Height) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ConsensusStateWithHeight) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConsensusStateWithHeight: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConsensusStateWithHeight: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Height == nil { + x.Height = &Height{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Height); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConsensusState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ConsensusState == nil { + x.ConsensusState = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConsensusState); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_ClientConsensusStates_2_list)(nil) + +type _ClientConsensusStates_2_list struct { + list *[]*ConsensusStateWithHeight +} + +func (x *_ClientConsensusStates_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ClientConsensusStates_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ClientConsensusStates_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ConsensusStateWithHeight) + (*x.list)[i] = concreteValue +} + +func (x *_ClientConsensusStates_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ConsensusStateWithHeight) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ClientConsensusStates_2_list) AppendMutable() protoreflect.Value { + v := new(ConsensusStateWithHeight) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ClientConsensusStates_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ClientConsensusStates_2_list) NewElement() protoreflect.Value { + v := new(ConsensusStateWithHeight) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ClientConsensusStates_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ClientConsensusStates protoreflect.MessageDescriptor + fd_ClientConsensusStates_chain_name protoreflect.FieldDescriptor + fd_ClientConsensusStates_consensus_states protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_client_proto_init() + md_ClientConsensusStates = File_tibc_core_client_v1_client_proto.Messages().ByName("ClientConsensusStates") + fd_ClientConsensusStates_chain_name = md_ClientConsensusStates.Fields().ByName("chain_name") + fd_ClientConsensusStates_consensus_states = md_ClientConsensusStates.Fields().ByName("consensus_states") +} + +var _ protoreflect.Message = (*fastReflection_ClientConsensusStates)(nil) + +type fastReflection_ClientConsensusStates ClientConsensusStates + +func (x *ClientConsensusStates) ProtoReflect() protoreflect.Message { + return (*fastReflection_ClientConsensusStates)(x) +} + +func (x *ClientConsensusStates) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_client_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ClientConsensusStates_messageType fastReflection_ClientConsensusStates_messageType +var _ protoreflect.MessageType = fastReflection_ClientConsensusStates_messageType{} + +type fastReflection_ClientConsensusStates_messageType struct{} + +func (x fastReflection_ClientConsensusStates_messageType) Zero() protoreflect.Message { + return (*fastReflection_ClientConsensusStates)(nil) +} +func (x fastReflection_ClientConsensusStates_messageType) New() protoreflect.Message { + return new(fastReflection_ClientConsensusStates) +} +func (x fastReflection_ClientConsensusStates_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ClientConsensusStates +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ClientConsensusStates) Descriptor() protoreflect.MessageDescriptor { + return md_ClientConsensusStates +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ClientConsensusStates) Type() protoreflect.MessageType { + return _fastReflection_ClientConsensusStates_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ClientConsensusStates) New() protoreflect.Message { + return new(fastReflection_ClientConsensusStates) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ClientConsensusStates) Interface() protoreflect.ProtoMessage { + return (*ClientConsensusStates)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ClientConsensusStates) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_ClientConsensusStates_chain_name, value) { + return + } + } + if len(x.ConsensusStates) != 0 { + value := protoreflect.ValueOfList(&_ClientConsensusStates_2_list{list: &x.ConsensusStates}) + if !f(fd_ClientConsensusStates_consensus_states, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ClientConsensusStates) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.ClientConsensusStates.chain_name": + return x.ChainName != "" + case "tibc.core.client.v1.ClientConsensusStates.consensus_states": + return len(x.ConsensusStates) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.ClientConsensusStates")) + } + panic(fmt.Errorf("message tibc.core.client.v1.ClientConsensusStates does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ClientConsensusStates) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.ClientConsensusStates.chain_name": + x.ChainName = "" + case "tibc.core.client.v1.ClientConsensusStates.consensus_states": + x.ConsensusStates = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.ClientConsensusStates")) + } + panic(fmt.Errorf("message tibc.core.client.v1.ClientConsensusStates does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ClientConsensusStates) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.ClientConsensusStates.chain_name": + value := x.ChainName + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.ClientConsensusStates.consensus_states": + if len(x.ConsensusStates) == 0 { + return protoreflect.ValueOfList(&_ClientConsensusStates_2_list{}) + } + listValue := &_ClientConsensusStates_2_list{list: &x.ConsensusStates} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.ClientConsensusStates")) + } + panic(fmt.Errorf("message tibc.core.client.v1.ClientConsensusStates does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ClientConsensusStates) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.ClientConsensusStates.chain_name": + x.ChainName = value.Interface().(string) + case "tibc.core.client.v1.ClientConsensusStates.consensus_states": + lv := value.List() + clv := lv.(*_ClientConsensusStates_2_list) + x.ConsensusStates = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.ClientConsensusStates")) + } + panic(fmt.Errorf("message tibc.core.client.v1.ClientConsensusStates does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ClientConsensusStates) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.ClientConsensusStates.consensus_states": + if x.ConsensusStates == nil { + x.ConsensusStates = []*ConsensusStateWithHeight{} + } + value := &_ClientConsensusStates_2_list{list: &x.ConsensusStates} + return protoreflect.ValueOfList(value) + case "tibc.core.client.v1.ClientConsensusStates.chain_name": + panic(fmt.Errorf("field chain_name of message tibc.core.client.v1.ClientConsensusStates is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.ClientConsensusStates")) + } + panic(fmt.Errorf("message tibc.core.client.v1.ClientConsensusStates does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ClientConsensusStates) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.ClientConsensusStates.chain_name": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.ClientConsensusStates.consensus_states": + list := []*ConsensusStateWithHeight{} + return protoreflect.ValueOfList(&_ClientConsensusStates_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.ClientConsensusStates")) + } + panic(fmt.Errorf("message tibc.core.client.v1.ClientConsensusStates does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ClientConsensusStates) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.ClientConsensusStates", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ClientConsensusStates) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ClientConsensusStates) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ClientConsensusStates) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ClientConsensusStates) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ClientConsensusStates) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.ConsensusStates) > 0 { + for _, e := range x.ConsensusStates { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ClientConsensusStates) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ConsensusStates) > 0 { + for iNdEx := len(x.ConsensusStates) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ConsensusStates[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ClientConsensusStates) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ClientConsensusStates: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ClientConsensusStates: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConsensusStates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ConsensusStates = append(x.ConsensusStates, &ConsensusStateWithHeight{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConsensusStates[len(x.ConsensusStates)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_CreateClientProposal protoreflect.MessageDescriptor + fd_CreateClientProposal_title protoreflect.FieldDescriptor + fd_CreateClientProposal_description protoreflect.FieldDescriptor + fd_CreateClientProposal_chain_name protoreflect.FieldDescriptor + fd_CreateClientProposal_client_state protoreflect.FieldDescriptor + fd_CreateClientProposal_consensus_state protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_client_proto_init() + md_CreateClientProposal = File_tibc_core_client_v1_client_proto.Messages().ByName("CreateClientProposal") + fd_CreateClientProposal_title = md_CreateClientProposal.Fields().ByName("title") + fd_CreateClientProposal_description = md_CreateClientProposal.Fields().ByName("description") + fd_CreateClientProposal_chain_name = md_CreateClientProposal.Fields().ByName("chain_name") + fd_CreateClientProposal_client_state = md_CreateClientProposal.Fields().ByName("client_state") + fd_CreateClientProposal_consensus_state = md_CreateClientProposal.Fields().ByName("consensus_state") +} + +var _ protoreflect.Message = (*fastReflection_CreateClientProposal)(nil) + +type fastReflection_CreateClientProposal CreateClientProposal + +func (x *CreateClientProposal) ProtoReflect() protoreflect.Message { + return (*fastReflection_CreateClientProposal)(x) +} + +func (x *CreateClientProposal) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_client_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_CreateClientProposal_messageType fastReflection_CreateClientProposal_messageType +var _ protoreflect.MessageType = fastReflection_CreateClientProposal_messageType{} + +type fastReflection_CreateClientProposal_messageType struct{} + +func (x fastReflection_CreateClientProposal_messageType) Zero() protoreflect.Message { + return (*fastReflection_CreateClientProposal)(nil) +} +func (x fastReflection_CreateClientProposal_messageType) New() protoreflect.Message { + return new(fastReflection_CreateClientProposal) +} +func (x fastReflection_CreateClientProposal_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_CreateClientProposal +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_CreateClientProposal) Descriptor() protoreflect.MessageDescriptor { + return md_CreateClientProposal +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_CreateClientProposal) Type() protoreflect.MessageType { + return _fastReflection_CreateClientProposal_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_CreateClientProposal) New() protoreflect.Message { + return new(fastReflection_CreateClientProposal) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_CreateClientProposal) Interface() protoreflect.ProtoMessage { + return (*CreateClientProposal)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_CreateClientProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_CreateClientProposal_title, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_CreateClientProposal_description, value) { + return + } + } + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_CreateClientProposal_chain_name, value) { + return + } + } + if x.ClientState != nil { + value := protoreflect.ValueOfMessage(x.ClientState.ProtoReflect()) + if !f(fd_CreateClientProposal_client_state, value) { + return + } + } + if x.ConsensusState != nil { + value := protoreflect.ValueOfMessage(x.ConsensusState.ProtoReflect()) + if !f(fd_CreateClientProposal_consensus_state, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_CreateClientProposal) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.CreateClientProposal.title": + return x.Title != "" + case "tibc.core.client.v1.CreateClientProposal.description": + return x.Description != "" + case "tibc.core.client.v1.CreateClientProposal.chain_name": + return x.ChainName != "" + case "tibc.core.client.v1.CreateClientProposal.client_state": + return x.ClientState != nil + case "tibc.core.client.v1.CreateClientProposal.consensus_state": + return x.ConsensusState != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.CreateClientProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.CreateClientProposal does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CreateClientProposal) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.CreateClientProposal.title": + x.Title = "" + case "tibc.core.client.v1.CreateClientProposal.description": + x.Description = "" + case "tibc.core.client.v1.CreateClientProposal.chain_name": + x.ChainName = "" + case "tibc.core.client.v1.CreateClientProposal.client_state": + x.ClientState = nil + case "tibc.core.client.v1.CreateClientProposal.consensus_state": + x.ConsensusState = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.CreateClientProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.CreateClientProposal does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_CreateClientProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.CreateClientProposal.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.CreateClientProposal.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.CreateClientProposal.chain_name": + value := x.ChainName + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.CreateClientProposal.client_state": + value := x.ClientState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.client.v1.CreateClientProposal.consensus_state": + value := x.ConsensusState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.CreateClientProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.CreateClientProposal does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CreateClientProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.CreateClientProposal.title": + x.Title = value.Interface().(string) + case "tibc.core.client.v1.CreateClientProposal.description": + x.Description = value.Interface().(string) + case "tibc.core.client.v1.CreateClientProposal.chain_name": + x.ChainName = value.Interface().(string) + case "tibc.core.client.v1.CreateClientProposal.client_state": + x.ClientState = value.Message().Interface().(*anypb.Any) + case "tibc.core.client.v1.CreateClientProposal.consensus_state": + x.ConsensusState = value.Message().Interface().(*anypb.Any) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.CreateClientProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.CreateClientProposal does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CreateClientProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.CreateClientProposal.client_state": + if x.ClientState == nil { + x.ClientState = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.ClientState.ProtoReflect()) + case "tibc.core.client.v1.CreateClientProposal.consensus_state": + if x.ConsensusState == nil { + x.ConsensusState = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.ConsensusState.ProtoReflect()) + case "tibc.core.client.v1.CreateClientProposal.title": + panic(fmt.Errorf("field title of message tibc.core.client.v1.CreateClientProposal is not mutable")) + case "tibc.core.client.v1.CreateClientProposal.description": + panic(fmt.Errorf("field description of message tibc.core.client.v1.CreateClientProposal is not mutable")) + case "tibc.core.client.v1.CreateClientProposal.chain_name": + panic(fmt.Errorf("field chain_name of message tibc.core.client.v1.CreateClientProposal is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.CreateClientProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.CreateClientProposal does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_CreateClientProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.CreateClientProposal.title": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.CreateClientProposal.description": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.CreateClientProposal.chain_name": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.CreateClientProposal.client_state": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.client.v1.CreateClientProposal.consensus_state": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.CreateClientProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.CreateClientProposal does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_CreateClientProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.CreateClientProposal", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_CreateClientProposal) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CreateClientProposal) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_CreateClientProposal) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_CreateClientProposal) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*CreateClientProposal) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Title) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ClientState != nil { + l = options.Size(x.ClientState) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ConsensusState != nil { + l = options.Size(x.ConsensusState) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*CreateClientProposal) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ConsensusState != nil { + encoded, err := options.Marshal(x.ConsensusState) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if x.ClientState != nil { + encoded, err := options.Marshal(x.ClientState) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + i-- + dAtA[i] = 0x1a + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x12 + } + if len(x.Title) > 0 { + i -= len(x.Title) + copy(dAtA[i:], x.Title) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*CreateClientProposal) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CreateClientProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CreateClientProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClientState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ClientState == nil { + x.ClientState = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ClientState); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConsensusState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ConsensusState == nil { + x.ConsensusState = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConsensusState); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_UpgradeClientProposal protoreflect.MessageDescriptor + fd_UpgradeClientProposal_title protoreflect.FieldDescriptor + fd_UpgradeClientProposal_description protoreflect.FieldDescriptor + fd_UpgradeClientProposal_chain_name protoreflect.FieldDescriptor + fd_UpgradeClientProposal_client_state protoreflect.FieldDescriptor + fd_UpgradeClientProposal_consensus_state protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_client_proto_init() + md_UpgradeClientProposal = File_tibc_core_client_v1_client_proto.Messages().ByName("UpgradeClientProposal") + fd_UpgradeClientProposal_title = md_UpgradeClientProposal.Fields().ByName("title") + fd_UpgradeClientProposal_description = md_UpgradeClientProposal.Fields().ByName("description") + fd_UpgradeClientProposal_chain_name = md_UpgradeClientProposal.Fields().ByName("chain_name") + fd_UpgradeClientProposal_client_state = md_UpgradeClientProposal.Fields().ByName("client_state") + fd_UpgradeClientProposal_consensus_state = md_UpgradeClientProposal.Fields().ByName("consensus_state") +} + +var _ protoreflect.Message = (*fastReflection_UpgradeClientProposal)(nil) + +type fastReflection_UpgradeClientProposal UpgradeClientProposal + +func (x *UpgradeClientProposal) ProtoReflect() protoreflect.Message { + return (*fastReflection_UpgradeClientProposal)(x) +} + +func (x *UpgradeClientProposal) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_client_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_UpgradeClientProposal_messageType fastReflection_UpgradeClientProposal_messageType +var _ protoreflect.MessageType = fastReflection_UpgradeClientProposal_messageType{} + +type fastReflection_UpgradeClientProposal_messageType struct{} + +func (x fastReflection_UpgradeClientProposal_messageType) Zero() protoreflect.Message { + return (*fastReflection_UpgradeClientProposal)(nil) +} +func (x fastReflection_UpgradeClientProposal_messageType) New() protoreflect.Message { + return new(fastReflection_UpgradeClientProposal) +} +func (x fastReflection_UpgradeClientProposal_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_UpgradeClientProposal +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_UpgradeClientProposal) Descriptor() protoreflect.MessageDescriptor { + return md_UpgradeClientProposal +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_UpgradeClientProposal) Type() protoreflect.MessageType { + return _fastReflection_UpgradeClientProposal_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_UpgradeClientProposal) New() protoreflect.Message { + return new(fastReflection_UpgradeClientProposal) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_UpgradeClientProposal) Interface() protoreflect.ProtoMessage { + return (*UpgradeClientProposal)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_UpgradeClientProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_UpgradeClientProposal_title, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_UpgradeClientProposal_description, value) { + return + } + } + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_UpgradeClientProposal_chain_name, value) { + return + } + } + if x.ClientState != nil { + value := protoreflect.ValueOfMessage(x.ClientState.ProtoReflect()) + if !f(fd_UpgradeClientProposal_client_state, value) { + return + } + } + if x.ConsensusState != nil { + value := protoreflect.ValueOfMessage(x.ConsensusState.ProtoReflect()) + if !f(fd_UpgradeClientProposal_consensus_state, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_UpgradeClientProposal) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.UpgradeClientProposal.title": + return x.Title != "" + case "tibc.core.client.v1.UpgradeClientProposal.description": + return x.Description != "" + case "tibc.core.client.v1.UpgradeClientProposal.chain_name": + return x.ChainName != "" + case "tibc.core.client.v1.UpgradeClientProposal.client_state": + return x.ClientState != nil + case "tibc.core.client.v1.UpgradeClientProposal.consensus_state": + return x.ConsensusState != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.UpgradeClientProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.UpgradeClientProposal does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_UpgradeClientProposal) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.UpgradeClientProposal.title": + x.Title = "" + case "tibc.core.client.v1.UpgradeClientProposal.description": + x.Description = "" + case "tibc.core.client.v1.UpgradeClientProposal.chain_name": + x.ChainName = "" + case "tibc.core.client.v1.UpgradeClientProposal.client_state": + x.ClientState = nil + case "tibc.core.client.v1.UpgradeClientProposal.consensus_state": + x.ConsensusState = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.UpgradeClientProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.UpgradeClientProposal does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_UpgradeClientProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.UpgradeClientProposal.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.UpgradeClientProposal.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.UpgradeClientProposal.chain_name": + value := x.ChainName + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.UpgradeClientProposal.client_state": + value := x.ClientState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.client.v1.UpgradeClientProposal.consensus_state": + value := x.ConsensusState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.UpgradeClientProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.UpgradeClientProposal does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_UpgradeClientProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.UpgradeClientProposal.title": + x.Title = value.Interface().(string) + case "tibc.core.client.v1.UpgradeClientProposal.description": + x.Description = value.Interface().(string) + case "tibc.core.client.v1.UpgradeClientProposal.chain_name": + x.ChainName = value.Interface().(string) + case "tibc.core.client.v1.UpgradeClientProposal.client_state": + x.ClientState = value.Message().Interface().(*anypb.Any) + case "tibc.core.client.v1.UpgradeClientProposal.consensus_state": + x.ConsensusState = value.Message().Interface().(*anypb.Any) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.UpgradeClientProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.UpgradeClientProposal does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_UpgradeClientProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.UpgradeClientProposal.client_state": + if x.ClientState == nil { + x.ClientState = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.ClientState.ProtoReflect()) + case "tibc.core.client.v1.UpgradeClientProposal.consensus_state": + if x.ConsensusState == nil { + x.ConsensusState = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.ConsensusState.ProtoReflect()) + case "tibc.core.client.v1.UpgradeClientProposal.title": + panic(fmt.Errorf("field title of message tibc.core.client.v1.UpgradeClientProposal is not mutable")) + case "tibc.core.client.v1.UpgradeClientProposal.description": + panic(fmt.Errorf("field description of message tibc.core.client.v1.UpgradeClientProposal is not mutable")) + case "tibc.core.client.v1.UpgradeClientProposal.chain_name": + panic(fmt.Errorf("field chain_name of message tibc.core.client.v1.UpgradeClientProposal is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.UpgradeClientProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.UpgradeClientProposal does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_UpgradeClientProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.UpgradeClientProposal.title": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.UpgradeClientProposal.description": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.UpgradeClientProposal.chain_name": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.UpgradeClientProposal.client_state": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.client.v1.UpgradeClientProposal.consensus_state": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.UpgradeClientProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.UpgradeClientProposal does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_UpgradeClientProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.UpgradeClientProposal", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_UpgradeClientProposal) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_UpgradeClientProposal) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_UpgradeClientProposal) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_UpgradeClientProposal) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*UpgradeClientProposal) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Title) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ClientState != nil { + l = options.Size(x.ClientState) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ConsensusState != nil { + l = options.Size(x.ConsensusState) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*UpgradeClientProposal) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ConsensusState != nil { + encoded, err := options.Marshal(x.ConsensusState) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if x.ClientState != nil { + encoded, err := options.Marshal(x.ClientState) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + i-- + dAtA[i] = 0x1a + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x12 + } + if len(x.Title) > 0 { + i -= len(x.Title) + copy(dAtA[i:], x.Title) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*UpgradeClientProposal) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UpgradeClientProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UpgradeClientProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClientState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ClientState == nil { + x.ClientState = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ClientState); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConsensusState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ConsensusState == nil { + x.ConsensusState = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConsensusState); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_RegisterRelayerProposal_4_list)(nil) + +type _RegisterRelayerProposal_4_list struct { + list *[]string +} + +func (x *_RegisterRelayerProposal_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_RegisterRelayerProposal_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_RegisterRelayerProposal_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_RegisterRelayerProposal_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_RegisterRelayerProposal_4_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message RegisterRelayerProposal at list field Relayers as it is not of Message kind")) +} + +func (x *_RegisterRelayerProposal_4_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_RegisterRelayerProposal_4_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_RegisterRelayerProposal_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_RegisterRelayerProposal protoreflect.MessageDescriptor + fd_RegisterRelayerProposal_title protoreflect.FieldDescriptor + fd_RegisterRelayerProposal_description protoreflect.FieldDescriptor + fd_RegisterRelayerProposal_chain_name protoreflect.FieldDescriptor + fd_RegisterRelayerProposal_relayers protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_client_proto_init() + md_RegisterRelayerProposal = File_tibc_core_client_v1_client_proto.Messages().ByName("RegisterRelayerProposal") + fd_RegisterRelayerProposal_title = md_RegisterRelayerProposal.Fields().ByName("title") + fd_RegisterRelayerProposal_description = md_RegisterRelayerProposal.Fields().ByName("description") + fd_RegisterRelayerProposal_chain_name = md_RegisterRelayerProposal.Fields().ByName("chain_name") + fd_RegisterRelayerProposal_relayers = md_RegisterRelayerProposal.Fields().ByName("relayers") +} + +var _ protoreflect.Message = (*fastReflection_RegisterRelayerProposal)(nil) + +type fastReflection_RegisterRelayerProposal RegisterRelayerProposal + +func (x *RegisterRelayerProposal) ProtoReflect() protoreflect.Message { + return (*fastReflection_RegisterRelayerProposal)(x) +} + +func (x *RegisterRelayerProposal) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_client_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_RegisterRelayerProposal_messageType fastReflection_RegisterRelayerProposal_messageType +var _ protoreflect.MessageType = fastReflection_RegisterRelayerProposal_messageType{} + +type fastReflection_RegisterRelayerProposal_messageType struct{} + +func (x fastReflection_RegisterRelayerProposal_messageType) Zero() protoreflect.Message { + return (*fastReflection_RegisterRelayerProposal)(nil) +} +func (x fastReflection_RegisterRelayerProposal_messageType) New() protoreflect.Message { + return new(fastReflection_RegisterRelayerProposal) +} +func (x fastReflection_RegisterRelayerProposal_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_RegisterRelayerProposal +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_RegisterRelayerProposal) Descriptor() protoreflect.MessageDescriptor { + return md_RegisterRelayerProposal +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_RegisterRelayerProposal) Type() protoreflect.MessageType { + return _fastReflection_RegisterRelayerProposal_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_RegisterRelayerProposal) New() protoreflect.Message { + return new(fastReflection_RegisterRelayerProposal) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_RegisterRelayerProposal) Interface() protoreflect.ProtoMessage { + return (*RegisterRelayerProposal)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_RegisterRelayerProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_RegisterRelayerProposal_title, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_RegisterRelayerProposal_description, value) { + return + } + } + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_RegisterRelayerProposal_chain_name, value) { + return + } + } + if len(x.Relayers) != 0 { + value := protoreflect.ValueOfList(&_RegisterRelayerProposal_4_list{list: &x.Relayers}) + if !f(fd_RegisterRelayerProposal_relayers, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_RegisterRelayerProposal) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.RegisterRelayerProposal.title": + return x.Title != "" + case "tibc.core.client.v1.RegisterRelayerProposal.description": + return x.Description != "" + case "tibc.core.client.v1.RegisterRelayerProposal.chain_name": + return x.ChainName != "" + case "tibc.core.client.v1.RegisterRelayerProposal.relayers": + return len(x.Relayers) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.RegisterRelayerProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.RegisterRelayerProposal does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_RegisterRelayerProposal) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.RegisterRelayerProposal.title": + x.Title = "" + case "tibc.core.client.v1.RegisterRelayerProposal.description": + x.Description = "" + case "tibc.core.client.v1.RegisterRelayerProposal.chain_name": + x.ChainName = "" + case "tibc.core.client.v1.RegisterRelayerProposal.relayers": + x.Relayers = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.RegisterRelayerProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.RegisterRelayerProposal does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_RegisterRelayerProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.RegisterRelayerProposal.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.RegisterRelayerProposal.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.RegisterRelayerProposal.chain_name": + value := x.ChainName + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.RegisterRelayerProposal.relayers": + if len(x.Relayers) == 0 { + return protoreflect.ValueOfList(&_RegisterRelayerProposal_4_list{}) + } + listValue := &_RegisterRelayerProposal_4_list{list: &x.Relayers} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.RegisterRelayerProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.RegisterRelayerProposal does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_RegisterRelayerProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.RegisterRelayerProposal.title": + x.Title = value.Interface().(string) + case "tibc.core.client.v1.RegisterRelayerProposal.description": + x.Description = value.Interface().(string) + case "tibc.core.client.v1.RegisterRelayerProposal.chain_name": + x.ChainName = value.Interface().(string) + case "tibc.core.client.v1.RegisterRelayerProposal.relayers": + lv := value.List() + clv := lv.(*_RegisterRelayerProposal_4_list) + x.Relayers = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.RegisterRelayerProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.RegisterRelayerProposal does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_RegisterRelayerProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.RegisterRelayerProposal.relayers": + if x.Relayers == nil { + x.Relayers = []string{} + } + value := &_RegisterRelayerProposal_4_list{list: &x.Relayers} + return protoreflect.ValueOfList(value) + case "tibc.core.client.v1.RegisterRelayerProposal.title": + panic(fmt.Errorf("field title of message tibc.core.client.v1.RegisterRelayerProposal is not mutable")) + case "tibc.core.client.v1.RegisterRelayerProposal.description": + panic(fmt.Errorf("field description of message tibc.core.client.v1.RegisterRelayerProposal is not mutable")) + case "tibc.core.client.v1.RegisterRelayerProposal.chain_name": + panic(fmt.Errorf("field chain_name of message tibc.core.client.v1.RegisterRelayerProposal is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.RegisterRelayerProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.RegisterRelayerProposal does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_RegisterRelayerProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.RegisterRelayerProposal.title": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.RegisterRelayerProposal.description": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.RegisterRelayerProposal.chain_name": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.RegisterRelayerProposal.relayers": + list := []string{} + return protoreflect.ValueOfList(&_RegisterRelayerProposal_4_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.RegisterRelayerProposal")) + } + panic(fmt.Errorf("message tibc.core.client.v1.RegisterRelayerProposal does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_RegisterRelayerProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.RegisterRelayerProposal", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_RegisterRelayerProposal) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_RegisterRelayerProposal) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_RegisterRelayerProposal) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_RegisterRelayerProposal) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*RegisterRelayerProposal) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Title) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Relayers) > 0 { + for _, s := range x.Relayers { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*RegisterRelayerProposal) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Relayers) > 0 { + for iNdEx := len(x.Relayers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Relayers[iNdEx]) + copy(dAtA[i:], x.Relayers[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Relayers[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + i-- + dAtA[i] = 0x1a + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x12 + } + if len(x.Title) > 0 { + i -= len(x.Title) + copy(dAtA[i:], x.Title) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*RegisterRelayerProposal) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RegisterRelayerProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RegisterRelayerProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relayers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Relayers = append(x.Relayers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_Height protoreflect.MessageDescriptor + fd_Height_revision_number protoreflect.FieldDescriptor + fd_Height_revision_height protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_client_proto_init() + md_Height = File_tibc_core_client_v1_client_proto.Messages().ByName("Height") + fd_Height_revision_number = md_Height.Fields().ByName("revision_number") + fd_Height_revision_height = md_Height.Fields().ByName("revision_height") +} + +var _ protoreflect.Message = (*fastReflection_Height)(nil) + +type fastReflection_Height Height + +func (x *Height) ProtoReflect() protoreflect.Message { + return (*fastReflection_Height)(x) +} + +func (x *Height) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_client_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Height_messageType fastReflection_Height_messageType +var _ protoreflect.MessageType = fastReflection_Height_messageType{} + +type fastReflection_Height_messageType struct{} + +func (x fastReflection_Height_messageType) Zero() protoreflect.Message { + return (*fastReflection_Height)(nil) +} +func (x fastReflection_Height_messageType) New() protoreflect.Message { + return new(fastReflection_Height) +} +func (x fastReflection_Height_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Height +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Height) Descriptor() protoreflect.MessageDescriptor { + return md_Height +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Height) Type() protoreflect.MessageType { + return _fastReflection_Height_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Height) New() protoreflect.Message { + return new(fastReflection_Height) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Height) Interface() protoreflect.ProtoMessage { + return (*Height)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Height) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.RevisionNumber != uint64(0) { + value := protoreflect.ValueOfUint64(x.RevisionNumber) + if !f(fd_Height_revision_number, value) { + return + } + } + if x.RevisionHeight != uint64(0) { + value := protoreflect.ValueOfUint64(x.RevisionHeight) + if !f(fd_Height_revision_height, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Height) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.Height.revision_number": + return x.RevisionNumber != uint64(0) + case "tibc.core.client.v1.Height.revision_height": + return x.RevisionHeight != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.Height")) + } + panic(fmt.Errorf("message tibc.core.client.v1.Height does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Height) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.Height.revision_number": + x.RevisionNumber = uint64(0) + case "tibc.core.client.v1.Height.revision_height": + x.RevisionHeight = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.Height")) + } + panic(fmt.Errorf("message tibc.core.client.v1.Height does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Height) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.Height.revision_number": + value := x.RevisionNumber + return protoreflect.ValueOfUint64(value) + case "tibc.core.client.v1.Height.revision_height": + value := x.RevisionHeight + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.Height")) + } + panic(fmt.Errorf("message tibc.core.client.v1.Height does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Height) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.Height.revision_number": + x.RevisionNumber = value.Uint() + case "tibc.core.client.v1.Height.revision_height": + x.RevisionHeight = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.Height")) + } + panic(fmt.Errorf("message tibc.core.client.v1.Height does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Height) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.Height.revision_number": + panic(fmt.Errorf("field revision_number of message tibc.core.client.v1.Height is not mutable")) + case "tibc.core.client.v1.Height.revision_height": + panic(fmt.Errorf("field revision_height of message tibc.core.client.v1.Height is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.Height")) + } + panic(fmt.Errorf("message tibc.core.client.v1.Height does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Height) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.Height.revision_number": + return protoreflect.ValueOfUint64(uint64(0)) + case "tibc.core.client.v1.Height.revision_height": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.Height")) + } + panic(fmt.Errorf("message tibc.core.client.v1.Height does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Height) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.Height", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Height) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Height) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Height) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Height) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Height) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.RevisionNumber != 0 { + n += 1 + runtime.Sov(uint64(x.RevisionNumber)) + } + if x.RevisionHeight != 0 { + n += 1 + runtime.Sov(uint64(x.RevisionHeight)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Height) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.RevisionHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.RevisionHeight)) + i-- + dAtA[i] = 0x10 + } + if x.RevisionNumber != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.RevisionNumber)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Height) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Height: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Height: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RevisionNumber", wireType) + } + x.RevisionNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.RevisionNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RevisionHeight", wireType) + } + x.RevisionHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.RevisionHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: tibc/core/client/v1/client.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// IdentifiedClientState defines a client state with an additional client +// identifier field. +type IdentifiedClientState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // client identifier + ChainName string `protobuf:"bytes,1,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + // client state + ClientState *anypb.Any `protobuf:"bytes,2,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty"` +} + +func (x *IdentifiedClientState) Reset() { + *x = IdentifiedClientState{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_client_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IdentifiedClientState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdentifiedClientState) ProtoMessage() {} + +// Deprecated: Use IdentifiedClientState.ProtoReflect.Descriptor instead. +func (*IdentifiedClientState) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_client_proto_rawDescGZIP(), []int{0} +} + +func (x *IdentifiedClientState) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +func (x *IdentifiedClientState) GetClientState() *anypb.Any { + if x != nil { + return x.ClientState + } + return nil +} + +// IdentifiedRelayer defines a list of authorized relayers for the specified +// client. +type IdentifiedRelayers struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // client identifier + ChainName string `protobuf:"bytes,1,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + // authorized relayer list + Relayers []string `protobuf:"bytes,2,rep,name=relayers,proto3" json:"relayers,omitempty"` +} + +func (x *IdentifiedRelayers) Reset() { + *x = IdentifiedRelayers{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_client_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IdentifiedRelayers) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdentifiedRelayers) ProtoMessage() {} + +// Deprecated: Use IdentifiedRelayers.ProtoReflect.Descriptor instead. +func (*IdentifiedRelayers) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_client_proto_rawDescGZIP(), []int{1} +} + +func (x *IdentifiedRelayers) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +func (x *IdentifiedRelayers) GetRelayers() []string { + if x != nil { + return x.Relayers + } + return nil +} + +// ConsensusStateWithHeight defines a consensus state with an additional height +// field. +type ConsensusStateWithHeight struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // consensus state height + Height *Height `protobuf:"bytes,1,opt,name=height,proto3" json:"height,omitempty"` + // consensus state + ConsensusState *anypb.Any `protobuf:"bytes,2,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty"` +} + +func (x *ConsensusStateWithHeight) Reset() { + *x = ConsensusStateWithHeight{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_client_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConsensusStateWithHeight) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConsensusStateWithHeight) ProtoMessage() {} + +// Deprecated: Use ConsensusStateWithHeight.ProtoReflect.Descriptor instead. +func (*ConsensusStateWithHeight) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_client_proto_rawDescGZIP(), []int{2} +} + +func (x *ConsensusStateWithHeight) GetHeight() *Height { + if x != nil { + return x.Height + } + return nil +} + +func (x *ConsensusStateWithHeight) GetConsensusState() *anypb.Any { + if x != nil { + return x.ConsensusState + } + return nil +} + +// ClientConsensusStates defines all the stored consensus states for a given +// client. +type ClientConsensusStates struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // client identifier + ChainName string `protobuf:"bytes,1,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + // consensus states and their heights associated with the client + ConsensusStates []*ConsensusStateWithHeight `protobuf:"bytes,2,rep,name=consensus_states,json=consensusStates,proto3" json:"consensus_states,omitempty"` +} + +func (x *ClientConsensusStates) Reset() { + *x = ClientConsensusStates{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_client_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientConsensusStates) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientConsensusStates) ProtoMessage() {} + +// Deprecated: Use ClientConsensusStates.ProtoReflect.Descriptor instead. +func (*ClientConsensusStates) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_client_proto_rawDescGZIP(), []int{3} +} + +func (x *ClientConsensusStates) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +func (x *ClientConsensusStates) GetConsensusStates() []*ConsensusStateWithHeight { + if x != nil { + return x.ConsensusStates + } + return nil +} + +// CreateClientProposal defines a overnance proposal to create an TIBC client +type CreateClientProposal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the title of the update proposal + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // the description of the proposal + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // the client identifier for the client to be updated if the proposal passes + ChainName string `protobuf:"bytes,3,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + // light client state + ClientState *anypb.Any `protobuf:"bytes,4,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty"` + // consensus state associated with the client that corresponds to a given + // height. + ConsensusState *anypb.Any `protobuf:"bytes,5,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty"` +} + +func (x *CreateClientProposal) Reset() { + *x = CreateClientProposal{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_client_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateClientProposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateClientProposal) ProtoMessage() {} + +// Deprecated: Use CreateClientProposal.ProtoReflect.Descriptor instead. +func (*CreateClientProposal) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_client_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateClientProposal) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *CreateClientProposal) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *CreateClientProposal) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +func (x *CreateClientProposal) GetClientState() *anypb.Any { + if x != nil { + return x.ClientState + } + return nil +} + +func (x *CreateClientProposal) GetConsensusState() *anypb.Any { + if x != nil { + return x.ConsensusState + } + return nil +} + +// UpgradeClientProposal defines a overnance proposal to overide an TIBC client +// state +type UpgradeClientProposal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the title of the update proposal + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // the description of the proposal + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // the client identifier for the client to be updated if the proposal passes + ChainName string `protobuf:"bytes,3,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + // client state + ClientState *anypb.Any `protobuf:"bytes,4,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty"` + // consensus state + ConsensusState *anypb.Any `protobuf:"bytes,5,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty"` +} + +func (x *UpgradeClientProposal) Reset() { + *x = UpgradeClientProposal{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_client_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpgradeClientProposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpgradeClientProposal) ProtoMessage() {} + +// Deprecated: Use UpgradeClientProposal.ProtoReflect.Descriptor instead. +func (*UpgradeClientProposal) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_client_proto_rawDescGZIP(), []int{5} +} + +func (x *UpgradeClientProposal) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *UpgradeClientProposal) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *UpgradeClientProposal) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +func (x *UpgradeClientProposal) GetClientState() *anypb.Any { + if x != nil { + return x.ClientState + } + return nil +} + +func (x *UpgradeClientProposal) GetConsensusState() *anypb.Any { + if x != nil { + return x.ConsensusState + } + return nil +} + +// RegisterRelayerProposal defines a overnance proposal to register some +// relayers for updating a client state. +type RegisterRelayerProposal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the title of the update proposal + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // the description of the proposal + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // the client identifier for the client to be updated if the proposal passes + ChainName string `protobuf:"bytes,3,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + // relayer address list + Relayers []string `protobuf:"bytes,4,rep,name=relayers,proto3" json:"relayers,omitempty"` +} + +func (x *RegisterRelayerProposal) Reset() { + *x = RegisterRelayerProposal{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_client_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterRelayerProposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterRelayerProposal) ProtoMessage() {} + +// Deprecated: Use RegisterRelayerProposal.ProtoReflect.Descriptor instead. +func (*RegisterRelayerProposal) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_client_proto_rawDescGZIP(), []int{6} +} + +func (x *RegisterRelayerProposal) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *RegisterRelayerProposal) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *RegisterRelayerProposal) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +func (x *RegisterRelayerProposal) GetRelayers() []string { + if x != nil { + return x.Relayers + } + return nil +} + +// Height is a monotonically increasing data type +// that can be compared against another Height for the purposes of updating and +// freezing clients +// +// Normally the RevisionHeight is incremented at each height while keeping +// RevisionNumber the same. However some consensus algorithms may choose to +// reset the height in certain conditions e.g. hard forks, state-machine +// breaking changes In these cases, the RevisionNumber is incremented so that +// height continues to be monitonically increasing even as the RevisionHeight +// gets reset +type Height struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the revision that the client is currently on + RevisionNumber uint64 `protobuf:"varint,1,opt,name=revision_number,json=revisionNumber,proto3" json:"revision_number,omitempty"` + // the height within the given revision + RevisionHeight uint64 `protobuf:"varint,2,opt,name=revision_height,json=revisionHeight,proto3" json:"revision_height,omitempty"` +} + +func (x *Height) Reset() { + *x = Height{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_client_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Height) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Height) ProtoMessage() {} + +// Deprecated: Use Height.ProtoReflect.Descriptor instead. +func (*Height) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_client_proto_rawDescGZIP(), []int{7} +} + +func (x *Height) GetRevisionNumber() uint64 { + if x != nil { + return x.RevisionNumber + } + return 0 +} + +func (x *Height) GetRevisionHeight() uint64 { + if x != nil { + return x.RevisionHeight + } + return 0 +} + +var File_tibc_core_client_v1_client_proto protoreflect.FileDescriptor + +var file_tibc_core_client_v1_client_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x13, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, + 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6f, 0x0a, 0x15, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x37, 0x0a, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x4f, 0x0a, 0x12, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, + 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x18, 0x43, + 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x57, 0x69, 0x74, + 0x68, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x12, 0x3d, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x22, 0x96, 0x01, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x5e, 0x0a, 0x10, 0x63, 0x6f, + 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x22, 0xeb, 0x01, 0x0a, 0x14, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x3d, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, + 0x6e, 0x79, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0xec, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x3d, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0x92, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0x9c, 0x01, 0x0a, + 0x06, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x43, 0x0a, 0x0f, 0x72, 0x65, 0x76, 0x69, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x42, 0x1a, 0xf2, 0xde, 0x1f, 0x16, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x72, 0x65, 0x76, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x52, 0x0e, 0x72, 0x65, + 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0f, + 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x1a, 0xf2, 0xde, 0x1f, 0x16, 0x79, 0x61, 0x6d, 0x6c, 0x3a, + 0x22, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x22, 0x52, 0x0e, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x3a, 0x08, 0x88, 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x00, 0x42, 0xd4, 0x01, 0x0a, 0x17, + 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x62, 0x69, 0x61, 0x6e, 0x6a, 0x69, 0x65, 0x61, 0x69, 0x2f, 0x74, 0x69, 0x62, + 0x63, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x43, 0x43, 0xaa, 0x02, 0x13, 0x54, 0x69, + 0x62, 0x63, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x13, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x43, + 0x6f, 0x72, 0x65, 0x5c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x54, 0x69, 0x62, 0x63, + 0x3a, 0x3a, 0x43, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tibc_core_client_v1_client_proto_rawDescOnce sync.Once + file_tibc_core_client_v1_client_proto_rawDescData = file_tibc_core_client_v1_client_proto_rawDesc +) + +func file_tibc_core_client_v1_client_proto_rawDescGZIP() []byte { + file_tibc_core_client_v1_client_proto_rawDescOnce.Do(func() { + file_tibc_core_client_v1_client_proto_rawDescData = protoimpl.X.CompressGZIP(file_tibc_core_client_v1_client_proto_rawDescData) + }) + return file_tibc_core_client_v1_client_proto_rawDescData +} + +var file_tibc_core_client_v1_client_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_tibc_core_client_v1_client_proto_goTypes = []interface{}{ + (*IdentifiedClientState)(nil), // 0: tibc.core.client.v1.IdentifiedClientState + (*IdentifiedRelayers)(nil), // 1: tibc.core.client.v1.IdentifiedRelayers + (*ConsensusStateWithHeight)(nil), // 2: tibc.core.client.v1.ConsensusStateWithHeight + (*ClientConsensusStates)(nil), // 3: tibc.core.client.v1.ClientConsensusStates + (*CreateClientProposal)(nil), // 4: tibc.core.client.v1.CreateClientProposal + (*UpgradeClientProposal)(nil), // 5: tibc.core.client.v1.UpgradeClientProposal + (*RegisterRelayerProposal)(nil), // 6: tibc.core.client.v1.RegisterRelayerProposal + (*Height)(nil), // 7: tibc.core.client.v1.Height + (*anypb.Any)(nil), // 8: google.protobuf.Any +} +var file_tibc_core_client_v1_client_proto_depIdxs = []int32{ + 8, // 0: tibc.core.client.v1.IdentifiedClientState.client_state:type_name -> google.protobuf.Any + 7, // 1: tibc.core.client.v1.ConsensusStateWithHeight.height:type_name -> tibc.core.client.v1.Height + 8, // 2: tibc.core.client.v1.ConsensusStateWithHeight.consensus_state:type_name -> google.protobuf.Any + 2, // 3: tibc.core.client.v1.ClientConsensusStates.consensus_states:type_name -> tibc.core.client.v1.ConsensusStateWithHeight + 8, // 4: tibc.core.client.v1.CreateClientProposal.client_state:type_name -> google.protobuf.Any + 8, // 5: tibc.core.client.v1.CreateClientProposal.consensus_state:type_name -> google.protobuf.Any + 8, // 6: tibc.core.client.v1.UpgradeClientProposal.client_state:type_name -> google.protobuf.Any + 8, // 7: tibc.core.client.v1.UpgradeClientProposal.consensus_state:type_name -> google.protobuf.Any + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_tibc_core_client_v1_client_proto_init() } +func file_tibc_core_client_v1_client_proto_init() { + if File_tibc_core_client_v1_client_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_tibc_core_client_v1_client_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IdentifiedClientState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_client_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IdentifiedRelayers); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_client_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConsensusStateWithHeight); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_client_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientConsensusStates); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_client_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateClientProposal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_client_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpgradeClientProposal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_client_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterRelayerProposal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_client_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Height); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_tibc_core_client_v1_client_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_tibc_core_client_v1_client_proto_goTypes, + DependencyIndexes: file_tibc_core_client_v1_client_proto_depIdxs, + MessageInfos: file_tibc_core_client_v1_client_proto_msgTypes, + }.Build() + File_tibc_core_client_v1_client_proto = out.File + file_tibc_core_client_v1_client_proto_rawDesc = nil + file_tibc_core_client_v1_client_proto_goTypes = nil + file_tibc_core_client_v1_client_proto_depIdxs = nil +} diff --git a/api/tibc/core/client/v1/genesis.pulsar.go b/api/tibc/core/client/v1/genesis.pulsar.go new file mode 100644 index 00000000..ad8aa9fa --- /dev/null +++ b/api/tibc/core/client/v1/genesis.pulsar.go @@ -0,0 +1,2376 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package clientv1 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_GenesisState_1_list)(nil) + +type _GenesisState_1_list struct { + list *[]*IdentifiedClientState +} + +func (x *_GenesisState_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*IdentifiedClientState) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*IdentifiedClientState) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_1_list) AppendMutable() protoreflect.Value { + v := new(IdentifiedClientState) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_1_list) NewElement() protoreflect.Value { + v := new(IdentifiedClientState) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_1_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_2_list)(nil) + +type _GenesisState_2_list struct { + list *[]*ClientConsensusStates +} + +func (x *_GenesisState_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ClientConsensusStates) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ClientConsensusStates) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { + v := new(ClientConsensusStates) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_2_list) NewElement() protoreflect.Value { + v := new(ClientConsensusStates) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_3_list)(nil) + +type _GenesisState_3_list struct { + list *[]*IdentifiedGenesisMetadata +} + +func (x *_GenesisState_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*IdentifiedGenesisMetadata) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*IdentifiedGenesisMetadata) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { + v := new(IdentifiedGenesisMetadata) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_3_list) NewElement() protoreflect.Value { + v := new(IdentifiedGenesisMetadata) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_6_list)(nil) + +type _GenesisState_6_list struct { + list *[]*IdentifiedRelayers +} + +func (x *_GenesisState_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*IdentifiedRelayers) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*IdentifiedRelayers) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_6_list) AppendMutable() protoreflect.Value { + v := new(IdentifiedRelayers) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_6_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_6_list) NewElement() protoreflect.Value { + v := new(IdentifiedRelayers) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_6_list) IsValid() bool { + return x.list != nil +} + +var ( + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_clients protoreflect.FieldDescriptor + fd_GenesisState_clients_consensus protoreflect.FieldDescriptor + fd_GenesisState_clients_metadata protoreflect.FieldDescriptor + fd_GenesisState_native_chain_name protoreflect.FieldDescriptor + fd_GenesisState_relayers protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_genesis_proto_init() + md_GenesisState = File_tibc_core_client_v1_genesis_proto.Messages().ByName("GenesisState") + fd_GenesisState_clients = md_GenesisState.Fields().ByName("clients") + fd_GenesisState_clients_consensus = md_GenesisState.Fields().ByName("clients_consensus") + fd_GenesisState_clients_metadata = md_GenesisState.Fields().ByName("clients_metadata") + fd_GenesisState_native_chain_name = md_GenesisState.Fields().ByName("native_chain_name") + fd_GenesisState_relayers = md_GenesisState.Fields().ByName("relayers") +} + +var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) + +type fastReflection_GenesisState GenesisState + +func (x *GenesisState) ProtoReflect() protoreflect.Message { + return (*fastReflection_GenesisState)(x) +} + +func (x *GenesisState) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_genesis_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType +var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} + +type fastReflection_GenesisState_messageType struct{} + +func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { + return (*fastReflection_GenesisState)(nil) +} +func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} +func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { + return _fastReflection_GenesisState_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GenesisState) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { + return (*GenesisState)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Clients) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_1_list{list: &x.Clients}) + if !f(fd_GenesisState_clients, value) { + return + } + } + if len(x.ClientsConsensus) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.ClientsConsensus}) + if !f(fd_GenesisState_clients_consensus, value) { + return + } + } + if len(x.ClientsMetadata) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.ClientsMetadata}) + if !f(fd_GenesisState_clients_metadata, value) { + return + } + } + if x.NativeChainName != "" { + value := protoreflect.ValueOfString(x.NativeChainName) + if !f(fd_GenesisState_native_chain_name, value) { + return + } + } + if len(x.Relayers) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_6_list{list: &x.Relayers}) + if !f(fd_GenesisState_relayers, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.GenesisState.clients": + return len(x.Clients) != 0 + case "tibc.core.client.v1.GenesisState.clients_consensus": + return len(x.ClientsConsensus) != 0 + case "tibc.core.client.v1.GenesisState.clients_metadata": + return len(x.ClientsMetadata) != 0 + case "tibc.core.client.v1.GenesisState.native_chain_name": + return x.NativeChainName != "" + case "tibc.core.client.v1.GenesisState.relayers": + return len(x.Relayers) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.client.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.GenesisState.clients": + x.Clients = nil + case "tibc.core.client.v1.GenesisState.clients_consensus": + x.ClientsConsensus = nil + case "tibc.core.client.v1.GenesisState.clients_metadata": + x.ClientsMetadata = nil + case "tibc.core.client.v1.GenesisState.native_chain_name": + x.NativeChainName = "" + case "tibc.core.client.v1.GenesisState.relayers": + x.Relayers = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.client.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.GenesisState.clients": + if len(x.Clients) == 0 { + return protoreflect.ValueOfList(&_GenesisState_1_list{}) + } + listValue := &_GenesisState_1_list{list: &x.Clients} + return protoreflect.ValueOfList(listValue) + case "tibc.core.client.v1.GenesisState.clients_consensus": + if len(x.ClientsConsensus) == 0 { + return protoreflect.ValueOfList(&_GenesisState_2_list{}) + } + listValue := &_GenesisState_2_list{list: &x.ClientsConsensus} + return protoreflect.ValueOfList(listValue) + case "tibc.core.client.v1.GenesisState.clients_metadata": + if len(x.ClientsMetadata) == 0 { + return protoreflect.ValueOfList(&_GenesisState_3_list{}) + } + listValue := &_GenesisState_3_list{list: &x.ClientsMetadata} + return protoreflect.ValueOfList(listValue) + case "tibc.core.client.v1.GenesisState.native_chain_name": + value := x.NativeChainName + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.GenesisState.relayers": + if len(x.Relayers) == 0 { + return protoreflect.ValueOfList(&_GenesisState_6_list{}) + } + listValue := &_GenesisState_6_list{list: &x.Relayers} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.client.v1.GenesisState does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.GenesisState.clients": + lv := value.List() + clv := lv.(*_GenesisState_1_list) + x.Clients = *clv.list + case "tibc.core.client.v1.GenesisState.clients_consensus": + lv := value.List() + clv := lv.(*_GenesisState_2_list) + x.ClientsConsensus = *clv.list + case "tibc.core.client.v1.GenesisState.clients_metadata": + lv := value.List() + clv := lv.(*_GenesisState_3_list) + x.ClientsMetadata = *clv.list + case "tibc.core.client.v1.GenesisState.native_chain_name": + x.NativeChainName = value.Interface().(string) + case "tibc.core.client.v1.GenesisState.relayers": + lv := value.List() + clv := lv.(*_GenesisState_6_list) + x.Relayers = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.client.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.GenesisState.clients": + if x.Clients == nil { + x.Clients = []*IdentifiedClientState{} + } + value := &_GenesisState_1_list{list: &x.Clients} + return protoreflect.ValueOfList(value) + case "tibc.core.client.v1.GenesisState.clients_consensus": + if x.ClientsConsensus == nil { + x.ClientsConsensus = []*ClientConsensusStates{} + } + value := &_GenesisState_2_list{list: &x.ClientsConsensus} + return protoreflect.ValueOfList(value) + case "tibc.core.client.v1.GenesisState.clients_metadata": + if x.ClientsMetadata == nil { + x.ClientsMetadata = []*IdentifiedGenesisMetadata{} + } + value := &_GenesisState_3_list{list: &x.ClientsMetadata} + return protoreflect.ValueOfList(value) + case "tibc.core.client.v1.GenesisState.relayers": + if x.Relayers == nil { + x.Relayers = []*IdentifiedRelayers{} + } + value := &_GenesisState_6_list{list: &x.Relayers} + return protoreflect.ValueOfList(value) + case "tibc.core.client.v1.GenesisState.native_chain_name": + panic(fmt.Errorf("field native_chain_name of message tibc.core.client.v1.GenesisState is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.client.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.GenesisState.clients": + list := []*IdentifiedClientState{} + return protoreflect.ValueOfList(&_GenesisState_1_list{list: &list}) + case "tibc.core.client.v1.GenesisState.clients_consensus": + list := []*ClientConsensusStates{} + return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) + case "tibc.core.client.v1.GenesisState.clients_metadata": + list := []*IdentifiedGenesisMetadata{} + return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) + case "tibc.core.client.v1.GenesisState.native_chain_name": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.GenesisState.relayers": + list := []*IdentifiedRelayers{} + return protoreflect.ValueOfList(&_GenesisState_6_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.client.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.GenesisState", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_GenesisState) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Clients) > 0 { + for _, e := range x.Clients { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.ClientsConsensus) > 0 { + for _, e := range x.ClientsConsensus { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.ClientsMetadata) > 0 { + for _, e := range x.ClientsMetadata { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.NativeChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Relayers) > 0 { + for _, e := range x.Relayers { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Relayers) > 0 { + for iNdEx := len(x.Relayers) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Relayers[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x32 + } + } + if len(x.NativeChainName) > 0 { + i -= len(x.NativeChainName) + copy(dAtA[i:], x.NativeChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NativeChainName))) + i-- + dAtA[i] = 0x2a + } + if len(x.ClientsMetadata) > 0 { + for iNdEx := len(x.ClientsMetadata) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ClientsMetadata[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.ClientsConsensus) > 0 { + for iNdEx := len(x.ClientsConsensus) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ClientsConsensus[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Clients) > 0 { + for iNdEx := len(x.Clients) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Clients[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Clients", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Clients = append(x.Clients, &IdentifiedClientState{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Clients[len(x.Clients)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClientsConsensus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ClientsConsensus = append(x.ClientsConsensus, &ClientConsensusStates{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ClientsConsensus[len(x.ClientsConsensus)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClientsMetadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ClientsMetadata = append(x.ClientsMetadata, &IdentifiedGenesisMetadata{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ClientsMetadata[len(x.ClientsMetadata)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NativeChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.NativeChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relayers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Relayers = append(x.Relayers, &IdentifiedRelayers{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Relayers[len(x.Relayers)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_GenesisMetadata protoreflect.MessageDescriptor + fd_GenesisMetadata_key protoreflect.FieldDescriptor + fd_GenesisMetadata_value protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_genesis_proto_init() + md_GenesisMetadata = File_tibc_core_client_v1_genesis_proto.Messages().ByName("GenesisMetadata") + fd_GenesisMetadata_key = md_GenesisMetadata.Fields().ByName("key") + fd_GenesisMetadata_value = md_GenesisMetadata.Fields().ByName("value") +} + +var _ protoreflect.Message = (*fastReflection_GenesisMetadata)(nil) + +type fastReflection_GenesisMetadata GenesisMetadata + +func (x *GenesisMetadata) ProtoReflect() protoreflect.Message { + return (*fastReflection_GenesisMetadata)(x) +} + +func (x *GenesisMetadata) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_genesis_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_GenesisMetadata_messageType fastReflection_GenesisMetadata_messageType +var _ protoreflect.MessageType = fastReflection_GenesisMetadata_messageType{} + +type fastReflection_GenesisMetadata_messageType struct{} + +func (x fastReflection_GenesisMetadata_messageType) Zero() protoreflect.Message { + return (*fastReflection_GenesisMetadata)(nil) +} +func (x fastReflection_GenesisMetadata_messageType) New() protoreflect.Message { + return new(fastReflection_GenesisMetadata) +} +func (x fastReflection_GenesisMetadata_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisMetadata +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GenesisMetadata) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisMetadata +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_GenesisMetadata) Type() protoreflect.MessageType { + return _fastReflection_GenesisMetadata_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GenesisMetadata) New() protoreflect.Message { + return new(fastReflection_GenesisMetadata) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GenesisMetadata) Interface() protoreflect.ProtoMessage { + return (*GenesisMetadata)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_GenesisMetadata) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Key) != 0 { + value := protoreflect.ValueOfBytes(x.Key) + if !f(fd_GenesisMetadata_key, value) { + return + } + } + if len(x.Value) != 0 { + value := protoreflect.ValueOfBytes(x.Value) + if !f(fd_GenesisMetadata_value, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_GenesisMetadata) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.GenesisMetadata.key": + return len(x.Key) != 0 + case "tibc.core.client.v1.GenesisMetadata.value": + return len(x.Value) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.GenesisMetadata")) + } + panic(fmt.Errorf("message tibc.core.client.v1.GenesisMetadata does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisMetadata) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.GenesisMetadata.key": + x.Key = nil + case "tibc.core.client.v1.GenesisMetadata.value": + x.Value = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.GenesisMetadata")) + } + panic(fmt.Errorf("message tibc.core.client.v1.GenesisMetadata does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_GenesisMetadata) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.GenesisMetadata.key": + value := x.Key + return protoreflect.ValueOfBytes(value) + case "tibc.core.client.v1.GenesisMetadata.value": + value := x.Value + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.GenesisMetadata")) + } + panic(fmt.Errorf("message tibc.core.client.v1.GenesisMetadata does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisMetadata) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.GenesisMetadata.key": + x.Key = value.Bytes() + case "tibc.core.client.v1.GenesisMetadata.value": + x.Value = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.GenesisMetadata")) + } + panic(fmt.Errorf("message tibc.core.client.v1.GenesisMetadata does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisMetadata) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.GenesisMetadata.key": + panic(fmt.Errorf("field key of message tibc.core.client.v1.GenesisMetadata is not mutable")) + case "tibc.core.client.v1.GenesisMetadata.value": + panic(fmt.Errorf("field value of message tibc.core.client.v1.GenesisMetadata is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.GenesisMetadata")) + } + panic(fmt.Errorf("message tibc.core.client.v1.GenesisMetadata does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_GenesisMetadata) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.GenesisMetadata.key": + return protoreflect.ValueOfBytes(nil) + case "tibc.core.client.v1.GenesisMetadata.value": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.GenesisMetadata")) + } + panic(fmt.Errorf("message tibc.core.client.v1.GenesisMetadata does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_GenesisMetadata) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.GenesisMetadata", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_GenesisMetadata) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisMetadata) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_GenesisMetadata) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_GenesisMetadata) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GenesisMetadata) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Key) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Value) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*GenesisMetadata) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Value) > 0 { + i -= len(x.Value) + copy(dAtA[i:], x.Value) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) + i-- + dAtA[i] = 0x12 + } + if len(x.Key) > 0 { + i -= len(x.Key) + copy(dAtA[i:], x.Key) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*GenesisMetadata) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) + if x.Key == nil { + x.Key = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Value = append(x.Value[:0], dAtA[iNdEx:postIndex]...) + if x.Value == nil { + x.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_IdentifiedGenesisMetadata_2_list)(nil) + +type _IdentifiedGenesisMetadata_2_list struct { + list *[]*GenesisMetadata +} + +func (x *_IdentifiedGenesisMetadata_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_IdentifiedGenesisMetadata_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_IdentifiedGenesisMetadata_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*GenesisMetadata) + (*x.list)[i] = concreteValue +} + +func (x *_IdentifiedGenesisMetadata_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*GenesisMetadata) + *x.list = append(*x.list, concreteValue) +} + +func (x *_IdentifiedGenesisMetadata_2_list) AppendMutable() protoreflect.Value { + v := new(GenesisMetadata) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_IdentifiedGenesisMetadata_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_IdentifiedGenesisMetadata_2_list) NewElement() protoreflect.Value { + v := new(GenesisMetadata) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_IdentifiedGenesisMetadata_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_IdentifiedGenesisMetadata protoreflect.MessageDescriptor + fd_IdentifiedGenesisMetadata_chain_name protoreflect.FieldDescriptor + fd_IdentifiedGenesisMetadata_metadata protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_genesis_proto_init() + md_IdentifiedGenesisMetadata = File_tibc_core_client_v1_genesis_proto.Messages().ByName("IdentifiedGenesisMetadata") + fd_IdentifiedGenesisMetadata_chain_name = md_IdentifiedGenesisMetadata.Fields().ByName("chain_name") + fd_IdentifiedGenesisMetadata_metadata = md_IdentifiedGenesisMetadata.Fields().ByName("metadata") +} + +var _ protoreflect.Message = (*fastReflection_IdentifiedGenesisMetadata)(nil) + +type fastReflection_IdentifiedGenesisMetadata IdentifiedGenesisMetadata + +func (x *IdentifiedGenesisMetadata) ProtoReflect() protoreflect.Message { + return (*fastReflection_IdentifiedGenesisMetadata)(x) +} + +func (x *IdentifiedGenesisMetadata) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_genesis_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_IdentifiedGenesisMetadata_messageType fastReflection_IdentifiedGenesisMetadata_messageType +var _ protoreflect.MessageType = fastReflection_IdentifiedGenesisMetadata_messageType{} + +type fastReflection_IdentifiedGenesisMetadata_messageType struct{} + +func (x fastReflection_IdentifiedGenesisMetadata_messageType) Zero() protoreflect.Message { + return (*fastReflection_IdentifiedGenesisMetadata)(nil) +} +func (x fastReflection_IdentifiedGenesisMetadata_messageType) New() protoreflect.Message { + return new(fastReflection_IdentifiedGenesisMetadata) +} +func (x fastReflection_IdentifiedGenesisMetadata_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_IdentifiedGenesisMetadata +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_IdentifiedGenesisMetadata) Descriptor() protoreflect.MessageDescriptor { + return md_IdentifiedGenesisMetadata +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_IdentifiedGenesisMetadata) Type() protoreflect.MessageType { + return _fastReflection_IdentifiedGenesisMetadata_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_IdentifiedGenesisMetadata) New() protoreflect.Message { + return new(fastReflection_IdentifiedGenesisMetadata) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_IdentifiedGenesisMetadata) Interface() protoreflect.ProtoMessage { + return (*IdentifiedGenesisMetadata)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_IdentifiedGenesisMetadata) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_IdentifiedGenesisMetadata_chain_name, value) { + return + } + } + if len(x.Metadata) != 0 { + value := protoreflect.ValueOfList(&_IdentifiedGenesisMetadata_2_list{list: &x.Metadata}) + if !f(fd_IdentifiedGenesisMetadata_metadata, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_IdentifiedGenesisMetadata) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.IdentifiedGenesisMetadata.chain_name": + return x.ChainName != "" + case "tibc.core.client.v1.IdentifiedGenesisMetadata.metadata": + return len(x.Metadata) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedGenesisMetadata")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedGenesisMetadata does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_IdentifiedGenesisMetadata) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.IdentifiedGenesisMetadata.chain_name": + x.ChainName = "" + case "tibc.core.client.v1.IdentifiedGenesisMetadata.metadata": + x.Metadata = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedGenesisMetadata")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedGenesisMetadata does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_IdentifiedGenesisMetadata) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.IdentifiedGenesisMetadata.chain_name": + value := x.ChainName + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.IdentifiedGenesisMetadata.metadata": + if len(x.Metadata) == 0 { + return protoreflect.ValueOfList(&_IdentifiedGenesisMetadata_2_list{}) + } + listValue := &_IdentifiedGenesisMetadata_2_list{list: &x.Metadata} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedGenesisMetadata")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedGenesisMetadata does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_IdentifiedGenesisMetadata) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.IdentifiedGenesisMetadata.chain_name": + x.ChainName = value.Interface().(string) + case "tibc.core.client.v1.IdentifiedGenesisMetadata.metadata": + lv := value.List() + clv := lv.(*_IdentifiedGenesisMetadata_2_list) + x.Metadata = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedGenesisMetadata")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedGenesisMetadata does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_IdentifiedGenesisMetadata) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.IdentifiedGenesisMetadata.metadata": + if x.Metadata == nil { + x.Metadata = []*GenesisMetadata{} + } + value := &_IdentifiedGenesisMetadata_2_list{list: &x.Metadata} + return protoreflect.ValueOfList(value) + case "tibc.core.client.v1.IdentifiedGenesisMetadata.chain_name": + panic(fmt.Errorf("field chain_name of message tibc.core.client.v1.IdentifiedGenesisMetadata is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedGenesisMetadata")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedGenesisMetadata does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_IdentifiedGenesisMetadata) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.IdentifiedGenesisMetadata.chain_name": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.IdentifiedGenesisMetadata.metadata": + list := []*GenesisMetadata{} + return protoreflect.ValueOfList(&_IdentifiedGenesisMetadata_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.IdentifiedGenesisMetadata")) + } + panic(fmt.Errorf("message tibc.core.client.v1.IdentifiedGenesisMetadata does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_IdentifiedGenesisMetadata) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.IdentifiedGenesisMetadata", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_IdentifiedGenesisMetadata) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_IdentifiedGenesisMetadata) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_IdentifiedGenesisMetadata) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_IdentifiedGenesisMetadata) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*IdentifiedGenesisMetadata) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Metadata) > 0 { + for _, e := range x.Metadata { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*IdentifiedGenesisMetadata) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Metadata) > 0 { + for iNdEx := len(x.Metadata) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Metadata[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*IdentifiedGenesisMetadata) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: IdentifiedGenesisMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: IdentifiedGenesisMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Metadata = append(x.Metadata, &GenesisMetadata{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata[len(x.Metadata)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: tibc/core/client/v1/genesis.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// GenesisState defines the tibc client submodule's genesis state. +type GenesisState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // client states with their corresponding identifiers + Clients []*IdentifiedClientState `protobuf:"bytes,1,rep,name=clients,proto3" json:"clients,omitempty"` + // consensus states from each client + ClientsConsensus []*ClientConsensusStates `protobuf:"bytes,2,rep,name=clients_consensus,json=clientsConsensus,proto3" json:"clients_consensus,omitempty"` + // metadata from each client + ClientsMetadata []*IdentifiedGenesisMetadata `protobuf:"bytes,3,rep,name=clients_metadata,json=clientsMetadata,proto3" json:"clients_metadata,omitempty"` + // the chain name of the current chain + NativeChainName string `protobuf:"bytes,5,opt,name=native_chain_name,json=nativeChainName,proto3" json:"native_chain_name,omitempty"` + // IdentifiedRelayer defines a list of authorized relayers for the specified + // client. + Relayers []*IdentifiedRelayers `protobuf:"bytes,6,rep,name=relayers,proto3" json:"relayers,omitempty"` +} + +func (x *GenesisState) Reset() { + *x = GenesisState{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_genesis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenesisState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenesisState) ProtoMessage() {} + +// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. +func (*GenesisState) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_genesis_proto_rawDescGZIP(), []int{0} +} + +func (x *GenesisState) GetClients() []*IdentifiedClientState { + if x != nil { + return x.Clients + } + return nil +} + +func (x *GenesisState) GetClientsConsensus() []*ClientConsensusStates { + if x != nil { + return x.ClientsConsensus + } + return nil +} + +func (x *GenesisState) GetClientsMetadata() []*IdentifiedGenesisMetadata { + if x != nil { + return x.ClientsMetadata + } + return nil +} + +func (x *GenesisState) GetNativeChainName() string { + if x != nil { + return x.NativeChainName + } + return "" +} + +func (x *GenesisState) GetRelayers() []*IdentifiedRelayers { + if x != nil { + return x.Relayers + } + return nil +} + +// GenesisMetadata defines the genesis type for metadata that clients may return +// with ExportMetadata +type GenesisMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // store key of metadata without chainName-prefix + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // metadata value + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *GenesisMetadata) Reset() { + *x = GenesisMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_genesis_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenesisMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenesisMetadata) ProtoMessage() {} + +// Deprecated: Use GenesisMetadata.ProtoReflect.Descriptor instead. +func (*GenesisMetadata) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_genesis_proto_rawDescGZIP(), []int{1} +} + +func (x *GenesisMetadata) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} + +func (x *GenesisMetadata) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +// IdentifiedGenesisMetadata has the client metadata with the corresponding +// chain name. +type IdentifiedGenesisMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChainName string `protobuf:"bytes,1,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + Metadata []*GenesisMetadata `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (x *IdentifiedGenesisMetadata) Reset() { + *x = IdentifiedGenesisMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_genesis_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IdentifiedGenesisMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdentifiedGenesisMetadata) ProtoMessage() {} + +// Deprecated: Use IdentifiedGenesisMetadata.ProtoReflect.Descriptor instead. +func (*IdentifiedGenesisMetadata) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_genesis_proto_rawDescGZIP(), []int{2} +} + +func (x *IdentifiedGenesisMetadata) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +func (x *IdentifiedGenesisMetadata) GetMetadata() []*GenesisMetadata { + if x != nil { + return x.Metadata + } + return nil +} + +var File_tibc_core_client_v1_genesis_proto protoreflect.FileDescriptor + +var file_tibc_core_client_v1_genesis_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xc5, 0x03, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x64, 0x0a, 0x07, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x1e, + 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x16, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x07, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x77, 0x0a, 0x11, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, + 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x42, 0x1e, + 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x16, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x43, + 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x10, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, + 0x12, 0x5f, 0x0a, 0x10, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x74, 0x69, 0x62, + 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x73, + 0x69, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, + 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x2a, 0x0a, 0x11, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6e, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x49, 0x0a, + 0x08, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, + 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x22, 0x3f, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, + 0x73, 0x69, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0x82, 0x01, 0x0a, 0x19, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x04, + 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0xd5, + 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, + 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x69, 0x61, 0x6e, 0x6a, 0x69, 0x65, 0x61, 0x69, + 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x69, 0x62, + 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, + 0x3b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x43, 0x43, 0xaa, + 0x02, 0x13, 0x54, 0x69, 0x62, 0x63, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, + 0x65, 0x5c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x54, 0x69, + 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, + 0x54, 0x69, 0x62, 0x63, 0x3a, 0x3a, 0x43, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tibc_core_client_v1_genesis_proto_rawDescOnce sync.Once + file_tibc_core_client_v1_genesis_proto_rawDescData = file_tibc_core_client_v1_genesis_proto_rawDesc +) + +func file_tibc_core_client_v1_genesis_proto_rawDescGZIP() []byte { + file_tibc_core_client_v1_genesis_proto_rawDescOnce.Do(func() { + file_tibc_core_client_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_tibc_core_client_v1_genesis_proto_rawDescData) + }) + return file_tibc_core_client_v1_genesis_proto_rawDescData +} + +var file_tibc_core_client_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_tibc_core_client_v1_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: tibc.core.client.v1.GenesisState + (*GenesisMetadata)(nil), // 1: tibc.core.client.v1.GenesisMetadata + (*IdentifiedGenesisMetadata)(nil), // 2: tibc.core.client.v1.IdentifiedGenesisMetadata + (*IdentifiedClientState)(nil), // 3: tibc.core.client.v1.IdentifiedClientState + (*ClientConsensusStates)(nil), // 4: tibc.core.client.v1.ClientConsensusStates + (*IdentifiedRelayers)(nil), // 5: tibc.core.client.v1.IdentifiedRelayers +} +var file_tibc_core_client_v1_genesis_proto_depIdxs = []int32{ + 3, // 0: tibc.core.client.v1.GenesisState.clients:type_name -> tibc.core.client.v1.IdentifiedClientState + 4, // 1: tibc.core.client.v1.GenesisState.clients_consensus:type_name -> tibc.core.client.v1.ClientConsensusStates + 2, // 2: tibc.core.client.v1.GenesisState.clients_metadata:type_name -> tibc.core.client.v1.IdentifiedGenesisMetadata + 5, // 3: tibc.core.client.v1.GenesisState.relayers:type_name -> tibc.core.client.v1.IdentifiedRelayers + 1, // 4: tibc.core.client.v1.IdentifiedGenesisMetadata.metadata:type_name -> tibc.core.client.v1.GenesisMetadata + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_tibc_core_client_v1_genesis_proto_init() } +func file_tibc_core_client_v1_genesis_proto_init() { + if File_tibc_core_client_v1_genesis_proto != nil { + return + } + file_tibc_core_client_v1_client_proto_init() + if !protoimpl.UnsafeEnabled { + file_tibc_core_client_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenesisState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenesisMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_genesis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IdentifiedGenesisMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_tibc_core_client_v1_genesis_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_tibc_core_client_v1_genesis_proto_goTypes, + DependencyIndexes: file_tibc_core_client_v1_genesis_proto_depIdxs, + MessageInfos: file_tibc_core_client_v1_genesis_proto_msgTypes, + }.Build() + File_tibc_core_client_v1_genesis_proto = out.File + file_tibc_core_client_v1_genesis_proto_rawDesc = nil + file_tibc_core_client_v1_genesis_proto_goTypes = nil + file_tibc_core_client_v1_genesis_proto_depIdxs = nil +} diff --git a/api/tibc/core/client/v1/query.pulsar.go b/api/tibc/core/client/v1/query.pulsar.go new file mode 100644 index 00000000..4f4a62b0 --- /dev/null +++ b/api/tibc/core/client/v1/query.pulsar.go @@ -0,0 +1,6015 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package clientv1 + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_QueryClientStateRequest protoreflect.MessageDescriptor + fd_QueryClientStateRequest_chain_name protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_query_proto_init() + md_QueryClientStateRequest = File_tibc_core_client_v1_query_proto.Messages().ByName("QueryClientStateRequest") + fd_QueryClientStateRequest_chain_name = md_QueryClientStateRequest.Fields().ByName("chain_name") +} + +var _ protoreflect.Message = (*fastReflection_QueryClientStateRequest)(nil) + +type fastReflection_QueryClientStateRequest QueryClientStateRequest + +func (x *QueryClientStateRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryClientStateRequest)(x) +} + +func (x *QueryClientStateRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryClientStateRequest_messageType fastReflection_QueryClientStateRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryClientStateRequest_messageType{} + +type fastReflection_QueryClientStateRequest_messageType struct{} + +func (x fastReflection_QueryClientStateRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryClientStateRequest)(nil) +} +func (x fastReflection_QueryClientStateRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryClientStateRequest) +} +func (x fastReflection_QueryClientStateRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryClientStateRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryClientStateRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryClientStateRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryClientStateRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryClientStateRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryClientStateRequest) New() protoreflect.Message { + return new(fastReflection_QueryClientStateRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryClientStateRequest) Interface() protoreflect.ProtoMessage { + return (*QueryClientStateRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryClientStateRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_QueryClientStateRequest_chain_name, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryClientStateRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStateRequest.chain_name": + return x.ChainName != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStateRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStateRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryClientStateRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStateRequest.chain_name": + x.ChainName = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStateRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStateRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryClientStateRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.QueryClientStateRequest.chain_name": + value := x.ChainName + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStateRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStateRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryClientStateRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStateRequest.chain_name": + x.ChainName = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStateRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStateRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryClientStateRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStateRequest.chain_name": + panic(fmt.Errorf("field chain_name of message tibc.core.client.v1.QueryClientStateRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStateRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStateRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryClientStateRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStateRequest.chain_name": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStateRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStateRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryClientStateRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.QueryClientStateRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryClientStateRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryClientStateRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryClientStateRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryClientStateRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryClientStateRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryClientStateRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryClientStateRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryClientStateRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryClientStateRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryClientStateResponse protoreflect.MessageDescriptor + fd_QueryClientStateResponse_client_state protoreflect.FieldDescriptor + fd_QueryClientStateResponse_proof protoreflect.FieldDescriptor + fd_QueryClientStateResponse_proof_height protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_query_proto_init() + md_QueryClientStateResponse = File_tibc_core_client_v1_query_proto.Messages().ByName("QueryClientStateResponse") + fd_QueryClientStateResponse_client_state = md_QueryClientStateResponse.Fields().ByName("client_state") + fd_QueryClientStateResponse_proof = md_QueryClientStateResponse.Fields().ByName("proof") + fd_QueryClientStateResponse_proof_height = md_QueryClientStateResponse.Fields().ByName("proof_height") +} + +var _ protoreflect.Message = (*fastReflection_QueryClientStateResponse)(nil) + +type fastReflection_QueryClientStateResponse QueryClientStateResponse + +func (x *QueryClientStateResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryClientStateResponse)(x) +} + +func (x *QueryClientStateResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryClientStateResponse_messageType fastReflection_QueryClientStateResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryClientStateResponse_messageType{} + +type fastReflection_QueryClientStateResponse_messageType struct{} + +func (x fastReflection_QueryClientStateResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryClientStateResponse)(nil) +} +func (x fastReflection_QueryClientStateResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryClientStateResponse) +} +func (x fastReflection_QueryClientStateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryClientStateResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryClientStateResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryClientStateResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryClientStateResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryClientStateResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryClientStateResponse) New() protoreflect.Message { + return new(fastReflection_QueryClientStateResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryClientStateResponse) Interface() protoreflect.ProtoMessage { + return (*QueryClientStateResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryClientStateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ClientState != nil { + value := protoreflect.ValueOfMessage(x.ClientState.ProtoReflect()) + if !f(fd_QueryClientStateResponse_client_state, value) { + return + } + } + if len(x.Proof) != 0 { + value := protoreflect.ValueOfBytes(x.Proof) + if !f(fd_QueryClientStateResponse_proof, value) { + return + } + } + if x.ProofHeight != nil { + value := protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + if !f(fd_QueryClientStateResponse_proof_height, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryClientStateResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStateResponse.client_state": + return x.ClientState != nil + case "tibc.core.client.v1.QueryClientStateResponse.proof": + return len(x.Proof) != 0 + case "tibc.core.client.v1.QueryClientStateResponse.proof_height": + return x.ProofHeight != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStateResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStateResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryClientStateResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStateResponse.client_state": + x.ClientState = nil + case "tibc.core.client.v1.QueryClientStateResponse.proof": + x.Proof = nil + case "tibc.core.client.v1.QueryClientStateResponse.proof_height": + x.ProofHeight = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStateResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStateResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryClientStateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.QueryClientStateResponse.client_state": + value := x.ClientState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.client.v1.QueryClientStateResponse.proof": + value := x.Proof + return protoreflect.ValueOfBytes(value) + case "tibc.core.client.v1.QueryClientStateResponse.proof_height": + value := x.ProofHeight + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStateResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStateResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryClientStateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStateResponse.client_state": + x.ClientState = value.Message().Interface().(*anypb.Any) + case "tibc.core.client.v1.QueryClientStateResponse.proof": + x.Proof = value.Bytes() + case "tibc.core.client.v1.QueryClientStateResponse.proof_height": + x.ProofHeight = value.Message().Interface().(*Height) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStateResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStateResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryClientStateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStateResponse.client_state": + if x.ClientState == nil { + x.ClientState = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.ClientState.ProtoReflect()) + case "tibc.core.client.v1.QueryClientStateResponse.proof_height": + if x.ProofHeight == nil { + x.ProofHeight = new(Height) + } + return protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + case "tibc.core.client.v1.QueryClientStateResponse.proof": + panic(fmt.Errorf("field proof of message tibc.core.client.v1.QueryClientStateResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStateResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStateResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryClientStateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStateResponse.client_state": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.client.v1.QueryClientStateResponse.proof": + return protoreflect.ValueOfBytes(nil) + case "tibc.core.client.v1.QueryClientStateResponse.proof_height": + m := new(Height) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStateResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStateResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryClientStateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.QueryClientStateResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryClientStateResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryClientStateResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryClientStateResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryClientStateResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryClientStateResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.ClientState != nil { + l = options.Size(x.ClientState) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Proof) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ProofHeight != nil { + l = options.Size(x.ProofHeight) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryClientStateResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ProofHeight != nil { + encoded, err := options.Marshal(x.ProofHeight) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.Proof) > 0 { + i -= len(x.Proof) + copy(dAtA[i:], x.Proof) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Proof))) + i-- + dAtA[i] = 0x12 + } + if x.ClientState != nil { + encoded, err := options.Marshal(x.ClientState) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryClientStateResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryClientStateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryClientStateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClientState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ClientState == nil { + x.ClientState = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ClientState); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Proof = append(x.Proof[:0], dAtA[iNdEx:postIndex]...) + if x.Proof == nil { + x.Proof = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ProofHeight == nil { + x.ProofHeight = &Height{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ProofHeight); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryClientStatesRequest protoreflect.MessageDescriptor + fd_QueryClientStatesRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_query_proto_init() + md_QueryClientStatesRequest = File_tibc_core_client_v1_query_proto.Messages().ByName("QueryClientStatesRequest") + fd_QueryClientStatesRequest_pagination = md_QueryClientStatesRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryClientStatesRequest)(nil) + +type fastReflection_QueryClientStatesRequest QueryClientStatesRequest + +func (x *QueryClientStatesRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryClientStatesRequest)(x) +} + +func (x *QueryClientStatesRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryClientStatesRequest_messageType fastReflection_QueryClientStatesRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryClientStatesRequest_messageType{} + +type fastReflection_QueryClientStatesRequest_messageType struct{} + +func (x fastReflection_QueryClientStatesRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryClientStatesRequest)(nil) +} +func (x fastReflection_QueryClientStatesRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryClientStatesRequest) +} +func (x fastReflection_QueryClientStatesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryClientStatesRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryClientStatesRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryClientStatesRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryClientStatesRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryClientStatesRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryClientStatesRequest) New() protoreflect.Message { + return new(fastReflection_QueryClientStatesRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryClientStatesRequest) Interface() protoreflect.ProtoMessage { + return (*QueryClientStatesRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryClientStatesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryClientStatesRequest_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryClientStatesRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStatesRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStatesRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStatesRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryClientStatesRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStatesRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStatesRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStatesRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryClientStatesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.QueryClientStatesRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStatesRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStatesRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryClientStatesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStatesRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStatesRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStatesRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryClientStatesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStatesRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStatesRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStatesRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryClientStatesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStatesRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStatesRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStatesRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryClientStatesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.QueryClientStatesRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryClientStatesRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryClientStatesRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryClientStatesRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryClientStatesRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryClientStatesRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryClientStatesRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryClientStatesRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryClientStatesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryClientStatesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryClientStatesResponse_1_list)(nil) + +type _QueryClientStatesResponse_1_list struct { + list *[]*IdentifiedClientState +} + +func (x *_QueryClientStatesResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryClientStatesResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryClientStatesResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*IdentifiedClientState) + (*x.list)[i] = concreteValue +} + +func (x *_QueryClientStatesResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*IdentifiedClientState) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryClientStatesResponse_1_list) AppendMutable() protoreflect.Value { + v := new(IdentifiedClientState) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryClientStatesResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryClientStatesResponse_1_list) NewElement() protoreflect.Value { + v := new(IdentifiedClientState) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryClientStatesResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryClientStatesResponse protoreflect.MessageDescriptor + fd_QueryClientStatesResponse_client_states protoreflect.FieldDescriptor + fd_QueryClientStatesResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_query_proto_init() + md_QueryClientStatesResponse = File_tibc_core_client_v1_query_proto.Messages().ByName("QueryClientStatesResponse") + fd_QueryClientStatesResponse_client_states = md_QueryClientStatesResponse.Fields().ByName("client_states") + fd_QueryClientStatesResponse_pagination = md_QueryClientStatesResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryClientStatesResponse)(nil) + +type fastReflection_QueryClientStatesResponse QueryClientStatesResponse + +func (x *QueryClientStatesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryClientStatesResponse)(x) +} + +func (x *QueryClientStatesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryClientStatesResponse_messageType fastReflection_QueryClientStatesResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryClientStatesResponse_messageType{} + +type fastReflection_QueryClientStatesResponse_messageType struct{} + +func (x fastReflection_QueryClientStatesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryClientStatesResponse)(nil) +} +func (x fastReflection_QueryClientStatesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryClientStatesResponse) +} +func (x fastReflection_QueryClientStatesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryClientStatesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryClientStatesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryClientStatesResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryClientStatesResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryClientStatesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryClientStatesResponse) New() protoreflect.Message { + return new(fastReflection_QueryClientStatesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryClientStatesResponse) Interface() protoreflect.ProtoMessage { + return (*QueryClientStatesResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryClientStatesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.ClientStates) != 0 { + value := protoreflect.ValueOfList(&_QueryClientStatesResponse_1_list{list: &x.ClientStates}) + if !f(fd_QueryClientStatesResponse_client_states, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryClientStatesResponse_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryClientStatesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStatesResponse.client_states": + return len(x.ClientStates) != 0 + case "tibc.core.client.v1.QueryClientStatesResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStatesResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStatesResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryClientStatesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStatesResponse.client_states": + x.ClientStates = nil + case "tibc.core.client.v1.QueryClientStatesResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStatesResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStatesResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryClientStatesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.QueryClientStatesResponse.client_states": + if len(x.ClientStates) == 0 { + return protoreflect.ValueOfList(&_QueryClientStatesResponse_1_list{}) + } + listValue := &_QueryClientStatesResponse_1_list{list: &x.ClientStates} + return protoreflect.ValueOfList(listValue) + case "tibc.core.client.v1.QueryClientStatesResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStatesResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStatesResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryClientStatesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStatesResponse.client_states": + lv := value.List() + clv := lv.(*_QueryClientStatesResponse_1_list) + x.ClientStates = *clv.list + case "tibc.core.client.v1.QueryClientStatesResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStatesResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStatesResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryClientStatesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStatesResponse.client_states": + if x.ClientStates == nil { + x.ClientStates = []*IdentifiedClientState{} + } + value := &_QueryClientStatesResponse_1_list{list: &x.ClientStates} + return protoreflect.ValueOfList(value) + case "tibc.core.client.v1.QueryClientStatesResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStatesResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStatesResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryClientStatesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryClientStatesResponse.client_states": + list := []*IdentifiedClientState{} + return protoreflect.ValueOfList(&_QueryClientStatesResponse_1_list{list: &list}) + case "tibc.core.client.v1.QueryClientStatesResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryClientStatesResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryClientStatesResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryClientStatesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.QueryClientStatesResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryClientStatesResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryClientStatesResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryClientStatesResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryClientStatesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryClientStatesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.ClientStates) > 0 { + for _, e := range x.ClientStates { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryClientStatesResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.ClientStates) > 0 { + for iNdEx := len(x.ClientStates) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ClientStates[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryClientStatesResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryClientStatesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryClientStatesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClientStates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ClientStates = append(x.ClientStates, &IdentifiedClientState{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ClientStates[len(x.ClientStates)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryConsensusStateRequest protoreflect.MessageDescriptor + fd_QueryConsensusStateRequest_chain_name protoreflect.FieldDescriptor + fd_QueryConsensusStateRequest_revision_number protoreflect.FieldDescriptor + fd_QueryConsensusStateRequest_revision_height protoreflect.FieldDescriptor + fd_QueryConsensusStateRequest_latest_height protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_query_proto_init() + md_QueryConsensusStateRequest = File_tibc_core_client_v1_query_proto.Messages().ByName("QueryConsensusStateRequest") + fd_QueryConsensusStateRequest_chain_name = md_QueryConsensusStateRequest.Fields().ByName("chain_name") + fd_QueryConsensusStateRequest_revision_number = md_QueryConsensusStateRequest.Fields().ByName("revision_number") + fd_QueryConsensusStateRequest_revision_height = md_QueryConsensusStateRequest.Fields().ByName("revision_height") + fd_QueryConsensusStateRequest_latest_height = md_QueryConsensusStateRequest.Fields().ByName("latest_height") +} + +var _ protoreflect.Message = (*fastReflection_QueryConsensusStateRequest)(nil) + +type fastReflection_QueryConsensusStateRequest QueryConsensusStateRequest + +func (x *QueryConsensusStateRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryConsensusStateRequest)(x) +} + +func (x *QueryConsensusStateRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryConsensusStateRequest_messageType fastReflection_QueryConsensusStateRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryConsensusStateRequest_messageType{} + +type fastReflection_QueryConsensusStateRequest_messageType struct{} + +func (x fastReflection_QueryConsensusStateRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryConsensusStateRequest)(nil) +} +func (x fastReflection_QueryConsensusStateRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryConsensusStateRequest) +} +func (x fastReflection_QueryConsensusStateRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryConsensusStateRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryConsensusStateRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryConsensusStateRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryConsensusStateRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryConsensusStateRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryConsensusStateRequest) New() protoreflect.Message { + return new(fastReflection_QueryConsensusStateRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryConsensusStateRequest) Interface() protoreflect.ProtoMessage { + return (*QueryConsensusStateRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryConsensusStateRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_QueryConsensusStateRequest_chain_name, value) { + return + } + } + if x.RevisionNumber != uint64(0) { + value := protoreflect.ValueOfUint64(x.RevisionNumber) + if !f(fd_QueryConsensusStateRequest_revision_number, value) { + return + } + } + if x.RevisionHeight != uint64(0) { + value := protoreflect.ValueOfUint64(x.RevisionHeight) + if !f(fd_QueryConsensusStateRequest_revision_height, value) { + return + } + } + if x.LatestHeight != false { + value := protoreflect.ValueOfBool(x.LatestHeight) + if !f(fd_QueryConsensusStateRequest_latest_height, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryConsensusStateRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStateRequest.chain_name": + return x.ChainName != "" + case "tibc.core.client.v1.QueryConsensusStateRequest.revision_number": + return x.RevisionNumber != uint64(0) + case "tibc.core.client.v1.QueryConsensusStateRequest.revision_height": + return x.RevisionHeight != uint64(0) + case "tibc.core.client.v1.QueryConsensusStateRequest.latest_height": + return x.LatestHeight != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStateRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStateRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryConsensusStateRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStateRequest.chain_name": + x.ChainName = "" + case "tibc.core.client.v1.QueryConsensusStateRequest.revision_number": + x.RevisionNumber = uint64(0) + case "tibc.core.client.v1.QueryConsensusStateRequest.revision_height": + x.RevisionHeight = uint64(0) + case "tibc.core.client.v1.QueryConsensusStateRequest.latest_height": + x.LatestHeight = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStateRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStateRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryConsensusStateRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.QueryConsensusStateRequest.chain_name": + value := x.ChainName + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.QueryConsensusStateRequest.revision_number": + value := x.RevisionNumber + return protoreflect.ValueOfUint64(value) + case "tibc.core.client.v1.QueryConsensusStateRequest.revision_height": + value := x.RevisionHeight + return protoreflect.ValueOfUint64(value) + case "tibc.core.client.v1.QueryConsensusStateRequest.latest_height": + value := x.LatestHeight + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStateRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStateRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryConsensusStateRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStateRequest.chain_name": + x.ChainName = value.Interface().(string) + case "tibc.core.client.v1.QueryConsensusStateRequest.revision_number": + x.RevisionNumber = value.Uint() + case "tibc.core.client.v1.QueryConsensusStateRequest.revision_height": + x.RevisionHeight = value.Uint() + case "tibc.core.client.v1.QueryConsensusStateRequest.latest_height": + x.LatestHeight = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStateRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStateRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryConsensusStateRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStateRequest.chain_name": + panic(fmt.Errorf("field chain_name of message tibc.core.client.v1.QueryConsensusStateRequest is not mutable")) + case "tibc.core.client.v1.QueryConsensusStateRequest.revision_number": + panic(fmt.Errorf("field revision_number of message tibc.core.client.v1.QueryConsensusStateRequest is not mutable")) + case "tibc.core.client.v1.QueryConsensusStateRequest.revision_height": + panic(fmt.Errorf("field revision_height of message tibc.core.client.v1.QueryConsensusStateRequest is not mutable")) + case "tibc.core.client.v1.QueryConsensusStateRequest.latest_height": + panic(fmt.Errorf("field latest_height of message tibc.core.client.v1.QueryConsensusStateRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStateRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStateRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryConsensusStateRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStateRequest.chain_name": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.QueryConsensusStateRequest.revision_number": + return protoreflect.ValueOfUint64(uint64(0)) + case "tibc.core.client.v1.QueryConsensusStateRequest.revision_height": + return protoreflect.ValueOfUint64(uint64(0)) + case "tibc.core.client.v1.QueryConsensusStateRequest.latest_height": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStateRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStateRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryConsensusStateRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.QueryConsensusStateRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryConsensusStateRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryConsensusStateRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryConsensusStateRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryConsensusStateRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryConsensusStateRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.RevisionNumber != 0 { + n += 1 + runtime.Sov(uint64(x.RevisionNumber)) + } + if x.RevisionHeight != 0 { + n += 1 + runtime.Sov(uint64(x.RevisionHeight)) + } + if x.LatestHeight { + n += 2 + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryConsensusStateRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.LatestHeight { + i-- + if x.LatestHeight { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if x.RevisionHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.RevisionHeight)) + i-- + dAtA[i] = 0x18 + } + if x.RevisionNumber != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.RevisionNumber)) + i-- + dAtA[i] = 0x10 + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryConsensusStateRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryConsensusStateRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryConsensusStateRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RevisionNumber", wireType) + } + x.RevisionNumber = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.RevisionNumber |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RevisionHeight", wireType) + } + x.RevisionHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.RevisionHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LatestHeight", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.LatestHeight = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryConsensusStateResponse protoreflect.MessageDescriptor + fd_QueryConsensusStateResponse_consensus_state protoreflect.FieldDescriptor + fd_QueryConsensusStateResponse_proof protoreflect.FieldDescriptor + fd_QueryConsensusStateResponse_proof_height protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_query_proto_init() + md_QueryConsensusStateResponse = File_tibc_core_client_v1_query_proto.Messages().ByName("QueryConsensusStateResponse") + fd_QueryConsensusStateResponse_consensus_state = md_QueryConsensusStateResponse.Fields().ByName("consensus_state") + fd_QueryConsensusStateResponse_proof = md_QueryConsensusStateResponse.Fields().ByName("proof") + fd_QueryConsensusStateResponse_proof_height = md_QueryConsensusStateResponse.Fields().ByName("proof_height") +} + +var _ protoreflect.Message = (*fastReflection_QueryConsensusStateResponse)(nil) + +type fastReflection_QueryConsensusStateResponse QueryConsensusStateResponse + +func (x *QueryConsensusStateResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryConsensusStateResponse)(x) +} + +func (x *QueryConsensusStateResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryConsensusStateResponse_messageType fastReflection_QueryConsensusStateResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryConsensusStateResponse_messageType{} + +type fastReflection_QueryConsensusStateResponse_messageType struct{} + +func (x fastReflection_QueryConsensusStateResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryConsensusStateResponse)(nil) +} +func (x fastReflection_QueryConsensusStateResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryConsensusStateResponse) +} +func (x fastReflection_QueryConsensusStateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryConsensusStateResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryConsensusStateResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryConsensusStateResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryConsensusStateResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryConsensusStateResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryConsensusStateResponse) New() protoreflect.Message { + return new(fastReflection_QueryConsensusStateResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryConsensusStateResponse) Interface() protoreflect.ProtoMessage { + return (*QueryConsensusStateResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryConsensusStateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ConsensusState != nil { + value := protoreflect.ValueOfMessage(x.ConsensusState.ProtoReflect()) + if !f(fd_QueryConsensusStateResponse_consensus_state, value) { + return + } + } + if len(x.Proof) != 0 { + value := protoreflect.ValueOfBytes(x.Proof) + if !f(fd_QueryConsensusStateResponse_proof, value) { + return + } + } + if x.ProofHeight != nil { + value := protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + if !f(fd_QueryConsensusStateResponse_proof_height, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryConsensusStateResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStateResponse.consensus_state": + return x.ConsensusState != nil + case "tibc.core.client.v1.QueryConsensusStateResponse.proof": + return len(x.Proof) != 0 + case "tibc.core.client.v1.QueryConsensusStateResponse.proof_height": + return x.ProofHeight != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStateResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStateResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryConsensusStateResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStateResponse.consensus_state": + x.ConsensusState = nil + case "tibc.core.client.v1.QueryConsensusStateResponse.proof": + x.Proof = nil + case "tibc.core.client.v1.QueryConsensusStateResponse.proof_height": + x.ProofHeight = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStateResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStateResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryConsensusStateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.QueryConsensusStateResponse.consensus_state": + value := x.ConsensusState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.client.v1.QueryConsensusStateResponse.proof": + value := x.Proof + return protoreflect.ValueOfBytes(value) + case "tibc.core.client.v1.QueryConsensusStateResponse.proof_height": + value := x.ProofHeight + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStateResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStateResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryConsensusStateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStateResponse.consensus_state": + x.ConsensusState = value.Message().Interface().(*anypb.Any) + case "tibc.core.client.v1.QueryConsensusStateResponse.proof": + x.Proof = value.Bytes() + case "tibc.core.client.v1.QueryConsensusStateResponse.proof_height": + x.ProofHeight = value.Message().Interface().(*Height) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStateResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStateResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryConsensusStateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStateResponse.consensus_state": + if x.ConsensusState == nil { + x.ConsensusState = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.ConsensusState.ProtoReflect()) + case "tibc.core.client.v1.QueryConsensusStateResponse.proof_height": + if x.ProofHeight == nil { + x.ProofHeight = new(Height) + } + return protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + case "tibc.core.client.v1.QueryConsensusStateResponse.proof": + panic(fmt.Errorf("field proof of message tibc.core.client.v1.QueryConsensusStateResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStateResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStateResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryConsensusStateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStateResponse.consensus_state": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.client.v1.QueryConsensusStateResponse.proof": + return protoreflect.ValueOfBytes(nil) + case "tibc.core.client.v1.QueryConsensusStateResponse.proof_height": + m := new(Height) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStateResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStateResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryConsensusStateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.QueryConsensusStateResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryConsensusStateResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryConsensusStateResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryConsensusStateResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryConsensusStateResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryConsensusStateResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.ConsensusState != nil { + l = options.Size(x.ConsensusState) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Proof) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ProofHeight != nil { + l = options.Size(x.ProofHeight) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryConsensusStateResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ProofHeight != nil { + encoded, err := options.Marshal(x.ProofHeight) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.Proof) > 0 { + i -= len(x.Proof) + copy(dAtA[i:], x.Proof) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Proof))) + i-- + dAtA[i] = 0x12 + } + if x.ConsensusState != nil { + encoded, err := options.Marshal(x.ConsensusState) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryConsensusStateResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryConsensusStateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryConsensusStateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConsensusState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ConsensusState == nil { + x.ConsensusState = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConsensusState); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Proof = append(x.Proof[:0], dAtA[iNdEx:postIndex]...) + if x.Proof == nil { + x.Proof = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ProofHeight == nil { + x.ProofHeight = &Height{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ProofHeight); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryConsensusStatesRequest protoreflect.MessageDescriptor + fd_QueryConsensusStatesRequest_chain_name protoreflect.FieldDescriptor + fd_QueryConsensusStatesRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_query_proto_init() + md_QueryConsensusStatesRequest = File_tibc_core_client_v1_query_proto.Messages().ByName("QueryConsensusStatesRequest") + fd_QueryConsensusStatesRequest_chain_name = md_QueryConsensusStatesRequest.Fields().ByName("chain_name") + fd_QueryConsensusStatesRequest_pagination = md_QueryConsensusStatesRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryConsensusStatesRequest)(nil) + +type fastReflection_QueryConsensusStatesRequest QueryConsensusStatesRequest + +func (x *QueryConsensusStatesRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryConsensusStatesRequest)(x) +} + +func (x *QueryConsensusStatesRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryConsensusStatesRequest_messageType fastReflection_QueryConsensusStatesRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryConsensusStatesRequest_messageType{} + +type fastReflection_QueryConsensusStatesRequest_messageType struct{} + +func (x fastReflection_QueryConsensusStatesRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryConsensusStatesRequest)(nil) +} +func (x fastReflection_QueryConsensusStatesRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryConsensusStatesRequest) +} +func (x fastReflection_QueryConsensusStatesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryConsensusStatesRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryConsensusStatesRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryConsensusStatesRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryConsensusStatesRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryConsensusStatesRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryConsensusStatesRequest) New() protoreflect.Message { + return new(fastReflection_QueryConsensusStatesRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryConsensusStatesRequest) Interface() protoreflect.ProtoMessage { + return (*QueryConsensusStatesRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryConsensusStatesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_QueryConsensusStatesRequest_chain_name, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryConsensusStatesRequest_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryConsensusStatesRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStatesRequest.chain_name": + return x.ChainName != "" + case "tibc.core.client.v1.QueryConsensusStatesRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStatesRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStatesRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryConsensusStatesRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStatesRequest.chain_name": + x.ChainName = "" + case "tibc.core.client.v1.QueryConsensusStatesRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStatesRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStatesRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryConsensusStatesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.QueryConsensusStatesRequest.chain_name": + value := x.ChainName + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.QueryConsensusStatesRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStatesRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStatesRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryConsensusStatesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStatesRequest.chain_name": + x.ChainName = value.Interface().(string) + case "tibc.core.client.v1.QueryConsensusStatesRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStatesRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStatesRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryConsensusStatesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStatesRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "tibc.core.client.v1.QueryConsensusStatesRequest.chain_name": + panic(fmt.Errorf("field chain_name of message tibc.core.client.v1.QueryConsensusStatesRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStatesRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStatesRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryConsensusStatesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStatesRequest.chain_name": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.QueryConsensusStatesRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStatesRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStatesRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryConsensusStatesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.QueryConsensusStatesRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryConsensusStatesRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryConsensusStatesRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryConsensusStatesRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryConsensusStatesRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryConsensusStatesRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryConsensusStatesRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryConsensusStatesRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryConsensusStatesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryConsensusStatesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryConsensusStatesResponse_1_list)(nil) + +type _QueryConsensusStatesResponse_1_list struct { + list *[]*ConsensusStateWithHeight +} + +func (x *_QueryConsensusStatesResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryConsensusStatesResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryConsensusStatesResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ConsensusStateWithHeight) + (*x.list)[i] = concreteValue +} + +func (x *_QueryConsensusStatesResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ConsensusStateWithHeight) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryConsensusStatesResponse_1_list) AppendMutable() protoreflect.Value { + v := new(ConsensusStateWithHeight) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryConsensusStatesResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryConsensusStatesResponse_1_list) NewElement() protoreflect.Value { + v := new(ConsensusStateWithHeight) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryConsensusStatesResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryConsensusStatesResponse protoreflect.MessageDescriptor + fd_QueryConsensusStatesResponse_consensus_states protoreflect.FieldDescriptor + fd_QueryConsensusStatesResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_query_proto_init() + md_QueryConsensusStatesResponse = File_tibc_core_client_v1_query_proto.Messages().ByName("QueryConsensusStatesResponse") + fd_QueryConsensusStatesResponse_consensus_states = md_QueryConsensusStatesResponse.Fields().ByName("consensus_states") + fd_QueryConsensusStatesResponse_pagination = md_QueryConsensusStatesResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryConsensusStatesResponse)(nil) + +type fastReflection_QueryConsensusStatesResponse QueryConsensusStatesResponse + +func (x *QueryConsensusStatesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryConsensusStatesResponse)(x) +} + +func (x *QueryConsensusStatesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryConsensusStatesResponse_messageType fastReflection_QueryConsensusStatesResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryConsensusStatesResponse_messageType{} + +type fastReflection_QueryConsensusStatesResponse_messageType struct{} + +func (x fastReflection_QueryConsensusStatesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryConsensusStatesResponse)(nil) +} +func (x fastReflection_QueryConsensusStatesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryConsensusStatesResponse) +} +func (x fastReflection_QueryConsensusStatesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryConsensusStatesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryConsensusStatesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryConsensusStatesResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryConsensusStatesResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryConsensusStatesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryConsensusStatesResponse) New() protoreflect.Message { + return new(fastReflection_QueryConsensusStatesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryConsensusStatesResponse) Interface() protoreflect.ProtoMessage { + return (*QueryConsensusStatesResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryConsensusStatesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.ConsensusStates) != 0 { + value := protoreflect.ValueOfList(&_QueryConsensusStatesResponse_1_list{list: &x.ConsensusStates}) + if !f(fd_QueryConsensusStatesResponse_consensus_states, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryConsensusStatesResponse_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryConsensusStatesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStatesResponse.consensus_states": + return len(x.ConsensusStates) != 0 + case "tibc.core.client.v1.QueryConsensusStatesResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStatesResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStatesResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryConsensusStatesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStatesResponse.consensus_states": + x.ConsensusStates = nil + case "tibc.core.client.v1.QueryConsensusStatesResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStatesResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStatesResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryConsensusStatesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.QueryConsensusStatesResponse.consensus_states": + if len(x.ConsensusStates) == 0 { + return protoreflect.ValueOfList(&_QueryConsensusStatesResponse_1_list{}) + } + listValue := &_QueryConsensusStatesResponse_1_list{list: &x.ConsensusStates} + return protoreflect.ValueOfList(listValue) + case "tibc.core.client.v1.QueryConsensusStatesResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStatesResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStatesResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryConsensusStatesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStatesResponse.consensus_states": + lv := value.List() + clv := lv.(*_QueryConsensusStatesResponse_1_list) + x.ConsensusStates = *clv.list + case "tibc.core.client.v1.QueryConsensusStatesResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStatesResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStatesResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryConsensusStatesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStatesResponse.consensus_states": + if x.ConsensusStates == nil { + x.ConsensusStates = []*ConsensusStateWithHeight{} + } + value := &_QueryConsensusStatesResponse_1_list{list: &x.ConsensusStates} + return protoreflect.ValueOfList(value) + case "tibc.core.client.v1.QueryConsensusStatesResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStatesResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStatesResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryConsensusStatesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryConsensusStatesResponse.consensus_states": + list := []*ConsensusStateWithHeight{} + return protoreflect.ValueOfList(&_QueryConsensusStatesResponse_1_list{list: &list}) + case "tibc.core.client.v1.QueryConsensusStatesResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryConsensusStatesResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryConsensusStatesResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryConsensusStatesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.QueryConsensusStatesResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryConsensusStatesResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryConsensusStatesResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryConsensusStatesResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryConsensusStatesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryConsensusStatesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.ConsensusStates) > 0 { + for _, e := range x.ConsensusStates { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryConsensusStatesResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.ConsensusStates) > 0 { + for iNdEx := len(x.ConsensusStates) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ConsensusStates[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryConsensusStatesResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryConsensusStatesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryConsensusStatesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConsensusStates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ConsensusStates = append(x.ConsensusStates, &ConsensusStateWithHeight{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConsensusStates[len(x.ConsensusStates)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryRelayersRequest protoreflect.MessageDescriptor + fd_QueryRelayersRequest_chain_name protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_query_proto_init() + md_QueryRelayersRequest = File_tibc_core_client_v1_query_proto.Messages().ByName("QueryRelayersRequest") + fd_QueryRelayersRequest_chain_name = md_QueryRelayersRequest.Fields().ByName("chain_name") +} + +var _ protoreflect.Message = (*fastReflection_QueryRelayersRequest)(nil) + +type fastReflection_QueryRelayersRequest QueryRelayersRequest + +func (x *QueryRelayersRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryRelayersRequest)(x) +} + +func (x *QueryRelayersRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryRelayersRequest_messageType fastReflection_QueryRelayersRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryRelayersRequest_messageType{} + +type fastReflection_QueryRelayersRequest_messageType struct{} + +func (x fastReflection_QueryRelayersRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryRelayersRequest)(nil) +} +func (x fastReflection_QueryRelayersRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryRelayersRequest) +} +func (x fastReflection_QueryRelayersRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRelayersRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryRelayersRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRelayersRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryRelayersRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryRelayersRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryRelayersRequest) New() protoreflect.Message { + return new(fastReflection_QueryRelayersRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryRelayersRequest) Interface() protoreflect.ProtoMessage { + return (*QueryRelayersRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryRelayersRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_QueryRelayersRequest_chain_name, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryRelayersRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.QueryRelayersRequest.chain_name": + return x.ChainName != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryRelayersRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryRelayersRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRelayersRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryRelayersRequest.chain_name": + x.ChainName = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryRelayersRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryRelayersRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryRelayersRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.QueryRelayersRequest.chain_name": + value := x.ChainName + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryRelayersRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryRelayersRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRelayersRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryRelayersRequest.chain_name": + x.ChainName = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryRelayersRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryRelayersRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRelayersRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryRelayersRequest.chain_name": + panic(fmt.Errorf("field chain_name of message tibc.core.client.v1.QueryRelayersRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryRelayersRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryRelayersRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryRelayersRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryRelayersRequest.chain_name": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryRelayersRequest")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryRelayersRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryRelayersRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.QueryRelayersRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryRelayersRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRelayersRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryRelayersRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryRelayersRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryRelayersRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryRelayersRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryRelayersRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRelayersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRelayersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryRelayersResponse_1_list)(nil) + +type _QueryRelayersResponse_1_list struct { + list *[]string +} + +func (x *_QueryRelayersResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryRelayersResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_QueryRelayersResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_QueryRelayersResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryRelayersResponse_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message QueryRelayersResponse at list field Relayers as it is not of Message kind")) +} + +func (x *_QueryRelayersResponse_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_QueryRelayersResponse_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_QueryRelayersResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryRelayersResponse protoreflect.MessageDescriptor + fd_QueryRelayersResponse_relayers protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_query_proto_init() + md_QueryRelayersResponse = File_tibc_core_client_v1_query_proto.Messages().ByName("QueryRelayersResponse") + fd_QueryRelayersResponse_relayers = md_QueryRelayersResponse.Fields().ByName("relayers") +} + +var _ protoreflect.Message = (*fastReflection_QueryRelayersResponse)(nil) + +type fastReflection_QueryRelayersResponse QueryRelayersResponse + +func (x *QueryRelayersResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryRelayersResponse)(x) +} + +func (x *QueryRelayersResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryRelayersResponse_messageType fastReflection_QueryRelayersResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryRelayersResponse_messageType{} + +type fastReflection_QueryRelayersResponse_messageType struct{} + +func (x fastReflection_QueryRelayersResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryRelayersResponse)(nil) +} +func (x fastReflection_QueryRelayersResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryRelayersResponse) +} +func (x fastReflection_QueryRelayersResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRelayersResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryRelayersResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRelayersResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryRelayersResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryRelayersResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryRelayersResponse) New() protoreflect.Message { + return new(fastReflection_QueryRelayersResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryRelayersResponse) Interface() protoreflect.ProtoMessage { + return (*QueryRelayersResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryRelayersResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Relayers) != 0 { + value := protoreflect.ValueOfList(&_QueryRelayersResponse_1_list{list: &x.Relayers}) + if !f(fd_QueryRelayersResponse_relayers, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryRelayersResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.QueryRelayersResponse.relayers": + return len(x.Relayers) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryRelayersResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryRelayersResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRelayersResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryRelayersResponse.relayers": + x.Relayers = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryRelayersResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryRelayersResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryRelayersResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.QueryRelayersResponse.relayers": + if len(x.Relayers) == 0 { + return protoreflect.ValueOfList(&_QueryRelayersResponse_1_list{}) + } + listValue := &_QueryRelayersResponse_1_list{list: &x.Relayers} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryRelayersResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryRelayersResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRelayersResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.QueryRelayersResponse.relayers": + lv := value.List() + clv := lv.(*_QueryRelayersResponse_1_list) + x.Relayers = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryRelayersResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryRelayersResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRelayersResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryRelayersResponse.relayers": + if x.Relayers == nil { + x.Relayers = []string{} + } + value := &_QueryRelayersResponse_1_list{list: &x.Relayers} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryRelayersResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryRelayersResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryRelayersResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.QueryRelayersResponse.relayers": + list := []string{} + return protoreflect.ValueOfList(&_QueryRelayersResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.QueryRelayersResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.QueryRelayersResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryRelayersResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.QueryRelayersResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryRelayersResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRelayersResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryRelayersResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryRelayersResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryRelayersResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Relayers) > 0 { + for _, s := range x.Relayers { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryRelayersResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Relayers) > 0 { + for iNdEx := len(x.Relayers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Relayers[iNdEx]) + copy(dAtA[i:], x.Relayers[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Relayers[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryRelayersResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRelayersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRelayersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relayers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Relayers = append(x.Relayers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: tibc/core/client/v1/query.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// QueryClientStateRequest is the request type for the Query/ClientState RPC +// method +type QueryClientStateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // client state unique identifier + ChainName string `protobuf:"bytes,1,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` +} + +func (x *QueryClientStateRequest) Reset() { + *x = QueryClientStateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryClientStateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryClientStateRequest) ProtoMessage() {} + +// Deprecated: Use QueryClientStateRequest.ProtoReflect.Descriptor instead. +func (*QueryClientStateRequest) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_query_proto_rawDescGZIP(), []int{0} +} + +func (x *QueryClientStateRequest) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +// QueryClientStateResponse is the response type for the Query/ClientState RPC +// method. Besides the client state, it includes a proof and the height from +// which the proof was retrieved. +type QueryClientStateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // client state associated with the request identifier + ClientState *anypb.Any `protobuf:"bytes,1,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty"` + // merkle proof of existence + Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` + // height at which the proof was retrieved + ProofHeight *Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` +} + +func (x *QueryClientStateResponse) Reset() { + *x = QueryClientStateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryClientStateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryClientStateResponse) ProtoMessage() {} + +// Deprecated: Use QueryClientStateResponse.ProtoReflect.Descriptor instead. +func (*QueryClientStateResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryClientStateResponse) GetClientState() *anypb.Any { + if x != nil { + return x.ClientState + } + return nil +} + +func (x *QueryClientStateResponse) GetProof() []byte { + if x != nil { + return x.Proof + } + return nil +} + +func (x *QueryClientStateResponse) GetProofHeight() *Height { + if x != nil { + return x.ProofHeight + } + return nil +} + +// QueryClientStatesRequest is the request type for the Query/ClientStates RPC +// method +type QueryClientStatesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // pagination request + Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryClientStatesRequest) Reset() { + *x = QueryClientStatesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryClientStatesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryClientStatesRequest) ProtoMessage() {} + +// Deprecated: Use QueryClientStatesRequest.ProtoReflect.Descriptor instead. +func (*QueryClientStatesRequest) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_query_proto_rawDescGZIP(), []int{2} +} + +func (x *QueryClientStatesRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryClientStatesResponse is the response type for the Query/ClientStates RPC +// method. +type QueryClientStatesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // list of stored ClientStates of the chain. + ClientStates []*IdentifiedClientState `protobuf:"bytes,1,rep,name=client_states,json=clientStates,proto3" json:"client_states,omitempty"` + // pagination response + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryClientStatesResponse) Reset() { + *x = QueryClientStatesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryClientStatesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryClientStatesResponse) ProtoMessage() {} + +// Deprecated: Use QueryClientStatesResponse.ProtoReflect.Descriptor instead. +func (*QueryClientStatesResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryClientStatesResponse) GetClientStates() []*IdentifiedClientState { + if x != nil { + return x.ClientStates + } + return nil +} + +func (x *QueryClientStatesResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryConsensusStateRequest is the request type for the Query/ConsensusState +// RPC method. Besides the consensus state, it includes a proof and the height +// from which the proof was retrieved. +type QueryConsensusStateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // client identifier + ChainName string `protobuf:"bytes,1,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + // consensus state revision number + RevisionNumber uint64 `protobuf:"varint,2,opt,name=revision_number,json=revisionNumber,proto3" json:"revision_number,omitempty"` + // consensus state revision height + RevisionHeight uint64 `protobuf:"varint,3,opt,name=revision_height,json=revisionHeight,proto3" json:"revision_height,omitempty"` + // latest_height overrrides the height field and queries the latest stored + // ConsensusState + LatestHeight bool `protobuf:"varint,4,opt,name=latest_height,json=latestHeight,proto3" json:"latest_height,omitempty"` +} + +func (x *QueryConsensusStateRequest) Reset() { + *x = QueryConsensusStateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryConsensusStateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryConsensusStateRequest) ProtoMessage() {} + +// Deprecated: Use QueryConsensusStateRequest.ProtoReflect.Descriptor instead. +func (*QueryConsensusStateRequest) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_query_proto_rawDescGZIP(), []int{4} +} + +func (x *QueryConsensusStateRequest) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +func (x *QueryConsensusStateRequest) GetRevisionNumber() uint64 { + if x != nil { + return x.RevisionNumber + } + return 0 +} + +func (x *QueryConsensusStateRequest) GetRevisionHeight() uint64 { + if x != nil { + return x.RevisionHeight + } + return 0 +} + +func (x *QueryConsensusStateRequest) GetLatestHeight() bool { + if x != nil { + return x.LatestHeight + } + return false +} + +// QueryConsensusStateResponse is the response type for the Query/ConsensusState +// RPC method +type QueryConsensusStateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // consensus state associated with the client identifier at the given height + ConsensusState *anypb.Any `protobuf:"bytes,1,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty"` + // merkle proof of existence + Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` + // height at which the proof was retrieved + ProofHeight *Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` +} + +func (x *QueryConsensusStateResponse) Reset() { + *x = QueryConsensusStateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryConsensusStateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryConsensusStateResponse) ProtoMessage() {} + +// Deprecated: Use QueryConsensusStateResponse.ProtoReflect.Descriptor instead. +func (*QueryConsensusStateResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryConsensusStateResponse) GetConsensusState() *anypb.Any { + if x != nil { + return x.ConsensusState + } + return nil +} + +func (x *QueryConsensusStateResponse) GetProof() []byte { + if x != nil { + return x.Proof + } + return nil +} + +func (x *QueryConsensusStateResponse) GetProofHeight() *Height { + if x != nil { + return x.ProofHeight + } + return nil +} + +// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates +// RPC method. +type QueryConsensusStatesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // client identifier + ChainName string `protobuf:"bytes,1,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + // pagination request + Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryConsensusStatesRequest) Reset() { + *x = QueryConsensusStatesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryConsensusStatesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryConsensusStatesRequest) ProtoMessage() {} + +// Deprecated: Use QueryConsensusStatesRequest.ProtoReflect.Descriptor instead. +func (*QueryConsensusStatesRequest) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_query_proto_rawDescGZIP(), []int{6} +} + +func (x *QueryConsensusStatesRequest) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +func (x *QueryConsensusStatesRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryConsensusStatesResponse is the response type for the +// Query/ConsensusStates RPC method +type QueryConsensusStatesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // consensus states associated with the identifier + ConsensusStates []*ConsensusStateWithHeight `protobuf:"bytes,1,rep,name=consensus_states,json=consensusStates,proto3" json:"consensus_states,omitempty"` + // pagination response + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryConsensusStatesResponse) Reset() { + *x = QueryConsensusStatesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryConsensusStatesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryConsensusStatesResponse) ProtoMessage() {} + +// Deprecated: Use QueryConsensusStatesResponse.ProtoReflect.Descriptor instead. +func (*QueryConsensusStatesResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_query_proto_rawDescGZIP(), []int{7} +} + +func (x *QueryConsensusStatesResponse) GetConsensusStates() []*ConsensusStateWithHeight { + if x != nil { + return x.ConsensusStates + } + return nil +} + +func (x *QueryConsensusStatesResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryRelayersRequest is the request type for the Query/Relayers +// RPC method. +type QueryRelayersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // client identifier + ChainName string `protobuf:"bytes,1,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` +} + +func (x *QueryRelayersRequest) Reset() { + *x = QueryRelayersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRelayersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRelayersRequest) ProtoMessage() {} + +// Deprecated: Use QueryRelayersRequest.ProtoReflect.Descriptor instead. +func (*QueryRelayersRequest) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_query_proto_rawDescGZIP(), []int{8} +} + +func (x *QueryRelayersRequest) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +// QueryConsensusStatesResponse is the response type for the +// Query/Relayers RPC method +type QueryRelayersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // relayers address associated with the client + Relayers []string `protobuf:"bytes,1,rep,name=relayers,proto3" json:"relayers,omitempty"` +} + +func (x *QueryRelayersResponse) Reset() { + *x = QueryRelayersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRelayersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRelayersResponse) ProtoMessage() {} + +// Deprecated: Use QueryRelayersResponse.ProtoReflect.Descriptor instead. +func (*QueryRelayersResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_query_proto_rawDescGZIP(), []int{9} +} + +func (x *QueryRelayersResponse) GetRelayers() []string { + if x != nil { + return x.Relayers + } + return nil +} + +var File_tibc_core_client_v1_query_proto protoreflect.FileDescriptor + +var file_tibc_core_client_v1_query_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x13, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, + 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x20, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, + 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x38, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xaf, 0x01, + 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x44, 0x0a, 0x0c, 0x70, 0x72, 0x6f, + 0x6f, 0x66, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, + 0x62, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0xd5, 0x01, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x6f, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x42, 0x1e, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x16, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb2, 0x01, 0x0a, 0x1a, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0e, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x72, 0x65, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6c, + 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0c, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x22, 0xb8, 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, + 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3d, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, + 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, + 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x44, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x69, + 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, + 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x1b, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0xc7, 0x01, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, + 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x14, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, + 0x61, 0x6d, 0x65, 0x22, 0x33, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, + 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x32, 0x90, 0x07, 0x0a, 0x05, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x12, 0xa7, 0x01, 0x0a, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x2c, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2d, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x2f, + 0x7b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x9d, 0x01, 0x0a, + 0x0c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x2e, + 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x74, + 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0xe7, 0x01, 0x0a, + 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x2f, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x30, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x6c, 0x12, 0x6a, 0x2f, 0x69, 0x62, 0x63, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x72, 0x65, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x7d, 0x2f, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x2f, 0x7b, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, 0xb6, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x74, 0x69, 0x62, + 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x74, + 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, + 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x73, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, + 0x99, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x12, 0x29, 0x2e, 0x74, + 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x69, 0x62, + 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x2f, 0x7b, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x42, 0xd3, 0x01, 0x0a, 0x17, + 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x62, 0x69, 0x61, 0x6e, 0x6a, 0x69, 0x65, 0x61, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, + 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x43, 0x43, 0xaa, 0x02, 0x13, 0x54, 0x69, 0x62, + 0x63, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x13, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x43, 0x6f, + 0x72, 0x65, 0x5c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x54, 0x69, 0x62, 0x63, 0x3a, + 0x3a, 0x43, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tibc_core_client_v1_query_proto_rawDescOnce sync.Once + file_tibc_core_client_v1_query_proto_rawDescData = file_tibc_core_client_v1_query_proto_rawDesc +) + +func file_tibc_core_client_v1_query_proto_rawDescGZIP() []byte { + file_tibc_core_client_v1_query_proto_rawDescOnce.Do(func() { + file_tibc_core_client_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_tibc_core_client_v1_query_proto_rawDescData) + }) + return file_tibc_core_client_v1_query_proto_rawDescData +} + +var file_tibc_core_client_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_tibc_core_client_v1_query_proto_goTypes = []interface{}{ + (*QueryClientStateRequest)(nil), // 0: tibc.core.client.v1.QueryClientStateRequest + (*QueryClientStateResponse)(nil), // 1: tibc.core.client.v1.QueryClientStateResponse + (*QueryClientStatesRequest)(nil), // 2: tibc.core.client.v1.QueryClientStatesRequest + (*QueryClientStatesResponse)(nil), // 3: tibc.core.client.v1.QueryClientStatesResponse + (*QueryConsensusStateRequest)(nil), // 4: tibc.core.client.v1.QueryConsensusStateRequest + (*QueryConsensusStateResponse)(nil), // 5: tibc.core.client.v1.QueryConsensusStateResponse + (*QueryConsensusStatesRequest)(nil), // 6: tibc.core.client.v1.QueryConsensusStatesRequest + (*QueryConsensusStatesResponse)(nil), // 7: tibc.core.client.v1.QueryConsensusStatesResponse + (*QueryRelayersRequest)(nil), // 8: tibc.core.client.v1.QueryRelayersRequest + (*QueryRelayersResponse)(nil), // 9: tibc.core.client.v1.QueryRelayersResponse + (*anypb.Any)(nil), // 10: google.protobuf.Any + (*Height)(nil), // 11: tibc.core.client.v1.Height + (*v1beta1.PageRequest)(nil), // 12: cosmos.base.query.v1beta1.PageRequest + (*IdentifiedClientState)(nil), // 13: tibc.core.client.v1.IdentifiedClientState + (*v1beta1.PageResponse)(nil), // 14: cosmos.base.query.v1beta1.PageResponse + (*ConsensusStateWithHeight)(nil), // 15: tibc.core.client.v1.ConsensusStateWithHeight +} +var file_tibc_core_client_v1_query_proto_depIdxs = []int32{ + 10, // 0: tibc.core.client.v1.QueryClientStateResponse.client_state:type_name -> google.protobuf.Any + 11, // 1: tibc.core.client.v1.QueryClientStateResponse.proof_height:type_name -> tibc.core.client.v1.Height + 12, // 2: tibc.core.client.v1.QueryClientStatesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 13, // 3: tibc.core.client.v1.QueryClientStatesResponse.client_states:type_name -> tibc.core.client.v1.IdentifiedClientState + 14, // 4: tibc.core.client.v1.QueryClientStatesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 10, // 5: tibc.core.client.v1.QueryConsensusStateResponse.consensus_state:type_name -> google.protobuf.Any + 11, // 6: tibc.core.client.v1.QueryConsensusStateResponse.proof_height:type_name -> tibc.core.client.v1.Height + 12, // 7: tibc.core.client.v1.QueryConsensusStatesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 15, // 8: tibc.core.client.v1.QueryConsensusStatesResponse.consensus_states:type_name -> tibc.core.client.v1.ConsensusStateWithHeight + 14, // 9: tibc.core.client.v1.QueryConsensusStatesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 0, // 10: tibc.core.client.v1.Query.ClientState:input_type -> tibc.core.client.v1.QueryClientStateRequest + 2, // 11: tibc.core.client.v1.Query.ClientStates:input_type -> tibc.core.client.v1.QueryClientStatesRequest + 4, // 12: tibc.core.client.v1.Query.ConsensusState:input_type -> tibc.core.client.v1.QueryConsensusStateRequest + 6, // 13: tibc.core.client.v1.Query.ConsensusStates:input_type -> tibc.core.client.v1.QueryConsensusStatesRequest + 8, // 14: tibc.core.client.v1.Query.Relayers:input_type -> tibc.core.client.v1.QueryRelayersRequest + 1, // 15: tibc.core.client.v1.Query.ClientState:output_type -> tibc.core.client.v1.QueryClientStateResponse + 3, // 16: tibc.core.client.v1.Query.ClientStates:output_type -> tibc.core.client.v1.QueryClientStatesResponse + 5, // 17: tibc.core.client.v1.Query.ConsensusState:output_type -> tibc.core.client.v1.QueryConsensusStateResponse + 7, // 18: tibc.core.client.v1.Query.ConsensusStates:output_type -> tibc.core.client.v1.QueryConsensusStatesResponse + 9, // 19: tibc.core.client.v1.Query.Relayers:output_type -> tibc.core.client.v1.QueryRelayersResponse + 15, // [15:20] is the sub-list for method output_type + 10, // [10:15] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_tibc_core_client_v1_query_proto_init() } +func file_tibc_core_client_v1_query_proto_init() { + if File_tibc_core_client_v1_query_proto != nil { + return + } + file_tibc_core_client_v1_client_proto_init() + if !protoimpl.UnsafeEnabled { + file_tibc_core_client_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryClientStateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryClientStateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryClientStatesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryClientStatesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryConsensusStateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryConsensusStateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryConsensusStatesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryConsensusStatesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryRelayersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryRelayersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_tibc_core_client_v1_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_tibc_core_client_v1_query_proto_goTypes, + DependencyIndexes: file_tibc_core_client_v1_query_proto_depIdxs, + MessageInfos: file_tibc_core_client_v1_query_proto_msgTypes, + }.Build() + File_tibc_core_client_v1_query_proto = out.File + file_tibc_core_client_v1_query_proto_rawDesc = nil + file_tibc_core_client_v1_query_proto_goTypes = nil + file_tibc_core_client_v1_query_proto_depIdxs = nil +} diff --git a/api/tibc/core/client/v1/query_grpc.pb.go b/api/tibc/core/client/v1/query_grpc.pb.go new file mode 100644 index 00000000..ba14c8cf --- /dev/null +++ b/api/tibc/core/client/v1/query_grpc.pb.go @@ -0,0 +1,293 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: tibc/core/client/v1/query.proto + +package clientv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Query_ClientState_FullMethodName = "/tibc.core.client.v1.Query/ClientState" + Query_ClientStates_FullMethodName = "/tibc.core.client.v1.Query/ClientStates" + Query_ConsensusState_FullMethodName = "/tibc.core.client.v1.Query/ConsensusState" + Query_ConsensusStates_FullMethodName = "/tibc.core.client.v1.Query/ConsensusStates" + Query_Relayers_FullMethodName = "/tibc.core.client.v1.Query/Relayers" +) + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Query provides defines the gRPC querier service +type QueryClient interface { + // ClientState queries an TIBC light client. + ClientState(ctx context.Context, in *QueryClientStateRequest, opts ...grpc.CallOption) (*QueryClientStateResponse, error) + // ClientStates queries all the TIBC light clients of a chain. + ClientStates(ctx context.Context, in *QueryClientStatesRequest, opts ...grpc.CallOption) (*QueryClientStatesResponse, error) + // ConsensusState queries a consensus state associated with a client state at + // a given height. + ConsensusState(ctx context.Context, in *QueryConsensusStateRequest, opts ...grpc.CallOption) (*QueryConsensusStateResponse, error) + // ConsensusStates queries all the consensus state associated with a given + // client. + ConsensusStates(ctx context.Context, in *QueryConsensusStatesRequest, opts ...grpc.CallOption) (*QueryConsensusStatesResponse, error) + // Relayers queries all the relayers associated with a given + // client. + Relayers(ctx context.Context, in *QueryRelayersRequest, opts ...grpc.CallOption) (*QueryRelayersResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) ClientState(ctx context.Context, in *QueryClientStateRequest, opts ...grpc.CallOption) (*QueryClientStateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryClientStateResponse) + err := c.cc.Invoke(ctx, Query_ClientState_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ClientStates(ctx context.Context, in *QueryClientStatesRequest, opts ...grpc.CallOption) (*QueryClientStatesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryClientStatesResponse) + err := c.cc.Invoke(ctx, Query_ClientStates_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ConsensusState(ctx context.Context, in *QueryConsensusStateRequest, opts ...grpc.CallOption) (*QueryConsensusStateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryConsensusStateResponse) + err := c.cc.Invoke(ctx, Query_ConsensusState_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ConsensusStates(ctx context.Context, in *QueryConsensusStatesRequest, opts ...grpc.CallOption) (*QueryConsensusStatesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryConsensusStatesResponse) + err := c.cc.Invoke(ctx, Query_ConsensusStates_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Relayers(ctx context.Context, in *QueryRelayersRequest, opts ...grpc.CallOption) (*QueryRelayersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryRelayersResponse) + err := c.cc.Invoke(ctx, Query_Relayers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility. +// +// Query provides defines the gRPC querier service +type QueryServer interface { + // ClientState queries an TIBC light client. + ClientState(context.Context, *QueryClientStateRequest) (*QueryClientStateResponse, error) + // ClientStates queries all the TIBC light clients of a chain. + ClientStates(context.Context, *QueryClientStatesRequest) (*QueryClientStatesResponse, error) + // ConsensusState queries a consensus state associated with a client state at + // a given height. + ConsensusState(context.Context, *QueryConsensusStateRequest) (*QueryConsensusStateResponse, error) + // ConsensusStates queries all the consensus state associated with a given + // client. + ConsensusStates(context.Context, *QueryConsensusStatesRequest) (*QueryConsensusStatesResponse, error) + // Relayers queries all the relayers associated with a given + // client. + Relayers(context.Context, *QueryRelayersRequest) (*QueryRelayersResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedQueryServer struct{} + +func (UnimplementedQueryServer) ClientState(context.Context, *QueryClientStateRequest) (*QueryClientStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClientState not implemented") +} +func (UnimplementedQueryServer) ClientStates(context.Context, *QueryClientStatesRequest) (*QueryClientStatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClientStates not implemented") +} +func (UnimplementedQueryServer) ConsensusState(context.Context, *QueryConsensusStateRequest) (*QueryConsensusStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ConsensusState not implemented") +} +func (UnimplementedQueryServer) ConsensusStates(context.Context, *QueryConsensusStatesRequest) (*QueryConsensusStatesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ConsensusStates not implemented") +} +func (UnimplementedQueryServer) Relayers(context.Context, *QueryRelayersRequest) (*QueryRelayersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Relayers not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} +func (UnimplementedQueryServer) testEmbeddedByValue() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + // If the following call pancis, it indicates UnimplementedQueryServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_ClientState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryClientStateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ClientState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ClientState_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ClientState(ctx, req.(*QueryClientStateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ClientStates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryClientStatesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ClientStates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ClientStates_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ClientStates(ctx, req.(*QueryClientStatesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ConsensusState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryConsensusStateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ConsensusState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ConsensusState_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ConsensusState(ctx, req.(*QueryConsensusStateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ConsensusStates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryConsensusStatesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ConsensusStates(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ConsensusStates_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ConsensusStates(ctx, req.(*QueryConsensusStatesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Relayers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRelayersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Relayers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Relayers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Relayers(ctx, req.(*QueryRelayersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "tibc.core.client.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ClientState", + Handler: _Query_ClientState_Handler, + }, + { + MethodName: "ClientStates", + Handler: _Query_ClientStates_Handler, + }, + { + MethodName: "ConsensusState", + Handler: _Query_ConsensusState_Handler, + }, + { + MethodName: "ConsensusStates", + Handler: _Query_ConsensusStates_Handler, + }, + { + MethodName: "Relayers", + Handler: _Query_Relayers_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "tibc/core/client/v1/query.proto", +} diff --git a/api/tibc/core/client/v1/tx.pulsar.go b/api/tibc/core/client/v1/tx.pulsar.go new file mode 100644 index 00000000..144e4f98 --- /dev/null +++ b/api/tibc/core/client/v1/tx.pulsar.go @@ -0,0 +1,4991 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package clientv1 + +import ( + _ "cosmossdk.io/api/cosmos/msg/v1" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_MsgUpdateClient protoreflect.MessageDescriptor + fd_MsgUpdateClient_chain_name protoreflect.FieldDescriptor + fd_MsgUpdateClient_header protoreflect.FieldDescriptor + fd_MsgUpdateClient_signer protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_tx_proto_init() + md_MsgUpdateClient = File_tibc_core_client_v1_tx_proto.Messages().ByName("MsgUpdateClient") + fd_MsgUpdateClient_chain_name = md_MsgUpdateClient.Fields().ByName("chain_name") + fd_MsgUpdateClient_header = md_MsgUpdateClient.Fields().ByName("header") + fd_MsgUpdateClient_signer = md_MsgUpdateClient.Fields().ByName("signer") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateClient)(nil) + +type fastReflection_MsgUpdateClient MsgUpdateClient + +func (x *MsgUpdateClient) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateClient)(x) +} + +func (x *MsgUpdateClient) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_tx_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateClient_messageType fastReflection_MsgUpdateClient_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateClient_messageType{} + +type fastReflection_MsgUpdateClient_messageType struct{} + +func (x fastReflection_MsgUpdateClient_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateClient)(nil) +} +func (x fastReflection_MsgUpdateClient_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateClient) +} +func (x fastReflection_MsgUpdateClient_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateClient +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateClient) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateClient +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpdateClient) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateClient_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateClient) New() protoreflect.Message { + return new(fastReflection_MsgUpdateClient) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateClient) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateClient)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpdateClient) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_MsgUpdateClient_chain_name, value) { + return + } + } + if x.Header != nil { + value := protoreflect.ValueOfMessage(x.Header.ProtoReflect()) + if !f(fd_MsgUpdateClient_header, value) { + return + } + } + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgUpdateClient_signer, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateClient) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.MsgUpdateClient.chain_name": + return x.ChainName != "" + case "tibc.core.client.v1.MsgUpdateClient.header": + return x.Header != nil + case "tibc.core.client.v1.MsgUpdateClient.signer": + return x.Signer != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpdateClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpdateClient does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateClient) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.MsgUpdateClient.chain_name": + x.ChainName = "" + case "tibc.core.client.v1.MsgUpdateClient.header": + x.Header = nil + case "tibc.core.client.v1.MsgUpdateClient.signer": + x.Signer = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpdateClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpdateClient does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpdateClient) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.MsgUpdateClient.chain_name": + value := x.ChainName + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.MsgUpdateClient.header": + value := x.Header + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.client.v1.MsgUpdateClient.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpdateClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpdateClient does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateClient) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.MsgUpdateClient.chain_name": + x.ChainName = value.Interface().(string) + case "tibc.core.client.v1.MsgUpdateClient.header": + x.Header = value.Message().Interface().(*anypb.Any) + case "tibc.core.client.v1.MsgUpdateClient.signer": + x.Signer = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpdateClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpdateClient does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateClient) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.MsgUpdateClient.header": + if x.Header == nil { + x.Header = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Header.ProtoReflect()) + case "tibc.core.client.v1.MsgUpdateClient.chain_name": + panic(fmt.Errorf("field chain_name of message tibc.core.client.v1.MsgUpdateClient is not mutable")) + case "tibc.core.client.v1.MsgUpdateClient.signer": + panic(fmt.Errorf("field signer of message tibc.core.client.v1.MsgUpdateClient is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpdateClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpdateClient does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpdateClient) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.MsgUpdateClient.chain_name": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.MsgUpdateClient.header": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.client.v1.MsgUpdateClient.signer": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpdateClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpdateClient does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpdateClient) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.MsgUpdateClient", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpdateClient) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateClient) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpdateClient) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpdateClient) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateClient) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Header != nil { + l = options.Size(x.Header) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateClient) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0x1a + } + if x.Header != nil { + encoded, err := options.Marshal(x.Header) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateClient) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateClient: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateClient: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Header == nil { + x.Header = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Header); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateClientResponse protoreflect.MessageDescriptor +) + +func init() { + file_tibc_core_client_v1_tx_proto_init() + md_MsgUpdateClientResponse = File_tibc_core_client_v1_tx_proto.Messages().ByName("MsgUpdateClientResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateClientResponse)(nil) + +type fastReflection_MsgUpdateClientResponse MsgUpdateClientResponse + +func (x *MsgUpdateClientResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateClientResponse)(x) +} + +func (x *MsgUpdateClientResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_tx_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateClientResponse_messageType fastReflection_MsgUpdateClientResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateClientResponse_messageType{} + +type fastReflection_MsgUpdateClientResponse_messageType struct{} + +func (x fastReflection_MsgUpdateClientResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateClientResponse)(nil) +} +func (x fastReflection_MsgUpdateClientResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateClientResponse) +} +func (x fastReflection_MsgUpdateClientResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateClientResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateClientResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateClientResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpdateClientResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateClientResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateClientResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateClientResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateClientResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateClientResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpdateClientResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateClientResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpdateClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpdateClientResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateClientResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpdateClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpdateClientResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpdateClientResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpdateClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpdateClientResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateClientResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpdateClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpdateClientResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateClientResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpdateClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpdateClientResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpdateClientResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpdateClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpdateClientResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpdateClientResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.MsgUpdateClientResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpdateClientResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateClientResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpdateClientResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpdateClientResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateClientResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateClientResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateClientResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateClientResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateClientResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgCreateClient protoreflect.MessageDescriptor + fd_MsgCreateClient_title protoreflect.FieldDescriptor + fd_MsgCreateClient_description protoreflect.FieldDescriptor + fd_MsgCreateClient_chain_name protoreflect.FieldDescriptor + fd_MsgCreateClient_client_state protoreflect.FieldDescriptor + fd_MsgCreateClient_consensus_state protoreflect.FieldDescriptor + fd_MsgCreateClient_authority protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_tx_proto_init() + md_MsgCreateClient = File_tibc_core_client_v1_tx_proto.Messages().ByName("MsgCreateClient") + fd_MsgCreateClient_title = md_MsgCreateClient.Fields().ByName("title") + fd_MsgCreateClient_description = md_MsgCreateClient.Fields().ByName("description") + fd_MsgCreateClient_chain_name = md_MsgCreateClient.Fields().ByName("chain_name") + fd_MsgCreateClient_client_state = md_MsgCreateClient.Fields().ByName("client_state") + fd_MsgCreateClient_consensus_state = md_MsgCreateClient.Fields().ByName("consensus_state") + fd_MsgCreateClient_authority = md_MsgCreateClient.Fields().ByName("authority") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateClient)(nil) + +type fastReflection_MsgCreateClient MsgCreateClient + +func (x *MsgCreateClient) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateClient)(x) +} + +func (x *MsgCreateClient) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_tx_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgCreateClient_messageType fastReflection_MsgCreateClient_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateClient_messageType{} + +type fastReflection_MsgCreateClient_messageType struct{} + +func (x fastReflection_MsgCreateClient_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateClient)(nil) +} +func (x fastReflection_MsgCreateClient_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateClient) +} +func (x fastReflection_MsgCreateClient_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateClient +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateClient) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateClient +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgCreateClient) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateClient_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateClient) New() protoreflect.Message { + return new(fastReflection_MsgCreateClient) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateClient) Interface() protoreflect.ProtoMessage { + return (*MsgCreateClient)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgCreateClient) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_MsgCreateClient_title, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_MsgCreateClient_description, value) { + return + } + } + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_MsgCreateClient_chain_name, value) { + return + } + } + if x.ClientState != nil { + value := protoreflect.ValueOfMessage(x.ClientState.ProtoReflect()) + if !f(fd_MsgCreateClient_client_state, value) { + return + } + } + if x.ConsensusState != nil { + value := protoreflect.ValueOfMessage(x.ConsensusState.ProtoReflect()) + if !f(fd_MsgCreateClient_consensus_state, value) { + return + } + } + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgCreateClient_authority, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgCreateClient) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.MsgCreateClient.title": + return x.Title != "" + case "tibc.core.client.v1.MsgCreateClient.description": + return x.Description != "" + case "tibc.core.client.v1.MsgCreateClient.chain_name": + return x.ChainName != "" + case "tibc.core.client.v1.MsgCreateClient.client_state": + return x.ClientState != nil + case "tibc.core.client.v1.MsgCreateClient.consensus_state": + return x.ConsensusState != nil + case "tibc.core.client.v1.MsgCreateClient.authority": + return x.Authority != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgCreateClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgCreateClient does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateClient) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.MsgCreateClient.title": + x.Title = "" + case "tibc.core.client.v1.MsgCreateClient.description": + x.Description = "" + case "tibc.core.client.v1.MsgCreateClient.chain_name": + x.ChainName = "" + case "tibc.core.client.v1.MsgCreateClient.client_state": + x.ClientState = nil + case "tibc.core.client.v1.MsgCreateClient.consensus_state": + x.ConsensusState = nil + case "tibc.core.client.v1.MsgCreateClient.authority": + x.Authority = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgCreateClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgCreateClient does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgCreateClient) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.MsgCreateClient.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.MsgCreateClient.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.MsgCreateClient.chain_name": + value := x.ChainName + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.MsgCreateClient.client_state": + value := x.ClientState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.client.v1.MsgCreateClient.consensus_state": + value := x.ConsensusState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.client.v1.MsgCreateClient.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgCreateClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgCreateClient does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateClient) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.MsgCreateClient.title": + x.Title = value.Interface().(string) + case "tibc.core.client.v1.MsgCreateClient.description": + x.Description = value.Interface().(string) + case "tibc.core.client.v1.MsgCreateClient.chain_name": + x.ChainName = value.Interface().(string) + case "tibc.core.client.v1.MsgCreateClient.client_state": + x.ClientState = value.Message().Interface().(*anypb.Any) + case "tibc.core.client.v1.MsgCreateClient.consensus_state": + x.ConsensusState = value.Message().Interface().(*anypb.Any) + case "tibc.core.client.v1.MsgCreateClient.authority": + x.Authority = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgCreateClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgCreateClient does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateClient) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.MsgCreateClient.client_state": + if x.ClientState == nil { + x.ClientState = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.ClientState.ProtoReflect()) + case "tibc.core.client.v1.MsgCreateClient.consensus_state": + if x.ConsensusState == nil { + x.ConsensusState = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.ConsensusState.ProtoReflect()) + case "tibc.core.client.v1.MsgCreateClient.title": + panic(fmt.Errorf("field title of message tibc.core.client.v1.MsgCreateClient is not mutable")) + case "tibc.core.client.v1.MsgCreateClient.description": + panic(fmt.Errorf("field description of message tibc.core.client.v1.MsgCreateClient is not mutable")) + case "tibc.core.client.v1.MsgCreateClient.chain_name": + panic(fmt.Errorf("field chain_name of message tibc.core.client.v1.MsgCreateClient is not mutable")) + case "tibc.core.client.v1.MsgCreateClient.authority": + panic(fmt.Errorf("field authority of message tibc.core.client.v1.MsgCreateClient is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgCreateClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgCreateClient does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgCreateClient) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.MsgCreateClient.title": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.MsgCreateClient.description": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.MsgCreateClient.chain_name": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.MsgCreateClient.client_state": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.client.v1.MsgCreateClient.consensus_state": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.client.v1.MsgCreateClient.authority": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgCreateClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgCreateClient does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgCreateClient) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.MsgCreateClient", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgCreateClient) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateClient) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgCreateClient) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgCreateClient) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateClient) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Title) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ClientState != nil { + l = options.Size(x.ClientState) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ConsensusState != nil { + l = options.Size(x.ConsensusState) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgCreateClient) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0x32 + } + if x.ConsensusState != nil { + encoded, err := options.Marshal(x.ConsensusState) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if x.ClientState != nil { + encoded, err := options.Marshal(x.ClientState) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + i-- + dAtA[i] = 0x1a + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x12 + } + if len(x.Title) > 0 { + i -= len(x.Title) + copy(dAtA[i:], x.Title) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgCreateClient) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateClient: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateClient: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClientState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ClientState == nil { + x.ClientState = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ClientState); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConsensusState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ConsensusState == nil { + x.ConsensusState = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConsensusState); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgCreateClientResponse protoreflect.MessageDescriptor +) + +func init() { + file_tibc_core_client_v1_tx_proto_init() + md_MsgCreateClientResponse = File_tibc_core_client_v1_tx_proto.Messages().ByName("MsgCreateClientResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateClientResponse)(nil) + +type fastReflection_MsgCreateClientResponse MsgCreateClientResponse + +func (x *MsgCreateClientResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateClientResponse)(x) +} + +func (x *MsgCreateClientResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_tx_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgCreateClientResponse_messageType fastReflection_MsgCreateClientResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateClientResponse_messageType{} + +type fastReflection_MsgCreateClientResponse_messageType struct{} + +func (x fastReflection_MsgCreateClientResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateClientResponse)(nil) +} +func (x fastReflection_MsgCreateClientResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateClientResponse) +} +func (x fastReflection_MsgCreateClientResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateClientResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateClientResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateClientResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgCreateClientResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateClientResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateClientResponse) New() protoreflect.Message { + return new(fastReflection_MsgCreateClientResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateClientResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCreateClientResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgCreateClientResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgCreateClientResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgCreateClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgCreateClientResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateClientResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgCreateClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgCreateClientResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgCreateClientResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgCreateClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgCreateClientResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateClientResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgCreateClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgCreateClientResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateClientResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgCreateClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgCreateClientResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgCreateClientResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgCreateClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgCreateClientResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgCreateClientResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.MsgCreateClientResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgCreateClientResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCreateClientResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgCreateClientResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgCreateClientResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateClientResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgCreateClientResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgCreateClientResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateClientResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateClientResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpgradeClient protoreflect.MessageDescriptor + fd_MsgUpgradeClient_title protoreflect.FieldDescriptor + fd_MsgUpgradeClient_description protoreflect.FieldDescriptor + fd_MsgUpgradeClient_chain_name protoreflect.FieldDescriptor + fd_MsgUpgradeClient_client_state protoreflect.FieldDescriptor + fd_MsgUpgradeClient_consensus_state protoreflect.FieldDescriptor + fd_MsgUpgradeClient_authority protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_tx_proto_init() + md_MsgUpgradeClient = File_tibc_core_client_v1_tx_proto.Messages().ByName("MsgUpgradeClient") + fd_MsgUpgradeClient_title = md_MsgUpgradeClient.Fields().ByName("title") + fd_MsgUpgradeClient_description = md_MsgUpgradeClient.Fields().ByName("description") + fd_MsgUpgradeClient_chain_name = md_MsgUpgradeClient.Fields().ByName("chain_name") + fd_MsgUpgradeClient_client_state = md_MsgUpgradeClient.Fields().ByName("client_state") + fd_MsgUpgradeClient_consensus_state = md_MsgUpgradeClient.Fields().ByName("consensus_state") + fd_MsgUpgradeClient_authority = md_MsgUpgradeClient.Fields().ByName("authority") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpgradeClient)(nil) + +type fastReflection_MsgUpgradeClient MsgUpgradeClient + +func (x *MsgUpgradeClient) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpgradeClient)(x) +} + +func (x *MsgUpgradeClient) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_tx_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpgradeClient_messageType fastReflection_MsgUpgradeClient_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpgradeClient_messageType{} + +type fastReflection_MsgUpgradeClient_messageType struct{} + +func (x fastReflection_MsgUpgradeClient_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpgradeClient)(nil) +} +func (x fastReflection_MsgUpgradeClient_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpgradeClient) +} +func (x fastReflection_MsgUpgradeClient_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpgradeClient +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpgradeClient) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpgradeClient +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpgradeClient) Type() protoreflect.MessageType { + return _fastReflection_MsgUpgradeClient_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpgradeClient) New() protoreflect.Message { + return new(fastReflection_MsgUpgradeClient) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpgradeClient) Interface() protoreflect.ProtoMessage { + return (*MsgUpgradeClient)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpgradeClient) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_MsgUpgradeClient_title, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_MsgUpgradeClient_description, value) { + return + } + } + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_MsgUpgradeClient_chain_name, value) { + return + } + } + if x.ClientState != nil { + value := protoreflect.ValueOfMessage(x.ClientState.ProtoReflect()) + if !f(fd_MsgUpgradeClient_client_state, value) { + return + } + } + if x.ConsensusState != nil { + value := protoreflect.ValueOfMessage(x.ConsensusState.ProtoReflect()) + if !f(fd_MsgUpgradeClient_consensus_state, value) { + return + } + } + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgUpgradeClient_authority, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpgradeClient) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.MsgUpgradeClient.title": + return x.Title != "" + case "tibc.core.client.v1.MsgUpgradeClient.description": + return x.Description != "" + case "tibc.core.client.v1.MsgUpgradeClient.chain_name": + return x.ChainName != "" + case "tibc.core.client.v1.MsgUpgradeClient.client_state": + return x.ClientState != nil + case "tibc.core.client.v1.MsgUpgradeClient.consensus_state": + return x.ConsensusState != nil + case "tibc.core.client.v1.MsgUpgradeClient.authority": + return x.Authority != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpgradeClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpgradeClient does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpgradeClient) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.MsgUpgradeClient.title": + x.Title = "" + case "tibc.core.client.v1.MsgUpgradeClient.description": + x.Description = "" + case "tibc.core.client.v1.MsgUpgradeClient.chain_name": + x.ChainName = "" + case "tibc.core.client.v1.MsgUpgradeClient.client_state": + x.ClientState = nil + case "tibc.core.client.v1.MsgUpgradeClient.consensus_state": + x.ConsensusState = nil + case "tibc.core.client.v1.MsgUpgradeClient.authority": + x.Authority = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpgradeClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpgradeClient does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpgradeClient) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.MsgUpgradeClient.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.MsgUpgradeClient.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.MsgUpgradeClient.chain_name": + value := x.ChainName + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.MsgUpgradeClient.client_state": + value := x.ClientState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.client.v1.MsgUpgradeClient.consensus_state": + value := x.ConsensusState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.client.v1.MsgUpgradeClient.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpgradeClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpgradeClient does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpgradeClient) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.MsgUpgradeClient.title": + x.Title = value.Interface().(string) + case "tibc.core.client.v1.MsgUpgradeClient.description": + x.Description = value.Interface().(string) + case "tibc.core.client.v1.MsgUpgradeClient.chain_name": + x.ChainName = value.Interface().(string) + case "tibc.core.client.v1.MsgUpgradeClient.client_state": + x.ClientState = value.Message().Interface().(*anypb.Any) + case "tibc.core.client.v1.MsgUpgradeClient.consensus_state": + x.ConsensusState = value.Message().Interface().(*anypb.Any) + case "tibc.core.client.v1.MsgUpgradeClient.authority": + x.Authority = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpgradeClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpgradeClient does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpgradeClient) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.MsgUpgradeClient.client_state": + if x.ClientState == nil { + x.ClientState = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.ClientState.ProtoReflect()) + case "tibc.core.client.v1.MsgUpgradeClient.consensus_state": + if x.ConsensusState == nil { + x.ConsensusState = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.ConsensusState.ProtoReflect()) + case "tibc.core.client.v1.MsgUpgradeClient.title": + panic(fmt.Errorf("field title of message tibc.core.client.v1.MsgUpgradeClient is not mutable")) + case "tibc.core.client.v1.MsgUpgradeClient.description": + panic(fmt.Errorf("field description of message tibc.core.client.v1.MsgUpgradeClient is not mutable")) + case "tibc.core.client.v1.MsgUpgradeClient.chain_name": + panic(fmt.Errorf("field chain_name of message tibc.core.client.v1.MsgUpgradeClient is not mutable")) + case "tibc.core.client.v1.MsgUpgradeClient.authority": + panic(fmt.Errorf("field authority of message tibc.core.client.v1.MsgUpgradeClient is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpgradeClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpgradeClient does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpgradeClient) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.MsgUpgradeClient.title": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.MsgUpgradeClient.description": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.MsgUpgradeClient.chain_name": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.MsgUpgradeClient.client_state": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.client.v1.MsgUpgradeClient.consensus_state": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.client.v1.MsgUpgradeClient.authority": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpgradeClient")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpgradeClient does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpgradeClient) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.MsgUpgradeClient", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpgradeClient) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpgradeClient) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpgradeClient) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpgradeClient) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpgradeClient) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Title) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ClientState != nil { + l = options.Size(x.ClientState) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ConsensusState != nil { + l = options.Size(x.ConsensusState) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpgradeClient) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0x32 + } + if x.ConsensusState != nil { + encoded, err := options.Marshal(x.ConsensusState) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if x.ClientState != nil { + encoded, err := options.Marshal(x.ClientState) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + i-- + dAtA[i] = 0x1a + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x12 + } + if len(x.Title) > 0 { + i -= len(x.Title) + copy(dAtA[i:], x.Title) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpgradeClient) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpgradeClient: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpgradeClient: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClientState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ClientState == nil { + x.ClientState = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ClientState); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConsensusState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ConsensusState == nil { + x.ConsensusState = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ConsensusState); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpgradeClientResponse protoreflect.MessageDescriptor +) + +func init() { + file_tibc_core_client_v1_tx_proto_init() + md_MsgUpgradeClientResponse = File_tibc_core_client_v1_tx_proto.Messages().ByName("MsgUpgradeClientResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpgradeClientResponse)(nil) + +type fastReflection_MsgUpgradeClientResponse MsgUpgradeClientResponse + +func (x *MsgUpgradeClientResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpgradeClientResponse)(x) +} + +func (x *MsgUpgradeClientResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_tx_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpgradeClientResponse_messageType fastReflection_MsgUpgradeClientResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpgradeClientResponse_messageType{} + +type fastReflection_MsgUpgradeClientResponse_messageType struct{} + +func (x fastReflection_MsgUpgradeClientResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpgradeClientResponse)(nil) +} +func (x fastReflection_MsgUpgradeClientResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpgradeClientResponse) +} +func (x fastReflection_MsgUpgradeClientResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpgradeClientResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpgradeClientResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpgradeClientResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpgradeClientResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpgradeClientResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpgradeClientResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpgradeClientResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpgradeClientResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpgradeClientResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpgradeClientResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpgradeClientResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpgradeClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpgradeClientResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpgradeClientResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpgradeClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpgradeClientResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpgradeClientResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpgradeClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpgradeClientResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpgradeClientResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpgradeClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpgradeClientResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpgradeClientResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpgradeClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpgradeClientResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpgradeClientResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgUpgradeClientResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgUpgradeClientResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpgradeClientResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.MsgUpgradeClientResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpgradeClientResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpgradeClientResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpgradeClientResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpgradeClientResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpgradeClientResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpgradeClientResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpgradeClientResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpgradeClientResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpgradeClientResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgRegisterRelayer_4_list)(nil) + +type _MsgRegisterRelayer_4_list struct { + list *[]string +} + +func (x *_MsgRegisterRelayer_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgRegisterRelayer_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_MsgRegisterRelayer_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgRegisterRelayer_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgRegisterRelayer_4_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterRelayer at list field Relayers as it is not of Message kind")) +} + +func (x *_MsgRegisterRelayer_4_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgRegisterRelayer_4_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgRegisterRelayer_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgRegisterRelayer protoreflect.MessageDescriptor + fd_MsgRegisterRelayer_title protoreflect.FieldDescriptor + fd_MsgRegisterRelayer_description protoreflect.FieldDescriptor + fd_MsgRegisterRelayer_chain_name protoreflect.FieldDescriptor + fd_MsgRegisterRelayer_relayers protoreflect.FieldDescriptor + fd_MsgRegisterRelayer_authority protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_client_v1_tx_proto_init() + md_MsgRegisterRelayer = File_tibc_core_client_v1_tx_proto.Messages().ByName("MsgRegisterRelayer") + fd_MsgRegisterRelayer_title = md_MsgRegisterRelayer.Fields().ByName("title") + fd_MsgRegisterRelayer_description = md_MsgRegisterRelayer.Fields().ByName("description") + fd_MsgRegisterRelayer_chain_name = md_MsgRegisterRelayer.Fields().ByName("chain_name") + fd_MsgRegisterRelayer_relayers = md_MsgRegisterRelayer.Fields().ByName("relayers") + fd_MsgRegisterRelayer_authority = md_MsgRegisterRelayer.Fields().ByName("authority") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterRelayer)(nil) + +type fastReflection_MsgRegisterRelayer MsgRegisterRelayer + +func (x *MsgRegisterRelayer) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterRelayer)(x) +} + +func (x *MsgRegisterRelayer) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_tx_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRegisterRelayer_messageType fastReflection_MsgRegisterRelayer_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterRelayer_messageType{} + +type fastReflection_MsgRegisterRelayer_messageType struct{} + +func (x fastReflection_MsgRegisterRelayer_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterRelayer)(nil) +} +func (x fastReflection_MsgRegisterRelayer_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterRelayer) +} +func (x fastReflection_MsgRegisterRelayer_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterRelayer +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterRelayer) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterRelayer +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRegisterRelayer) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterRelayer_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterRelayer) New() protoreflect.Message { + return new(fastReflection_MsgRegisterRelayer) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterRelayer) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterRelayer)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRegisterRelayer) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_MsgRegisterRelayer_title, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_MsgRegisterRelayer_description, value) { + return + } + } + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_MsgRegisterRelayer_chain_name, value) { + return + } + } + if len(x.Relayers) != 0 { + value := protoreflect.ValueOfList(&_MsgRegisterRelayer_4_list{list: &x.Relayers}) + if !f(fd_MsgRegisterRelayer_relayers, value) { + return + } + } + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgRegisterRelayer_authority, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRegisterRelayer) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.client.v1.MsgRegisterRelayer.title": + return x.Title != "" + case "tibc.core.client.v1.MsgRegisterRelayer.description": + return x.Description != "" + case "tibc.core.client.v1.MsgRegisterRelayer.chain_name": + return x.ChainName != "" + case "tibc.core.client.v1.MsgRegisterRelayer.relayers": + return len(x.Relayers) != 0 + case "tibc.core.client.v1.MsgRegisterRelayer.authority": + return x.Authority != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgRegisterRelayer")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgRegisterRelayer does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterRelayer) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.client.v1.MsgRegisterRelayer.title": + x.Title = "" + case "tibc.core.client.v1.MsgRegisterRelayer.description": + x.Description = "" + case "tibc.core.client.v1.MsgRegisterRelayer.chain_name": + x.ChainName = "" + case "tibc.core.client.v1.MsgRegisterRelayer.relayers": + x.Relayers = nil + case "tibc.core.client.v1.MsgRegisterRelayer.authority": + x.Authority = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgRegisterRelayer")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgRegisterRelayer does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRegisterRelayer) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.client.v1.MsgRegisterRelayer.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.MsgRegisterRelayer.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.MsgRegisterRelayer.chain_name": + value := x.ChainName + return protoreflect.ValueOfString(value) + case "tibc.core.client.v1.MsgRegisterRelayer.relayers": + if len(x.Relayers) == 0 { + return protoreflect.ValueOfList(&_MsgRegisterRelayer_4_list{}) + } + listValue := &_MsgRegisterRelayer_4_list{list: &x.Relayers} + return protoreflect.ValueOfList(listValue) + case "tibc.core.client.v1.MsgRegisterRelayer.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgRegisterRelayer")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgRegisterRelayer does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterRelayer) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.client.v1.MsgRegisterRelayer.title": + x.Title = value.Interface().(string) + case "tibc.core.client.v1.MsgRegisterRelayer.description": + x.Description = value.Interface().(string) + case "tibc.core.client.v1.MsgRegisterRelayer.chain_name": + x.ChainName = value.Interface().(string) + case "tibc.core.client.v1.MsgRegisterRelayer.relayers": + lv := value.List() + clv := lv.(*_MsgRegisterRelayer_4_list) + x.Relayers = *clv.list + case "tibc.core.client.v1.MsgRegisterRelayer.authority": + x.Authority = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgRegisterRelayer")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgRegisterRelayer does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterRelayer) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.MsgRegisterRelayer.relayers": + if x.Relayers == nil { + x.Relayers = []string{} + } + value := &_MsgRegisterRelayer_4_list{list: &x.Relayers} + return protoreflect.ValueOfList(value) + case "tibc.core.client.v1.MsgRegisterRelayer.title": + panic(fmt.Errorf("field title of message tibc.core.client.v1.MsgRegisterRelayer is not mutable")) + case "tibc.core.client.v1.MsgRegisterRelayer.description": + panic(fmt.Errorf("field description of message tibc.core.client.v1.MsgRegisterRelayer is not mutable")) + case "tibc.core.client.v1.MsgRegisterRelayer.chain_name": + panic(fmt.Errorf("field chain_name of message tibc.core.client.v1.MsgRegisterRelayer is not mutable")) + case "tibc.core.client.v1.MsgRegisterRelayer.authority": + panic(fmt.Errorf("field authority of message tibc.core.client.v1.MsgRegisterRelayer is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgRegisterRelayer")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgRegisterRelayer does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRegisterRelayer) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.client.v1.MsgRegisterRelayer.title": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.MsgRegisterRelayer.description": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.MsgRegisterRelayer.chain_name": + return protoreflect.ValueOfString("") + case "tibc.core.client.v1.MsgRegisterRelayer.relayers": + list := []string{} + return protoreflect.ValueOfList(&_MsgRegisterRelayer_4_list{list: &list}) + case "tibc.core.client.v1.MsgRegisterRelayer.authority": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgRegisterRelayer")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgRegisterRelayer does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRegisterRelayer) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.MsgRegisterRelayer", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRegisterRelayer) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterRelayer) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRegisterRelayer) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRegisterRelayer) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterRelayer) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Title) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Relayers) > 0 { + for _, s := range x.Relayers { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterRelayer) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0x2a + } + if len(x.Relayers) > 0 { + for iNdEx := len(x.Relayers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Relayers[iNdEx]) + copy(dAtA[i:], x.Relayers[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Relayers[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + i-- + dAtA[i] = 0x1a + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x12 + } + if len(x.Title) > 0 { + i -= len(x.Title) + copy(dAtA[i:], x.Title) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterRelayer) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterRelayer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterRelayer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Relayers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Relayers = append(x.Relayers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgRegisterRelayerResponse protoreflect.MessageDescriptor +) + +func init() { + file_tibc_core_client_v1_tx_proto_init() + md_MsgRegisterRelayerResponse = File_tibc_core_client_v1_tx_proto.Messages().ByName("MsgRegisterRelayerResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterRelayerResponse)(nil) + +type fastReflection_MsgRegisterRelayerResponse MsgRegisterRelayerResponse + +func (x *MsgRegisterRelayerResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterRelayerResponse)(x) +} + +func (x *MsgRegisterRelayerResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_client_v1_tx_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRegisterRelayerResponse_messageType fastReflection_MsgRegisterRelayerResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterRelayerResponse_messageType{} + +type fastReflection_MsgRegisterRelayerResponse_messageType struct{} + +func (x fastReflection_MsgRegisterRelayerResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterRelayerResponse)(nil) +} +func (x fastReflection_MsgRegisterRelayerResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterRelayerResponse) +} +func (x fastReflection_MsgRegisterRelayerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterRelayerResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterRelayerResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterRelayerResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRegisterRelayerResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterRelayerResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterRelayerResponse) New() protoreflect.Message { + return new(fastReflection_MsgRegisterRelayerResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterRelayerResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterRelayerResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRegisterRelayerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRegisterRelayerResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgRegisterRelayerResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgRegisterRelayerResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterRelayerResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgRegisterRelayerResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgRegisterRelayerResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRegisterRelayerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgRegisterRelayerResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgRegisterRelayerResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterRelayerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgRegisterRelayerResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgRegisterRelayerResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterRelayerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgRegisterRelayerResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgRegisterRelayerResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRegisterRelayerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.client.v1.MsgRegisterRelayerResponse")) + } + panic(fmt.Errorf("message tibc.core.client.v1.MsgRegisterRelayerResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRegisterRelayerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.client.v1.MsgRegisterRelayerResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRegisterRelayerResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterRelayerResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRegisterRelayerResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRegisterRelayerResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterRelayerResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterRelayerResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterRelayerResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterRelayerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterRelayerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: tibc/core/client/v1/tx.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// MsgUpdateClient defines an sdk.Msg to update a TIBC client state using +// the given header. +type MsgUpdateClient struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // client unique identifier + ChainName string `protobuf:"bytes,1,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + // header to update the light client + Header *anypb.Any `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"` + // signer address + Signer string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (x *MsgUpdateClient) Reset() { + *x = MsgUpdateClient{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateClient) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateClient) ProtoMessage() {} + +// Deprecated: Use MsgUpdateClient.ProtoReflect.Descriptor instead. +func (*MsgUpdateClient) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgUpdateClient) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +func (x *MsgUpdateClient) GetHeader() *anypb.Any { + if x != nil { + return x.Header + } + return nil +} + +func (x *MsgUpdateClient) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +// MsgUpdateClientResponse defines the Msg/UpdateClient response type. +type MsgUpdateClientResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateClientResponse) Reset() { + *x = MsgUpdateClientResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateClientResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateClientResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateClientResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateClientResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_tx_proto_rawDescGZIP(), []int{1} +} + +// MsgCreateClient defines a overnance proposal to create an TIBC client +type MsgCreateClient struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the title of the update proposal + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // the description of the proposal + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // the client identifier for the client to be updated if the proposal passes + ChainName string `protobuf:"bytes,3,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + // light client state + ClientState *anypb.Any `protobuf:"bytes,4,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty"` + // consensus state associated with the client that corresponds to a given + // height. + ConsensusState *anypb.Any `protobuf:"bytes,5,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty"` + // authority is the address that controls the module (defaults to x/gov unless + // overwritten). + Authority string `protobuf:"bytes,6,opt,name=authority,proto3" json:"authority,omitempty"` +} + +func (x *MsgCreateClient) Reset() { + *x = MsgCreateClient{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateClient) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateClient) ProtoMessage() {} + +// Deprecated: Use MsgCreateClient.ProtoReflect.Descriptor instead. +func (*MsgCreateClient) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgCreateClient) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *MsgCreateClient) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *MsgCreateClient) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +func (x *MsgCreateClient) GetClientState() *anypb.Any { + if x != nil { + return x.ClientState + } + return nil +} + +func (x *MsgCreateClient) GetConsensusState() *anypb.Any { + if x != nil { + return x.ConsensusState + } + return nil +} + +func (x *MsgCreateClient) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +// MsgCreateClientResponse defines the Msg/UpdateClient response type. +type MsgCreateClientResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgCreateClientResponse) Reset() { + *x = MsgCreateClientResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateClientResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateClientResponse) ProtoMessage() {} + +// Deprecated: Use MsgCreateClientResponse.ProtoReflect.Descriptor instead. +func (*MsgCreateClientResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_tx_proto_rawDescGZIP(), []int{3} +} + +// MsgUpgradeClient defines a overnance proposal to overide an TIBC client +// state +type MsgUpgradeClient struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the title of the update proposal + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // the description of the proposal + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // the client identifier for the client to be updated if the proposal passes + ChainName string `protobuf:"bytes,3,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + // client state + ClientState *anypb.Any `protobuf:"bytes,4,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty"` + // consensus state + ConsensusState *anypb.Any `protobuf:"bytes,5,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty"` + // authority is the address that controls the module (defaults to x/gov unless + // overwritten). + Authority string `protobuf:"bytes,6,opt,name=authority,proto3" json:"authority,omitempty"` +} + +func (x *MsgUpgradeClient) Reset() { + *x = MsgUpgradeClient{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpgradeClient) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpgradeClient) ProtoMessage() {} + +// Deprecated: Use MsgUpgradeClient.ProtoReflect.Descriptor instead. +func (*MsgUpgradeClient) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgUpgradeClient) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *MsgUpgradeClient) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *MsgUpgradeClient) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +func (x *MsgUpgradeClient) GetClientState() *anypb.Any { + if x != nil { + return x.ClientState + } + return nil +} + +func (x *MsgUpgradeClient) GetConsensusState() *anypb.Any { + if x != nil { + return x.ConsensusState + } + return nil +} + +func (x *MsgUpgradeClient) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +// MsgCreateClientResponse defines the Msg/UpdateClient response type. +type MsgUpgradeClientResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpgradeClientResponse) Reset() { + *x = MsgUpgradeClientResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpgradeClientResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpgradeClientResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpgradeClientResponse.ProtoReflect.Descriptor instead. +func (*MsgUpgradeClientResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_tx_proto_rawDescGZIP(), []int{5} +} + +// MsgRegisterRelayer defines a overnance proposal to register some +// relayers for updating a client state. +type MsgRegisterRelayer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the title of the update proposal + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // the description of the proposal + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // the client identifier for the client to be updated if the proposal passes + ChainName string `protobuf:"bytes,3,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + // relayer address list + Relayers []string `protobuf:"bytes,4,rep,name=relayers,proto3" json:"relayers,omitempty"` + // authority is the address that controls the module (defaults to x/gov unless + // overwritten). + Authority string `protobuf:"bytes,5,opt,name=authority,proto3" json:"authority,omitempty"` +} + +func (x *MsgRegisterRelayer) Reset() { + *x = MsgRegisterRelayer{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterRelayer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterRelayer) ProtoMessage() {} + +// Deprecated: Use MsgRegisterRelayer.ProtoReflect.Descriptor instead. +func (*MsgRegisterRelayer) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgRegisterRelayer) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *MsgRegisterRelayer) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *MsgRegisterRelayer) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +func (x *MsgRegisterRelayer) GetRelayers() []string { + if x != nil { + return x.Relayers + } + return nil +} + +func (x *MsgRegisterRelayer) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +// MsgRegisterRelayerResponse defines the Msg/UpdateClient response type. +type MsgRegisterRelayerResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgRegisterRelayerResponse) Reset() { + *x = MsgRegisterRelayerResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_client_v1_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterRelayerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterRelayerResponse) ProtoMessage() {} + +// Deprecated: Use MsgRegisterRelayerResponse.ProtoReflect.Descriptor instead. +func (*MsgRegisterRelayerResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_client_v1_tx_proto_rawDescGZIP(), []int{7} +} + +var File_tibc_core_client_v1_tx_proto protoreflect.FileDescriptor + +var file_tibc_core_client_v1_tx_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, + 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8b, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, + 0x79, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x3a, 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0xac, 0x02, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, + 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0c, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3d, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, + 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x12, 0x88, 0xa0, + 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xad, 0x02, 0x0a, 0x10, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x3d, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, + 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x12, 0x88, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, + 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x1a, 0x0a, 0x18, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd3, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x12, 0x88, 0xa0, 0x1f, 0x00, 0x82, + 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x1c, 0x0a, + 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa8, 0x03, 0x0a, 0x03, + 0x4d, 0x73, 0x67, 0x12, 0x62, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x12, 0x24, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x1a, 0x2c, 0x2e, 0x74, 0x69, 0x62, 0x63, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x1a, 0x2c, 0x2e, + 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0d, 0x55, + 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x74, + 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x1a, 0x2d, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x1a, 0x2f, + 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, + 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd0, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x74, + 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x69, 0x61, 0x6e, 0x6a, 0x69, + 0x65, 0x61, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, + 0x43, 0x43, 0xaa, 0x02, 0x13, 0x54, 0x69, 0x62, 0x63, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x54, 0x69, 0x62, 0x63, 0x5c, + 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, + 0x1f, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x16, 0x54, 0x69, 0x62, 0x63, 0x3a, 0x3a, 0x43, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_tibc_core_client_v1_tx_proto_rawDescOnce sync.Once + file_tibc_core_client_v1_tx_proto_rawDescData = file_tibc_core_client_v1_tx_proto_rawDesc +) + +func file_tibc_core_client_v1_tx_proto_rawDescGZIP() []byte { + file_tibc_core_client_v1_tx_proto_rawDescOnce.Do(func() { + file_tibc_core_client_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_tibc_core_client_v1_tx_proto_rawDescData) + }) + return file_tibc_core_client_v1_tx_proto_rawDescData +} + +var file_tibc_core_client_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_tibc_core_client_v1_tx_proto_goTypes = []interface{}{ + (*MsgUpdateClient)(nil), // 0: tibc.core.client.v1.MsgUpdateClient + (*MsgUpdateClientResponse)(nil), // 1: tibc.core.client.v1.MsgUpdateClientResponse + (*MsgCreateClient)(nil), // 2: tibc.core.client.v1.MsgCreateClient + (*MsgCreateClientResponse)(nil), // 3: tibc.core.client.v1.MsgCreateClientResponse + (*MsgUpgradeClient)(nil), // 4: tibc.core.client.v1.MsgUpgradeClient + (*MsgUpgradeClientResponse)(nil), // 5: tibc.core.client.v1.MsgUpgradeClientResponse + (*MsgRegisterRelayer)(nil), // 6: tibc.core.client.v1.MsgRegisterRelayer + (*MsgRegisterRelayerResponse)(nil), // 7: tibc.core.client.v1.MsgRegisterRelayerResponse + (*anypb.Any)(nil), // 8: google.protobuf.Any +} +var file_tibc_core_client_v1_tx_proto_depIdxs = []int32{ + 8, // 0: tibc.core.client.v1.MsgUpdateClient.header:type_name -> google.protobuf.Any + 8, // 1: tibc.core.client.v1.MsgCreateClient.client_state:type_name -> google.protobuf.Any + 8, // 2: tibc.core.client.v1.MsgCreateClient.consensus_state:type_name -> google.protobuf.Any + 8, // 3: tibc.core.client.v1.MsgUpgradeClient.client_state:type_name -> google.protobuf.Any + 8, // 4: tibc.core.client.v1.MsgUpgradeClient.consensus_state:type_name -> google.protobuf.Any + 2, // 5: tibc.core.client.v1.Msg.CreateClient:input_type -> tibc.core.client.v1.MsgCreateClient + 0, // 6: tibc.core.client.v1.Msg.UpdateClient:input_type -> tibc.core.client.v1.MsgUpdateClient + 4, // 7: tibc.core.client.v1.Msg.UpgradeClient:input_type -> tibc.core.client.v1.MsgUpgradeClient + 6, // 8: tibc.core.client.v1.Msg.RegisterRelayer:input_type -> tibc.core.client.v1.MsgRegisterRelayer + 3, // 9: tibc.core.client.v1.Msg.CreateClient:output_type -> tibc.core.client.v1.MsgCreateClientResponse + 1, // 10: tibc.core.client.v1.Msg.UpdateClient:output_type -> tibc.core.client.v1.MsgUpdateClientResponse + 5, // 11: tibc.core.client.v1.Msg.UpgradeClient:output_type -> tibc.core.client.v1.MsgUpgradeClientResponse + 7, // 12: tibc.core.client.v1.Msg.RegisterRelayer:output_type -> tibc.core.client.v1.MsgRegisterRelayerResponse + 9, // [9:13] is the sub-list for method output_type + 5, // [5:9] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_tibc_core_client_v1_tx_proto_init() } +func file_tibc_core_client_v1_tx_proto_init() { + if File_tibc_core_client_v1_tx_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_tibc_core_client_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateClient); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateClientResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateClient); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateClientResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpgradeClient); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpgradeClientResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRegisterRelayer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_client_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRegisterRelayerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_tibc_core_client_v1_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_tibc_core_client_v1_tx_proto_goTypes, + DependencyIndexes: file_tibc_core_client_v1_tx_proto_depIdxs, + MessageInfos: file_tibc_core_client_v1_tx_proto_msgTypes, + }.Build() + File_tibc_core_client_v1_tx_proto = out.File + file_tibc_core_client_v1_tx_proto_rawDesc = nil + file_tibc_core_client_v1_tx_proto_goTypes = nil + file_tibc_core_client_v1_tx_proto_depIdxs = nil +} diff --git a/api/tibc/core/client/v1/tx_grpc.pb.go b/api/tibc/core/client/v1/tx_grpc.pb.go new file mode 100644 index 00000000..0120a245 --- /dev/null +++ b/api/tibc/core/client/v1/tx_grpc.pb.go @@ -0,0 +1,247 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: tibc/core/client/v1/tx.proto + +package clientv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Msg_CreateClient_FullMethodName = "/tibc.core.client.v1.Msg/CreateClient" + Msg_UpdateClient_FullMethodName = "/tibc.core.client.v1.Msg/UpdateClient" + Msg_UpgradeClient_FullMethodName = "/tibc.core.client.v1.Msg/UpgradeClient" + Msg_RegisterRelayer_FullMethodName = "/tibc.core.client.v1.Msg/RegisterRelayer" +) + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Msg defines the tibc/client Msg service. +type MsgClient interface { + // CreateClient defines a rpc handler method for MsgCreateClient. + CreateClient(ctx context.Context, in *MsgCreateClient, opts ...grpc.CallOption) (*MsgCreateClientResponse, error) + // UpdateClient defines a rpc handler method for MsgUpdateClient. + UpdateClient(ctx context.Context, in *MsgUpdateClient, opts ...grpc.CallOption) (*MsgUpdateClientResponse, error) + // UpgradeClient defines a rpc handler method for MsgUpgradeClient. + UpgradeClient(ctx context.Context, in *MsgUpgradeClient, opts ...grpc.CallOption) (*MsgUpgradeClientResponse, error) + // RegisterRelayer defines a rpc handler method for MsgRegisterRelayer. + RegisterRelayer(ctx context.Context, in *MsgRegisterRelayer, opts ...grpc.CallOption) (*MsgRegisterRelayerResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateClient(ctx context.Context, in *MsgCreateClient, opts ...grpc.CallOption) (*MsgCreateClientResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgCreateClientResponse) + err := c.cc.Invoke(ctx, Msg_CreateClient_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateClient(ctx context.Context, in *MsgUpdateClient, opts ...grpc.CallOption) (*MsgUpdateClientResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpdateClientResponse) + err := c.cc.Invoke(ctx, Msg_UpdateClient_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpgradeClient(ctx context.Context, in *MsgUpgradeClient, opts ...grpc.CallOption) (*MsgUpgradeClientResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgUpgradeClientResponse) + err := c.cc.Invoke(ctx, Msg_UpgradeClient_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RegisterRelayer(ctx context.Context, in *MsgRegisterRelayer, opts ...grpc.CallOption) (*MsgRegisterRelayerResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgRegisterRelayerResponse) + err := c.cc.Invoke(ctx, Msg_RegisterRelayer_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility. +// +// Msg defines the tibc/client Msg service. +type MsgServer interface { + // CreateClient defines a rpc handler method for MsgCreateClient. + CreateClient(context.Context, *MsgCreateClient) (*MsgCreateClientResponse, error) + // UpdateClient defines a rpc handler method for MsgUpdateClient. + UpdateClient(context.Context, *MsgUpdateClient) (*MsgUpdateClientResponse, error) + // UpgradeClient defines a rpc handler method for MsgUpgradeClient. + UpgradeClient(context.Context, *MsgUpgradeClient) (*MsgUpgradeClientResponse, error) + // RegisterRelayer defines a rpc handler method for MsgRegisterRelayer. + RegisterRelayer(context.Context, *MsgRegisterRelayer) (*MsgRegisterRelayerResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedMsgServer struct{} + +func (UnimplementedMsgServer) CreateClient(context.Context, *MsgCreateClient) (*MsgCreateClientResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateClient not implemented") +} +func (UnimplementedMsgServer) UpdateClient(context.Context, *MsgUpdateClient) (*MsgUpdateClientResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateClient not implemented") +} +func (UnimplementedMsgServer) UpgradeClient(context.Context, *MsgUpgradeClient) (*MsgUpgradeClientResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpgradeClient not implemented") +} +func (UnimplementedMsgServer) RegisterRelayer(context.Context, *MsgRegisterRelayer) (*MsgRegisterRelayerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterRelayer not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} +func (UnimplementedMsgServer) testEmbeddedByValue() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + // If the following call pancis, it indicates UnimplementedMsgServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_CreateClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateClient) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateClient(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_CreateClient_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateClient(ctx, req.(*MsgCreateClient)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateClient) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateClient(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateClient_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateClient(ctx, req.(*MsgUpdateClient)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpgradeClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpgradeClient) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpgradeClient(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpgradeClient_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpgradeClient(ctx, req.(*MsgUpgradeClient)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RegisterRelayer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterRelayer) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RegisterRelayer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_RegisterRelayer_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RegisterRelayer(ctx, req.(*MsgRegisterRelayer)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "tibc.core.client.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateClient", + Handler: _Msg_CreateClient_Handler, + }, + { + MethodName: "UpdateClient", + Handler: _Msg_UpdateClient_Handler, + }, + { + MethodName: "UpgradeClient", + Handler: _Msg_UpgradeClient_Handler, + }, + { + MethodName: "RegisterRelayer", + Handler: _Msg_RegisterRelayer_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "tibc/core/client/v1/tx.proto", +} diff --git a/api/tibc/core/packet/v1/genesis.pulsar.go b/api/tibc/core/packet/v1/genesis.pulsar.go new file mode 100644 index 00000000..f26ef560 --- /dev/null +++ b/api/tibc/core/packet/v1/genesis.pulsar.go @@ -0,0 +1,2029 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package packetv1 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_GenesisState_2_list)(nil) + +type _GenesisState_2_list struct { + list *[]*PacketState +} + +func (x *_GenesisState_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PacketState) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PacketState) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { + v := new(PacketState) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_2_list) NewElement() protoreflect.Value { + v := new(PacketState) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_3_list)(nil) + +type _GenesisState_3_list struct { + list *[]*PacketState +} + +func (x *_GenesisState_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PacketState) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PacketState) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { + v := new(PacketState) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_3_list) NewElement() protoreflect.Value { + v := new(PacketState) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_4_list)(nil) + +type _GenesisState_4_list struct { + list *[]*PacketState +} + +func (x *_GenesisState_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PacketState) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PacketState) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_4_list) AppendMutable() protoreflect.Value { + v := new(PacketState) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_4_list) NewElement() protoreflect.Value { + v := new(PacketState) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_4_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_5_list)(nil) + +type _GenesisState_5_list struct { + list *[]*PacketSequence +} + +func (x *_GenesisState_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PacketSequence) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PacketSequence) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_5_list) AppendMutable() protoreflect.Value { + v := new(PacketSequence) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_5_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_5_list) NewElement() protoreflect.Value { + v := new(PacketSequence) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_5_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_6_list)(nil) + +type _GenesisState_6_list struct { + list *[]*PacketSequence +} + +func (x *_GenesisState_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PacketSequence) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PacketSequence) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_6_list) AppendMutable() protoreflect.Value { + v := new(PacketSequence) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_6_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_6_list) NewElement() protoreflect.Value { + v := new(PacketSequence) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_6_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_GenesisState_7_list)(nil) + +type _GenesisState_7_list struct { + list *[]*PacketSequence +} + +func (x *_GenesisState_7_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_7_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_7_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PacketSequence) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_7_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PacketSequence) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_7_list) AppendMutable() protoreflect.Value { + v := new(PacketSequence) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_7_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_7_list) NewElement() protoreflect.Value { + v := new(PacketSequence) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_7_list) IsValid() bool { + return x.list != nil +} + +var ( + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_acknowledgements protoreflect.FieldDescriptor + fd_GenesisState_commitments protoreflect.FieldDescriptor + fd_GenesisState_receipts protoreflect.FieldDescriptor + fd_GenesisState_send_sequences protoreflect.FieldDescriptor + fd_GenesisState_recv_sequences protoreflect.FieldDescriptor + fd_GenesisState_ack_sequences protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_genesis_proto_init() + md_GenesisState = File_tibc_core_packet_v1_genesis_proto.Messages().ByName("GenesisState") + fd_GenesisState_acknowledgements = md_GenesisState.Fields().ByName("acknowledgements") + fd_GenesisState_commitments = md_GenesisState.Fields().ByName("commitments") + fd_GenesisState_receipts = md_GenesisState.Fields().ByName("receipts") + fd_GenesisState_send_sequences = md_GenesisState.Fields().ByName("send_sequences") + fd_GenesisState_recv_sequences = md_GenesisState.Fields().ByName("recv_sequences") + fd_GenesisState_ack_sequences = md_GenesisState.Fields().ByName("ack_sequences") +} + +var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) + +type fastReflection_GenesisState GenesisState + +func (x *GenesisState) ProtoReflect() protoreflect.Message { + return (*fastReflection_GenesisState)(x) +} + +func (x *GenesisState) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_genesis_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType +var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} + +type fastReflection_GenesisState_messageType struct{} + +func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { + return (*fastReflection_GenesisState)(nil) +} +func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} +func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { + return _fastReflection_GenesisState_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GenesisState) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { + return (*GenesisState)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Acknowledgements) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.Acknowledgements}) + if !f(fd_GenesisState_acknowledgements, value) { + return + } + } + if len(x.Commitments) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.Commitments}) + if !f(fd_GenesisState_commitments, value) { + return + } + } + if len(x.Receipts) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_4_list{list: &x.Receipts}) + if !f(fd_GenesisState_receipts, value) { + return + } + } + if len(x.SendSequences) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_5_list{list: &x.SendSequences}) + if !f(fd_GenesisState_send_sequences, value) { + return + } + } + if len(x.RecvSequences) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_6_list{list: &x.RecvSequences}) + if !f(fd_GenesisState_recv_sequences, value) { + return + } + } + if len(x.AckSequences) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_7_list{list: &x.AckSequences}) + if !f(fd_GenesisState_ack_sequences, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.GenesisState.acknowledgements": + return len(x.Acknowledgements) != 0 + case "tibc.core.packet.v1.GenesisState.commitments": + return len(x.Commitments) != 0 + case "tibc.core.packet.v1.GenesisState.receipts": + return len(x.Receipts) != 0 + case "tibc.core.packet.v1.GenesisState.send_sequences": + return len(x.SendSequences) != 0 + case "tibc.core.packet.v1.GenesisState.recv_sequences": + return len(x.RecvSequences) != 0 + case "tibc.core.packet.v1.GenesisState.ack_sequences": + return len(x.AckSequences) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.GenesisState.acknowledgements": + x.Acknowledgements = nil + case "tibc.core.packet.v1.GenesisState.commitments": + x.Commitments = nil + case "tibc.core.packet.v1.GenesisState.receipts": + x.Receipts = nil + case "tibc.core.packet.v1.GenesisState.send_sequences": + x.SendSequences = nil + case "tibc.core.packet.v1.GenesisState.recv_sequences": + x.RecvSequences = nil + case "tibc.core.packet.v1.GenesisState.ack_sequences": + x.AckSequences = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.GenesisState.acknowledgements": + if len(x.Acknowledgements) == 0 { + return protoreflect.ValueOfList(&_GenesisState_2_list{}) + } + listValue := &_GenesisState_2_list{list: &x.Acknowledgements} + return protoreflect.ValueOfList(listValue) + case "tibc.core.packet.v1.GenesisState.commitments": + if len(x.Commitments) == 0 { + return protoreflect.ValueOfList(&_GenesisState_3_list{}) + } + listValue := &_GenesisState_3_list{list: &x.Commitments} + return protoreflect.ValueOfList(listValue) + case "tibc.core.packet.v1.GenesisState.receipts": + if len(x.Receipts) == 0 { + return protoreflect.ValueOfList(&_GenesisState_4_list{}) + } + listValue := &_GenesisState_4_list{list: &x.Receipts} + return protoreflect.ValueOfList(listValue) + case "tibc.core.packet.v1.GenesisState.send_sequences": + if len(x.SendSequences) == 0 { + return protoreflect.ValueOfList(&_GenesisState_5_list{}) + } + listValue := &_GenesisState_5_list{list: &x.SendSequences} + return protoreflect.ValueOfList(listValue) + case "tibc.core.packet.v1.GenesisState.recv_sequences": + if len(x.RecvSequences) == 0 { + return protoreflect.ValueOfList(&_GenesisState_6_list{}) + } + listValue := &_GenesisState_6_list{list: &x.RecvSequences} + return protoreflect.ValueOfList(listValue) + case "tibc.core.packet.v1.GenesisState.ack_sequences": + if len(x.AckSequences) == 0 { + return protoreflect.ValueOfList(&_GenesisState_7_list{}) + } + listValue := &_GenesisState_7_list{list: &x.AckSequences} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.GenesisState does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.GenesisState.acknowledgements": + lv := value.List() + clv := lv.(*_GenesisState_2_list) + x.Acknowledgements = *clv.list + case "tibc.core.packet.v1.GenesisState.commitments": + lv := value.List() + clv := lv.(*_GenesisState_3_list) + x.Commitments = *clv.list + case "tibc.core.packet.v1.GenesisState.receipts": + lv := value.List() + clv := lv.(*_GenesisState_4_list) + x.Receipts = *clv.list + case "tibc.core.packet.v1.GenesisState.send_sequences": + lv := value.List() + clv := lv.(*_GenesisState_5_list) + x.SendSequences = *clv.list + case "tibc.core.packet.v1.GenesisState.recv_sequences": + lv := value.List() + clv := lv.(*_GenesisState_6_list) + x.RecvSequences = *clv.list + case "tibc.core.packet.v1.GenesisState.ack_sequences": + lv := value.List() + clv := lv.(*_GenesisState_7_list) + x.AckSequences = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.GenesisState.acknowledgements": + if x.Acknowledgements == nil { + x.Acknowledgements = []*PacketState{} + } + value := &_GenesisState_2_list{list: &x.Acknowledgements} + return protoreflect.ValueOfList(value) + case "tibc.core.packet.v1.GenesisState.commitments": + if x.Commitments == nil { + x.Commitments = []*PacketState{} + } + value := &_GenesisState_3_list{list: &x.Commitments} + return protoreflect.ValueOfList(value) + case "tibc.core.packet.v1.GenesisState.receipts": + if x.Receipts == nil { + x.Receipts = []*PacketState{} + } + value := &_GenesisState_4_list{list: &x.Receipts} + return protoreflect.ValueOfList(value) + case "tibc.core.packet.v1.GenesisState.send_sequences": + if x.SendSequences == nil { + x.SendSequences = []*PacketSequence{} + } + value := &_GenesisState_5_list{list: &x.SendSequences} + return protoreflect.ValueOfList(value) + case "tibc.core.packet.v1.GenesisState.recv_sequences": + if x.RecvSequences == nil { + x.RecvSequences = []*PacketSequence{} + } + value := &_GenesisState_6_list{list: &x.RecvSequences} + return protoreflect.ValueOfList(value) + case "tibc.core.packet.v1.GenesisState.ack_sequences": + if x.AckSequences == nil { + x.AckSequences = []*PacketSequence{} + } + value := &_GenesisState_7_list{list: &x.AckSequences} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.GenesisState.acknowledgements": + list := []*PacketState{} + return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) + case "tibc.core.packet.v1.GenesisState.commitments": + list := []*PacketState{} + return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) + case "tibc.core.packet.v1.GenesisState.receipts": + list := []*PacketState{} + return protoreflect.ValueOfList(&_GenesisState_4_list{list: &list}) + case "tibc.core.packet.v1.GenesisState.send_sequences": + list := []*PacketSequence{} + return protoreflect.ValueOfList(&_GenesisState_5_list{list: &list}) + case "tibc.core.packet.v1.GenesisState.recv_sequences": + list := []*PacketSequence{} + return protoreflect.ValueOfList(&_GenesisState_6_list{list: &list}) + case "tibc.core.packet.v1.GenesisState.ack_sequences": + list := []*PacketSequence{} + return protoreflect.ValueOfList(&_GenesisState_7_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.GenesisState", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_GenesisState) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Acknowledgements) > 0 { + for _, e := range x.Acknowledgements { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Commitments) > 0 { + for _, e := range x.Commitments { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Receipts) > 0 { + for _, e := range x.Receipts { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.SendSequences) > 0 { + for _, e := range x.SendSequences { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.RecvSequences) > 0 { + for _, e := range x.RecvSequences { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.AckSequences) > 0 { + for _, e := range x.AckSequences { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.AckSequences) > 0 { + for iNdEx := len(x.AckSequences) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.AckSequences[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x3a + } + } + if len(x.RecvSequences) > 0 { + for iNdEx := len(x.RecvSequences) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.RecvSequences[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x32 + } + } + if len(x.SendSequences) > 0 { + for iNdEx := len(x.SendSequences) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.SendSequences[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + } + if len(x.Receipts) > 0 { + for iNdEx := len(x.Receipts) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Receipts[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.Commitments) > 0 { + for iNdEx := len(x.Commitments) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Commitments[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.Acknowledgements) > 0 { + for iNdEx := len(x.Acknowledgements) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Acknowledgements[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Acknowledgements", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Acknowledgements = append(x.Acknowledgements, &PacketState{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Acknowledgements[len(x.Acknowledgements)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Commitments", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Commitments = append(x.Commitments, &PacketState{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Commitments[len(x.Commitments)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Receipts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Receipts = append(x.Receipts, &PacketState{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Receipts[len(x.Receipts)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SendSequences", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SendSequences = append(x.SendSequences, &PacketSequence{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SendSequences[len(x.SendSequences)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RecvSequences", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.RecvSequences = append(x.RecvSequences, &PacketSequence{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RecvSequences[len(x.RecvSequences)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AckSequences", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AckSequences = append(x.AckSequences, &PacketSequence{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AckSequences[len(x.AckSequences)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_PacketSequence protoreflect.MessageDescriptor + fd_PacketSequence_source_chain protoreflect.FieldDescriptor + fd_PacketSequence_destination_chain protoreflect.FieldDescriptor + fd_PacketSequence_sequence protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_genesis_proto_init() + md_PacketSequence = File_tibc_core_packet_v1_genesis_proto.Messages().ByName("PacketSequence") + fd_PacketSequence_source_chain = md_PacketSequence.Fields().ByName("source_chain") + fd_PacketSequence_destination_chain = md_PacketSequence.Fields().ByName("destination_chain") + fd_PacketSequence_sequence = md_PacketSequence.Fields().ByName("sequence") +} + +var _ protoreflect.Message = (*fastReflection_PacketSequence)(nil) + +type fastReflection_PacketSequence PacketSequence + +func (x *PacketSequence) ProtoReflect() protoreflect.Message { + return (*fastReflection_PacketSequence)(x) +} + +func (x *PacketSequence) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_genesis_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_PacketSequence_messageType fastReflection_PacketSequence_messageType +var _ protoreflect.MessageType = fastReflection_PacketSequence_messageType{} + +type fastReflection_PacketSequence_messageType struct{} + +func (x fastReflection_PacketSequence_messageType) Zero() protoreflect.Message { + return (*fastReflection_PacketSequence)(nil) +} +func (x fastReflection_PacketSequence_messageType) New() protoreflect.Message { + return new(fastReflection_PacketSequence) +} +func (x fastReflection_PacketSequence_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_PacketSequence +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_PacketSequence) Descriptor() protoreflect.MessageDescriptor { + return md_PacketSequence +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_PacketSequence) Type() protoreflect.MessageType { + return _fastReflection_PacketSequence_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_PacketSequence) New() protoreflect.Message { + return new(fastReflection_PacketSequence) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_PacketSequence) Interface() protoreflect.ProtoMessage { + return (*PacketSequence)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_PacketSequence) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SourceChain != "" { + value := protoreflect.ValueOfString(x.SourceChain) + if !f(fd_PacketSequence_source_chain, value) { + return + } + } + if x.DestinationChain != "" { + value := protoreflect.ValueOfString(x.DestinationChain) + if !f(fd_PacketSequence_destination_chain, value) { + return + } + } + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_PacketSequence_sequence, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_PacketSequence) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.PacketSequence.source_chain": + return x.SourceChain != "" + case "tibc.core.packet.v1.PacketSequence.destination_chain": + return x.DestinationChain != "" + case "tibc.core.packet.v1.PacketSequence.sequence": + return x.Sequence != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.PacketSequence")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.PacketSequence does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PacketSequence) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.PacketSequence.source_chain": + x.SourceChain = "" + case "tibc.core.packet.v1.PacketSequence.destination_chain": + x.DestinationChain = "" + case "tibc.core.packet.v1.PacketSequence.sequence": + x.Sequence = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.PacketSequence")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.PacketSequence does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_PacketSequence) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.PacketSequence.source_chain": + value := x.SourceChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.PacketSequence.destination_chain": + value := x.DestinationChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.PacketSequence.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.PacketSequence")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.PacketSequence does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PacketSequence) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.PacketSequence.source_chain": + x.SourceChain = value.Interface().(string) + case "tibc.core.packet.v1.PacketSequence.destination_chain": + x.DestinationChain = value.Interface().(string) + case "tibc.core.packet.v1.PacketSequence.sequence": + x.Sequence = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.PacketSequence")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.PacketSequence does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PacketSequence) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.PacketSequence.source_chain": + panic(fmt.Errorf("field source_chain of message tibc.core.packet.v1.PacketSequence is not mutable")) + case "tibc.core.packet.v1.PacketSequence.destination_chain": + panic(fmt.Errorf("field destination_chain of message tibc.core.packet.v1.PacketSequence is not mutable")) + case "tibc.core.packet.v1.PacketSequence.sequence": + panic(fmt.Errorf("field sequence of message tibc.core.packet.v1.PacketSequence is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.PacketSequence")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.PacketSequence does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_PacketSequence) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.PacketSequence.source_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.PacketSequence.destination_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.PacketSequence.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.PacketSequence")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.PacketSequence does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_PacketSequence) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.PacketSequence", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_PacketSequence) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PacketSequence) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_PacketSequence) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_PacketSequence) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*PacketSequence) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.SourceChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.DestinationChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*PacketSequence) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x18 + } + if len(x.DestinationChain) > 0 { + i -= len(x.DestinationChain) + copy(dAtA[i:], x.DestinationChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChain))) + i-- + dAtA[i] = 0x12 + } + if len(x.SourceChain) > 0 { + i -= len(x.SourceChain) + copy(dAtA[i:], x.SourceChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceChain))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*PacketSequence) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PacketSequence: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PacketSequence: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SourceChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestinationChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DestinationChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: tibc/core/packet/v1/genesis.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// GenesisState defines the tibc channel submodule's genesis state. +type GenesisState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Acknowledgements []*PacketState `protobuf:"bytes,2,rep,name=acknowledgements,proto3" json:"acknowledgements,omitempty"` + Commitments []*PacketState `protobuf:"bytes,3,rep,name=commitments,proto3" json:"commitments,omitempty"` + Receipts []*PacketState `protobuf:"bytes,4,rep,name=receipts,proto3" json:"receipts,omitempty"` + SendSequences []*PacketSequence `protobuf:"bytes,5,rep,name=send_sequences,json=sendSequences,proto3" json:"send_sequences,omitempty"` + RecvSequences []*PacketSequence `protobuf:"bytes,6,rep,name=recv_sequences,json=recvSequences,proto3" json:"recv_sequences,omitempty"` + AckSequences []*PacketSequence `protobuf:"bytes,7,rep,name=ack_sequences,json=ackSequences,proto3" json:"ack_sequences,omitempty"` +} + +func (x *GenesisState) Reset() { + *x = GenesisState{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_genesis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenesisState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenesisState) ProtoMessage() {} + +// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. +func (*GenesisState) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_genesis_proto_rawDescGZIP(), []int{0} +} + +func (x *GenesisState) GetAcknowledgements() []*PacketState { + if x != nil { + return x.Acknowledgements + } + return nil +} + +func (x *GenesisState) GetCommitments() []*PacketState { + if x != nil { + return x.Commitments + } + return nil +} + +func (x *GenesisState) GetReceipts() []*PacketState { + if x != nil { + return x.Receipts + } + return nil +} + +func (x *GenesisState) GetSendSequences() []*PacketSequence { + if x != nil { + return x.SendSequences + } + return nil +} + +func (x *GenesisState) GetRecvSequences() []*PacketSequence { + if x != nil { + return x.RecvSequences + } + return nil +} + +func (x *GenesisState) GetAckSequences() []*PacketSequence { + if x != nil { + return x.AckSequences + } + return nil +} + +// PacketSequence defines the genesis type necessary to retrieve and store +// next send and receive sequences. +type PacketSequence struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SourceChain string `protobuf:"bytes,1,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` + DestinationChain string `protobuf:"bytes,2,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` + Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (x *PacketSequence) Reset() { + *x = PacketSequence{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_genesis_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PacketSequence) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PacketSequence) ProtoMessage() {} + +// Deprecated: Use PacketSequence.ProtoReflect.Descriptor instead. +func (*PacketSequence) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_genesis_proto_rawDescGZIP(), []int{1} +} + +func (x *PacketSequence) GetSourceChain() string { + if x != nil { + return x.SourceChain + } + return "" +} + +func (x *PacketSequence) GetDestinationChain() string { + if x != nil { + return x.DestinationChain + } + return "" +} + +func (x *PacketSequence) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +var File_tibc_core_packet_v1_genesis_proto protoreflect.FileDescriptor + +var file_tibc_core_packet_v1_genesis_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, + 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xae, 0x04, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x52, 0x0a, 0x10, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x69, + 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x04, 0xc8, + 0xde, 0x1f, 0x00, 0x52, 0x10, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x48, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x69, 0x62, + 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, + 0x42, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x70, 0x74, 0x73, 0x12, 0x69, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x69, + 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, + 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, + 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x52, + 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x69, + 0x0a, 0x0e, 0x72, 0x65, 0x63, 0x76, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x1d, 0xc8, 0xde, 0x1f, + 0x00, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x72, 0x65, 0x63, 0x76, 0x5f, + 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x52, 0x0d, 0x72, 0x65, 0x63, 0x76, + 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x66, 0x0a, 0x0d, 0x61, 0x63, 0x6b, + 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x71, + 0x75, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x1c, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x14, 0x79, + 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, + 0x65, 0x73, 0x22, 0x52, 0x0c, 0x61, 0x63, 0x6b, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, + 0x73, 0x22, 0xb3, 0x01, 0x0a, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xf2, 0xde, 0x1f, 0x13, + 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x22, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, + 0x12, 0x49, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1c, 0xf2, 0xde, 0x1f, + 0x18, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x42, 0xd5, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, + 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x62, 0x69, 0x61, 0x6e, 0x6a, 0x69, 0x65, 0x61, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2d, 0x67, + 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x43, 0x50, 0xaa, 0x02, 0x13, 0x54, 0x69, 0x62, 0x63, 0x2e, + 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x13, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x50, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, + 0x5c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x54, 0x69, 0x62, 0x63, 0x3a, 0x3a, 0x43, + 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tibc_core_packet_v1_genesis_proto_rawDescOnce sync.Once + file_tibc_core_packet_v1_genesis_proto_rawDescData = file_tibc_core_packet_v1_genesis_proto_rawDesc +) + +func file_tibc_core_packet_v1_genesis_proto_rawDescGZIP() []byte { + file_tibc_core_packet_v1_genesis_proto_rawDescOnce.Do(func() { + file_tibc_core_packet_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_tibc_core_packet_v1_genesis_proto_rawDescData) + }) + return file_tibc_core_packet_v1_genesis_proto_rawDescData +} + +var file_tibc_core_packet_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_tibc_core_packet_v1_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: tibc.core.packet.v1.GenesisState + (*PacketSequence)(nil), // 1: tibc.core.packet.v1.PacketSequence + (*PacketState)(nil), // 2: tibc.core.packet.v1.PacketState +} +var file_tibc_core_packet_v1_genesis_proto_depIdxs = []int32{ + 2, // 0: tibc.core.packet.v1.GenesisState.acknowledgements:type_name -> tibc.core.packet.v1.PacketState + 2, // 1: tibc.core.packet.v1.GenesisState.commitments:type_name -> tibc.core.packet.v1.PacketState + 2, // 2: tibc.core.packet.v1.GenesisState.receipts:type_name -> tibc.core.packet.v1.PacketState + 1, // 3: tibc.core.packet.v1.GenesisState.send_sequences:type_name -> tibc.core.packet.v1.PacketSequence + 1, // 4: tibc.core.packet.v1.GenesisState.recv_sequences:type_name -> tibc.core.packet.v1.PacketSequence + 1, // 5: tibc.core.packet.v1.GenesisState.ack_sequences:type_name -> tibc.core.packet.v1.PacketSequence + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_tibc_core_packet_v1_genesis_proto_init() } +func file_tibc_core_packet_v1_genesis_proto_init() { + if File_tibc_core_packet_v1_genesis_proto != nil { + return + } + file_tibc_core_packet_v1_packet_proto_init() + if !protoimpl.UnsafeEnabled { + file_tibc_core_packet_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenesisState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PacketSequence); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_tibc_core_packet_v1_genesis_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_tibc_core_packet_v1_genesis_proto_goTypes, + DependencyIndexes: file_tibc_core_packet_v1_genesis_proto_depIdxs, + MessageInfos: file_tibc_core_packet_v1_genesis_proto_msgTypes, + }.Build() + File_tibc_core_packet_v1_genesis_proto = out.File + file_tibc_core_packet_v1_genesis_proto_rawDesc = nil + file_tibc_core_packet_v1_genesis_proto_goTypes = nil + file_tibc_core_packet_v1_genesis_proto_depIdxs = nil +} diff --git a/api/tibc/core/packet/v1/packet.pulsar.go b/api/tibc/core/packet/v1/packet.pulsar.go new file mode 100644 index 00000000..1d35b06d --- /dev/null +++ b/api/tibc/core/packet/v1/packet.pulsar.go @@ -0,0 +1,2956 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package packetv1 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Packet protoreflect.MessageDescriptor + fd_Packet_sequence protoreflect.FieldDescriptor + fd_Packet_port protoreflect.FieldDescriptor + fd_Packet_source_chain protoreflect.FieldDescriptor + fd_Packet_destination_chain protoreflect.FieldDescriptor + fd_Packet_relay_chain protoreflect.FieldDescriptor + fd_Packet_data protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_packet_proto_init() + md_Packet = File_tibc_core_packet_v1_packet_proto.Messages().ByName("Packet") + fd_Packet_sequence = md_Packet.Fields().ByName("sequence") + fd_Packet_port = md_Packet.Fields().ByName("port") + fd_Packet_source_chain = md_Packet.Fields().ByName("source_chain") + fd_Packet_destination_chain = md_Packet.Fields().ByName("destination_chain") + fd_Packet_relay_chain = md_Packet.Fields().ByName("relay_chain") + fd_Packet_data = md_Packet.Fields().ByName("data") +} + +var _ protoreflect.Message = (*fastReflection_Packet)(nil) + +type fastReflection_Packet Packet + +func (x *Packet) ProtoReflect() protoreflect.Message { + return (*fastReflection_Packet)(x) +} + +func (x *Packet) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_packet_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Packet_messageType fastReflection_Packet_messageType +var _ protoreflect.MessageType = fastReflection_Packet_messageType{} + +type fastReflection_Packet_messageType struct{} + +func (x fastReflection_Packet_messageType) Zero() protoreflect.Message { + return (*fastReflection_Packet)(nil) +} +func (x fastReflection_Packet_messageType) New() protoreflect.Message { + return new(fastReflection_Packet) +} +func (x fastReflection_Packet_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Packet +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Packet) Descriptor() protoreflect.MessageDescriptor { + return md_Packet +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Packet) Type() protoreflect.MessageType { + return _fastReflection_Packet_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Packet) New() protoreflect.Message { + return new(fastReflection_Packet) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Packet) Interface() protoreflect.ProtoMessage { + return (*Packet)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Packet) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_Packet_sequence, value) { + return + } + } + if x.Port != "" { + value := protoreflect.ValueOfString(x.Port) + if !f(fd_Packet_port, value) { + return + } + } + if x.SourceChain != "" { + value := protoreflect.ValueOfString(x.SourceChain) + if !f(fd_Packet_source_chain, value) { + return + } + } + if x.DestinationChain != "" { + value := protoreflect.ValueOfString(x.DestinationChain) + if !f(fd_Packet_destination_chain, value) { + return + } + } + if x.RelayChain != "" { + value := protoreflect.ValueOfString(x.RelayChain) + if !f(fd_Packet_relay_chain, value) { + return + } + } + if len(x.Data) != 0 { + value := protoreflect.ValueOfBytes(x.Data) + if !f(fd_Packet_data, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Packet) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.Packet.sequence": + return x.Sequence != uint64(0) + case "tibc.core.packet.v1.Packet.port": + return x.Port != "" + case "tibc.core.packet.v1.Packet.source_chain": + return x.SourceChain != "" + case "tibc.core.packet.v1.Packet.destination_chain": + return x.DestinationChain != "" + case "tibc.core.packet.v1.Packet.relay_chain": + return x.RelayChain != "" + case "tibc.core.packet.v1.Packet.data": + return len(x.Data) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.Packet")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.Packet does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Packet) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.Packet.sequence": + x.Sequence = uint64(0) + case "tibc.core.packet.v1.Packet.port": + x.Port = "" + case "tibc.core.packet.v1.Packet.source_chain": + x.SourceChain = "" + case "tibc.core.packet.v1.Packet.destination_chain": + x.DestinationChain = "" + case "tibc.core.packet.v1.Packet.relay_chain": + x.RelayChain = "" + case "tibc.core.packet.v1.Packet.data": + x.Data = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.Packet")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.Packet does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Packet) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.Packet.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + case "tibc.core.packet.v1.Packet.port": + value := x.Port + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.Packet.source_chain": + value := x.SourceChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.Packet.destination_chain": + value := x.DestinationChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.Packet.relay_chain": + value := x.RelayChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.Packet.data": + value := x.Data + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.Packet")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.Packet does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Packet) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.Packet.sequence": + x.Sequence = value.Uint() + case "tibc.core.packet.v1.Packet.port": + x.Port = value.Interface().(string) + case "tibc.core.packet.v1.Packet.source_chain": + x.SourceChain = value.Interface().(string) + case "tibc.core.packet.v1.Packet.destination_chain": + x.DestinationChain = value.Interface().(string) + case "tibc.core.packet.v1.Packet.relay_chain": + x.RelayChain = value.Interface().(string) + case "tibc.core.packet.v1.Packet.data": + x.Data = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.Packet")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.Packet does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Packet) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.Packet.sequence": + panic(fmt.Errorf("field sequence of message tibc.core.packet.v1.Packet is not mutable")) + case "tibc.core.packet.v1.Packet.port": + panic(fmt.Errorf("field port of message tibc.core.packet.v1.Packet is not mutable")) + case "tibc.core.packet.v1.Packet.source_chain": + panic(fmt.Errorf("field source_chain of message tibc.core.packet.v1.Packet is not mutable")) + case "tibc.core.packet.v1.Packet.destination_chain": + panic(fmt.Errorf("field destination_chain of message tibc.core.packet.v1.Packet is not mutable")) + case "tibc.core.packet.v1.Packet.relay_chain": + panic(fmt.Errorf("field relay_chain of message tibc.core.packet.v1.Packet is not mutable")) + case "tibc.core.packet.v1.Packet.data": + panic(fmt.Errorf("field data of message tibc.core.packet.v1.Packet is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.Packet")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.Packet does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Packet) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.Packet.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + case "tibc.core.packet.v1.Packet.port": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.Packet.source_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.Packet.destination_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.Packet.relay_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.Packet.data": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.Packet")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.Packet does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Packet) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.Packet", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Packet) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Packet) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Packet) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Packet) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Packet) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + l = len(x.Port) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.SourceChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.DestinationChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.RelayChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Data) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Packet) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Data) > 0 { + i -= len(x.Data) + copy(dAtA[i:], x.Data) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) + i-- + dAtA[i] = 0x32 + } + if len(x.RelayChain) > 0 { + i -= len(x.RelayChain) + copy(dAtA[i:], x.RelayChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RelayChain))) + i-- + dAtA[i] = 0x2a + } + if len(x.DestinationChain) > 0 { + i -= len(x.DestinationChain) + copy(dAtA[i:], x.DestinationChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChain))) + i-- + dAtA[i] = 0x22 + } + if len(x.SourceChain) > 0 { + i -= len(x.SourceChain) + copy(dAtA[i:], x.SourceChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceChain))) + i-- + dAtA[i] = 0x1a + } + if len(x.Port) > 0 { + i -= len(x.Port) + copy(dAtA[i:], x.Port) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Port))) + i-- + dAtA[i] = 0x12 + } + if x.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Packet) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Packet: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Packet: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Port = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SourceChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestinationChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DestinationChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RelayChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.RelayChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...) + if x.Data == nil { + x.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_CleanPacket protoreflect.MessageDescriptor + fd_CleanPacket_sequence protoreflect.FieldDescriptor + fd_CleanPacket_source_chain protoreflect.FieldDescriptor + fd_CleanPacket_destination_chain protoreflect.FieldDescriptor + fd_CleanPacket_relay_chain protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_packet_proto_init() + md_CleanPacket = File_tibc_core_packet_v1_packet_proto.Messages().ByName("CleanPacket") + fd_CleanPacket_sequence = md_CleanPacket.Fields().ByName("sequence") + fd_CleanPacket_source_chain = md_CleanPacket.Fields().ByName("source_chain") + fd_CleanPacket_destination_chain = md_CleanPacket.Fields().ByName("destination_chain") + fd_CleanPacket_relay_chain = md_CleanPacket.Fields().ByName("relay_chain") +} + +var _ protoreflect.Message = (*fastReflection_CleanPacket)(nil) + +type fastReflection_CleanPacket CleanPacket + +func (x *CleanPacket) ProtoReflect() protoreflect.Message { + return (*fastReflection_CleanPacket)(x) +} + +func (x *CleanPacket) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_packet_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_CleanPacket_messageType fastReflection_CleanPacket_messageType +var _ protoreflect.MessageType = fastReflection_CleanPacket_messageType{} + +type fastReflection_CleanPacket_messageType struct{} + +func (x fastReflection_CleanPacket_messageType) Zero() protoreflect.Message { + return (*fastReflection_CleanPacket)(nil) +} +func (x fastReflection_CleanPacket_messageType) New() protoreflect.Message { + return new(fastReflection_CleanPacket) +} +func (x fastReflection_CleanPacket_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_CleanPacket +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_CleanPacket) Descriptor() protoreflect.MessageDescriptor { + return md_CleanPacket +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_CleanPacket) Type() protoreflect.MessageType { + return _fastReflection_CleanPacket_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_CleanPacket) New() protoreflect.Message { + return new(fastReflection_CleanPacket) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_CleanPacket) Interface() protoreflect.ProtoMessage { + return (*CleanPacket)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_CleanPacket) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_CleanPacket_sequence, value) { + return + } + } + if x.SourceChain != "" { + value := protoreflect.ValueOfString(x.SourceChain) + if !f(fd_CleanPacket_source_chain, value) { + return + } + } + if x.DestinationChain != "" { + value := protoreflect.ValueOfString(x.DestinationChain) + if !f(fd_CleanPacket_destination_chain, value) { + return + } + } + if x.RelayChain != "" { + value := protoreflect.ValueOfString(x.RelayChain) + if !f(fd_CleanPacket_relay_chain, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_CleanPacket) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.CleanPacket.sequence": + return x.Sequence != uint64(0) + case "tibc.core.packet.v1.CleanPacket.source_chain": + return x.SourceChain != "" + case "tibc.core.packet.v1.CleanPacket.destination_chain": + return x.DestinationChain != "" + case "tibc.core.packet.v1.CleanPacket.relay_chain": + return x.RelayChain != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.CleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.CleanPacket does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CleanPacket) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.CleanPacket.sequence": + x.Sequence = uint64(0) + case "tibc.core.packet.v1.CleanPacket.source_chain": + x.SourceChain = "" + case "tibc.core.packet.v1.CleanPacket.destination_chain": + x.DestinationChain = "" + case "tibc.core.packet.v1.CleanPacket.relay_chain": + x.RelayChain = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.CleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.CleanPacket does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_CleanPacket) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.CleanPacket.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + case "tibc.core.packet.v1.CleanPacket.source_chain": + value := x.SourceChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.CleanPacket.destination_chain": + value := x.DestinationChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.CleanPacket.relay_chain": + value := x.RelayChain + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.CleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.CleanPacket does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CleanPacket) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.CleanPacket.sequence": + x.Sequence = value.Uint() + case "tibc.core.packet.v1.CleanPacket.source_chain": + x.SourceChain = value.Interface().(string) + case "tibc.core.packet.v1.CleanPacket.destination_chain": + x.DestinationChain = value.Interface().(string) + case "tibc.core.packet.v1.CleanPacket.relay_chain": + x.RelayChain = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.CleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.CleanPacket does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CleanPacket) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.CleanPacket.sequence": + panic(fmt.Errorf("field sequence of message tibc.core.packet.v1.CleanPacket is not mutable")) + case "tibc.core.packet.v1.CleanPacket.source_chain": + panic(fmt.Errorf("field source_chain of message tibc.core.packet.v1.CleanPacket is not mutable")) + case "tibc.core.packet.v1.CleanPacket.destination_chain": + panic(fmt.Errorf("field destination_chain of message tibc.core.packet.v1.CleanPacket is not mutable")) + case "tibc.core.packet.v1.CleanPacket.relay_chain": + panic(fmt.Errorf("field relay_chain of message tibc.core.packet.v1.CleanPacket is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.CleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.CleanPacket does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_CleanPacket) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.CleanPacket.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + case "tibc.core.packet.v1.CleanPacket.source_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.CleanPacket.destination_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.CleanPacket.relay_chain": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.CleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.CleanPacket does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_CleanPacket) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.CleanPacket", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_CleanPacket) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CleanPacket) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_CleanPacket) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_CleanPacket) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*CleanPacket) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + l = len(x.SourceChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.DestinationChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.RelayChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*CleanPacket) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.RelayChain) > 0 { + i -= len(x.RelayChain) + copy(dAtA[i:], x.RelayChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RelayChain))) + i-- + dAtA[i] = 0x2a + } + if len(x.DestinationChain) > 0 { + i -= len(x.DestinationChain) + copy(dAtA[i:], x.DestinationChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChain))) + i-- + dAtA[i] = 0x22 + } + if len(x.SourceChain) > 0 { + i -= len(x.SourceChain) + copy(dAtA[i:], x.SourceChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceChain))) + i-- + dAtA[i] = 0x1a + } + if x.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*CleanPacket) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CleanPacket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CleanPacket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SourceChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestinationChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DestinationChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RelayChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.RelayChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_PacketState protoreflect.MessageDescriptor + fd_PacketState_source_chain protoreflect.FieldDescriptor + fd_PacketState_destination_chain protoreflect.FieldDescriptor + fd_PacketState_sequence protoreflect.FieldDescriptor + fd_PacketState_data protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_packet_proto_init() + md_PacketState = File_tibc_core_packet_v1_packet_proto.Messages().ByName("PacketState") + fd_PacketState_source_chain = md_PacketState.Fields().ByName("source_chain") + fd_PacketState_destination_chain = md_PacketState.Fields().ByName("destination_chain") + fd_PacketState_sequence = md_PacketState.Fields().ByName("sequence") + fd_PacketState_data = md_PacketState.Fields().ByName("data") +} + +var _ protoreflect.Message = (*fastReflection_PacketState)(nil) + +type fastReflection_PacketState PacketState + +func (x *PacketState) ProtoReflect() protoreflect.Message { + return (*fastReflection_PacketState)(x) +} + +func (x *PacketState) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_packet_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_PacketState_messageType fastReflection_PacketState_messageType +var _ protoreflect.MessageType = fastReflection_PacketState_messageType{} + +type fastReflection_PacketState_messageType struct{} + +func (x fastReflection_PacketState_messageType) Zero() protoreflect.Message { + return (*fastReflection_PacketState)(nil) +} +func (x fastReflection_PacketState_messageType) New() protoreflect.Message { + return new(fastReflection_PacketState) +} +func (x fastReflection_PacketState_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_PacketState +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_PacketState) Descriptor() protoreflect.MessageDescriptor { + return md_PacketState +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_PacketState) Type() protoreflect.MessageType { + return _fastReflection_PacketState_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_PacketState) New() protoreflect.Message { + return new(fastReflection_PacketState) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_PacketState) Interface() protoreflect.ProtoMessage { + return (*PacketState)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_PacketState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SourceChain != "" { + value := protoreflect.ValueOfString(x.SourceChain) + if !f(fd_PacketState_source_chain, value) { + return + } + } + if x.DestinationChain != "" { + value := protoreflect.ValueOfString(x.DestinationChain) + if !f(fd_PacketState_destination_chain, value) { + return + } + } + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_PacketState_sequence, value) { + return + } + } + if len(x.Data) != 0 { + value := protoreflect.ValueOfBytes(x.Data) + if !f(fd_PacketState_data, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_PacketState) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.PacketState.source_chain": + return x.SourceChain != "" + case "tibc.core.packet.v1.PacketState.destination_chain": + return x.DestinationChain != "" + case "tibc.core.packet.v1.PacketState.sequence": + return x.Sequence != uint64(0) + case "tibc.core.packet.v1.PacketState.data": + return len(x.Data) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.PacketState")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.PacketState does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PacketState) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.PacketState.source_chain": + x.SourceChain = "" + case "tibc.core.packet.v1.PacketState.destination_chain": + x.DestinationChain = "" + case "tibc.core.packet.v1.PacketState.sequence": + x.Sequence = uint64(0) + case "tibc.core.packet.v1.PacketState.data": + x.Data = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.PacketState")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.PacketState does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_PacketState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.PacketState.source_chain": + value := x.SourceChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.PacketState.destination_chain": + value := x.DestinationChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.PacketState.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + case "tibc.core.packet.v1.PacketState.data": + value := x.Data + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.PacketState")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.PacketState does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PacketState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.PacketState.source_chain": + x.SourceChain = value.Interface().(string) + case "tibc.core.packet.v1.PacketState.destination_chain": + x.DestinationChain = value.Interface().(string) + case "tibc.core.packet.v1.PacketState.sequence": + x.Sequence = value.Uint() + case "tibc.core.packet.v1.PacketState.data": + x.Data = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.PacketState")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.PacketState does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PacketState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.PacketState.source_chain": + panic(fmt.Errorf("field source_chain of message tibc.core.packet.v1.PacketState is not mutable")) + case "tibc.core.packet.v1.PacketState.destination_chain": + panic(fmt.Errorf("field destination_chain of message tibc.core.packet.v1.PacketState is not mutable")) + case "tibc.core.packet.v1.PacketState.sequence": + panic(fmt.Errorf("field sequence of message tibc.core.packet.v1.PacketState is not mutable")) + case "tibc.core.packet.v1.PacketState.data": + panic(fmt.Errorf("field data of message tibc.core.packet.v1.PacketState is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.PacketState")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.PacketState does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_PacketState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.PacketState.source_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.PacketState.destination_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.PacketState.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + case "tibc.core.packet.v1.PacketState.data": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.PacketState")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.PacketState does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_PacketState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.PacketState", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_PacketState) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PacketState) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_PacketState) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_PacketState) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*PacketState) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.SourceChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.DestinationChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + l = len(x.Data) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*PacketState) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Data) > 0 { + i -= len(x.Data) + copy(dAtA[i:], x.Data) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) + i-- + dAtA[i] = 0x22 + } + if x.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x18 + } + if len(x.DestinationChain) > 0 { + i -= len(x.DestinationChain) + copy(dAtA[i:], x.DestinationChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChain))) + i-- + dAtA[i] = 0x12 + } + if len(x.SourceChain) > 0 { + i -= len(x.SourceChain) + copy(dAtA[i:], x.SourceChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceChain))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*PacketState) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PacketState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PacketState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SourceChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestinationChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DestinationChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...) + if x.Data == nil { + x.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_Acknowledgement protoreflect.MessageDescriptor + fd_Acknowledgement_result protoreflect.FieldDescriptor + fd_Acknowledgement_error protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_packet_proto_init() + md_Acknowledgement = File_tibc_core_packet_v1_packet_proto.Messages().ByName("Acknowledgement") + fd_Acknowledgement_result = md_Acknowledgement.Fields().ByName("result") + fd_Acknowledgement_error = md_Acknowledgement.Fields().ByName("error") +} + +var _ protoreflect.Message = (*fastReflection_Acknowledgement)(nil) + +type fastReflection_Acknowledgement Acknowledgement + +func (x *Acknowledgement) ProtoReflect() protoreflect.Message { + return (*fastReflection_Acknowledgement)(x) +} + +func (x *Acknowledgement) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_packet_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Acknowledgement_messageType fastReflection_Acknowledgement_messageType +var _ protoreflect.MessageType = fastReflection_Acknowledgement_messageType{} + +type fastReflection_Acknowledgement_messageType struct{} + +func (x fastReflection_Acknowledgement_messageType) Zero() protoreflect.Message { + return (*fastReflection_Acknowledgement)(nil) +} +func (x fastReflection_Acknowledgement_messageType) New() protoreflect.Message { + return new(fastReflection_Acknowledgement) +} +func (x fastReflection_Acknowledgement_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Acknowledgement +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Acknowledgement) Descriptor() protoreflect.MessageDescriptor { + return md_Acknowledgement +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Acknowledgement) Type() protoreflect.MessageType { + return _fastReflection_Acknowledgement_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Acknowledgement) New() protoreflect.Message { + return new(fastReflection_Acknowledgement) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Acknowledgement) Interface() protoreflect.ProtoMessage { + return (*Acknowledgement)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Acknowledgement) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Response != nil { + switch o := x.Response.(type) { + case *Acknowledgement_Result: + v := o.Result + value := protoreflect.ValueOfBytes(v) + if !f(fd_Acknowledgement_result, value) { + return + } + case *Acknowledgement_Error: + v := o.Error + value := protoreflect.ValueOfString(v) + if !f(fd_Acknowledgement_error, value) { + return + } + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Acknowledgement) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.Acknowledgement.result": + if x.Response == nil { + return false + } else if _, ok := x.Response.(*Acknowledgement_Result); ok { + return true + } else { + return false + } + case "tibc.core.packet.v1.Acknowledgement.error": + if x.Response == nil { + return false + } else if _, ok := x.Response.(*Acknowledgement_Error); ok { + return true + } else { + return false + } + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.Acknowledgement")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.Acknowledgement does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Acknowledgement) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.Acknowledgement.result": + x.Response = nil + case "tibc.core.packet.v1.Acknowledgement.error": + x.Response = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.Acknowledgement")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.Acknowledgement does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Acknowledgement) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.Acknowledgement.result": + if x.Response == nil { + return protoreflect.ValueOfBytes(nil) + } else if v, ok := x.Response.(*Acknowledgement_Result); ok { + return protoreflect.ValueOfBytes(v.Result) + } else { + return protoreflect.ValueOfBytes(nil) + } + case "tibc.core.packet.v1.Acknowledgement.error": + if x.Response == nil { + return protoreflect.ValueOfString("") + } else if v, ok := x.Response.(*Acknowledgement_Error); ok { + return protoreflect.ValueOfString(v.Error) + } else { + return protoreflect.ValueOfString("") + } + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.Acknowledgement")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.Acknowledgement does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Acknowledgement) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.Acknowledgement.result": + cv := value.Bytes() + x.Response = &Acknowledgement_Result{Result: cv} + case "tibc.core.packet.v1.Acknowledgement.error": + cv := value.Interface().(string) + x.Response = &Acknowledgement_Error{Error: cv} + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.Acknowledgement")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.Acknowledgement does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Acknowledgement) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.Acknowledgement.result": + panic(fmt.Errorf("field result of message tibc.core.packet.v1.Acknowledgement is not mutable")) + case "tibc.core.packet.v1.Acknowledgement.error": + panic(fmt.Errorf("field error of message tibc.core.packet.v1.Acknowledgement is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.Acknowledgement")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.Acknowledgement does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Acknowledgement) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.Acknowledgement.result": + return protoreflect.ValueOfBytes(nil) + case "tibc.core.packet.v1.Acknowledgement.error": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.Acknowledgement")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.Acknowledgement does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Acknowledgement) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + case "tibc.core.packet.v1.Acknowledgement.response": + if x.Response == nil { + return nil + } + switch x.Response.(type) { + case *Acknowledgement_Result: + return x.Descriptor().Fields().ByName("result") + case *Acknowledgement_Error: + return x.Descriptor().Fields().ByName("error") + } + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.Acknowledgement", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Acknowledgement) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Acknowledgement) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Acknowledgement) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Acknowledgement) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Acknowledgement) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + switch x := x.Response.(type) { + case *Acknowledgement_Result: + if x == nil { + break + } + l = len(x.Result) + n += 2 + l + runtime.Sov(uint64(l)) + case *Acknowledgement_Error: + if x == nil { + break + } + l = len(x.Error) + n += 2 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Acknowledgement) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + switch x := x.Response.(type) { + case *Acknowledgement_Result: + i -= len(x.Result) + copy(dAtA[i:], x.Result) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Result))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa + case *Acknowledgement_Error: + i -= len(x.Error) + copy(dAtA[i:], x.Error) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Error))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Acknowledgement) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Acknowledgement: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Acknowledgement: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 21: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + x.Response = &Acknowledgement_Result{v} + iNdEx = postIndex + case 22: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Response = &Acknowledgement_Error{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: tibc/core/packet/v1/packet.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Packet defines a type that carries data across different chains through TIBC +type Packet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // number corresponds to the order of sends and receives, where a Packet + // with an earlier sequence number must be sent and received before a Packet + // with a later sequence number. + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` + // identifies the port on the sending chain and destination chain. + Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` + // identifies the chain id of the sending chain. + SourceChain string `protobuf:"bytes,3,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` + // identifies the chain id of the receiving chain. + DestinationChain string `protobuf:"bytes,4,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` + // identifies the chain id of the relay chain. + RelayChain string `protobuf:"bytes,5,opt,name=relay_chain,json=relayChain,proto3" json:"relay_chain,omitempty"` + // actual opaque bytes transferred directly to the application module + Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *Packet) Reset() { + *x = Packet{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_packet_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Packet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Packet) ProtoMessage() {} + +// Deprecated: Use Packet.ProtoReflect.Descriptor instead. +func (*Packet) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_packet_proto_rawDescGZIP(), []int{0} +} + +func (x *Packet) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *Packet) GetPort() string { + if x != nil { + return x.Port + } + return "" +} + +func (x *Packet) GetSourceChain() string { + if x != nil { + return x.SourceChain + } + return "" +} + +func (x *Packet) GetDestinationChain() string { + if x != nil { + return x.DestinationChain + } + return "" +} + +func (x *Packet) GetRelayChain() string { + if x != nil { + return x.RelayChain + } + return "" +} + +func (x *Packet) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +// CleanPacket defines a type that carries data across different chains through +// TIBC +type CleanPacket struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // number corresponds to the order of sends and receives, where a Packet + // with an earlier sequence number must be sent and received before a Packet + // with a later sequence number. + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` + // identifies the chain id of the sending chain. + SourceChain string `protobuf:"bytes,3,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` + // identifies the chain id of the receiving chain. + DestinationChain string `protobuf:"bytes,4,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` + // identifies the chain id of the relay chain. + RelayChain string `protobuf:"bytes,5,opt,name=relay_chain,json=relayChain,proto3" json:"relay_chain,omitempty"` +} + +func (x *CleanPacket) Reset() { + *x = CleanPacket{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_packet_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CleanPacket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CleanPacket) ProtoMessage() {} + +// Deprecated: Use CleanPacket.ProtoReflect.Descriptor instead. +func (*CleanPacket) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_packet_proto_rawDescGZIP(), []int{1} +} + +func (x *CleanPacket) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *CleanPacket) GetSourceChain() string { + if x != nil { + return x.SourceChain + } + return "" +} + +func (x *CleanPacket) GetDestinationChain() string { + if x != nil { + return x.DestinationChain + } + return "" +} + +func (x *CleanPacket) GetRelayChain() string { + if x != nil { + return x.RelayChain + } + return "" +} + +// PacketState defines the generic type necessary to retrieve and store +// packet commitments, acknowledgements, and receipts. +// Caller is responsible for knowing the context necessary to interpret this +// state as a commitment, acknowledgement, or a receipt. +type PacketState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the sending chain identifier. + SourceChain string `protobuf:"bytes,1,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` + // the receiving chain identifier. + DestinationChain string `protobuf:"bytes,2,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` + // packet sequence. + Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` + // embedded data that represents packet state. + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *PacketState) Reset() { + *x = PacketState{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_packet_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PacketState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PacketState) ProtoMessage() {} + +// Deprecated: Use PacketState.ProtoReflect.Descriptor instead. +func (*PacketState) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_packet_proto_rawDescGZIP(), []int{2} +} + +func (x *PacketState) GetSourceChain() string { + if x != nil { + return x.SourceChain + } + return "" +} + +func (x *PacketState) GetDestinationChain() string { + if x != nil { + return x.DestinationChain + } + return "" +} + +func (x *PacketState) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *PacketState) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +// Acknowledgement is the recommended acknowledgement format to be used by +// app-specific protocols. +// NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental +// conflicts with other protobuf message formats used for acknowledgements. +// The first byte of any message with this format will be the non-ASCII values +// `0xaa` (result) or `0xb2` (error). Implemented as defined by TICS: +// https://github.com/bianjieai/tics/tree/master/spec/tics-004-channel-and-packet-semantics#acknowledgement-envelope +type Acknowledgement struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // response contains either a result or an error and must be non-empty + // + // Types that are assignable to Response: + // + // *Acknowledgement_Result + // *Acknowledgement_Error + Response isAcknowledgement_Response `protobuf_oneof:"response"` +} + +func (x *Acknowledgement) Reset() { + *x = Acknowledgement{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_packet_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Acknowledgement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Acknowledgement) ProtoMessage() {} + +// Deprecated: Use Acknowledgement.ProtoReflect.Descriptor instead. +func (*Acknowledgement) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_packet_proto_rawDescGZIP(), []int{3} +} + +func (x *Acknowledgement) GetResponse() isAcknowledgement_Response { + if x != nil { + return x.Response + } + return nil +} + +func (x *Acknowledgement) GetResult() []byte { + if x, ok := x.GetResponse().(*Acknowledgement_Result); ok { + return x.Result + } + return nil +} + +func (x *Acknowledgement) GetError() string { + if x, ok := x.GetResponse().(*Acknowledgement_Error); ok { + return x.Error + } + return "" +} + +type isAcknowledgement_Response interface { + isAcknowledgement_Response() +} + +type Acknowledgement_Result struct { + Result []byte `protobuf:"bytes,21,opt,name=result,proto3,oneof"` +} + +type Acknowledgement_Error struct { + Error string `protobuf:"bytes,22,opt,name=error,proto3,oneof"` +} + +func (*Acknowledgement_Result) isAcknowledgement_Response() {} + +func (*Acknowledgement_Error) isAcknowledgement_Response() {} + +var File_tibc_core_packet_v1_packet_proto protoreflect.FileDescriptor + +var file_tibc_core_packet_v1_packet_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x13, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x91, 0x02, + 0x0a, 0x06, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, + 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, + 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x12, 0x48, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x1b, 0xf2, 0xde, 0x1f, 0x17, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x52, 0x10, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x37, + 0x0a, 0x0b, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x16, 0xf2, 0xde, 0x1f, 0x12, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x72, + 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0x52, 0x0a, 0x72, 0x65, 0x6c, + 0x61, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0x88, 0xa0, 0x1f, + 0x00, 0x22, 0xee, 0x01, 0x0a, 0x0b, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3a, 0x0a, + 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x17, 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0x52, 0x0b, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x48, 0x0a, 0x11, 0x64, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x1b, 0xf2, 0xde, 0x1f, 0x17, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, + 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, + 0x22, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x12, 0x37, 0x0a, 0x0b, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x16, 0xf2, 0xde, 0x1f, 0x12, 0x79, 0x61, + 0x6d, 0x6c, 0x3a, 0x22, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, + 0x52, 0x0a, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x3a, 0x04, 0x88, 0xa0, + 0x1f, 0x00, 0x22, 0xc5, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x3a, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, + 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x22, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x44, + 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xf2, 0xde, 0x1f, 0x13, 0x79, + 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x22, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x22, 0x4f, 0x0a, 0x0f, 0x41, 0x63, + 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, + 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, + 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, + 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xd4, 0x01, 0x0a, 0x17, + 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x62, 0x69, 0x61, 0x6e, 0x6a, 0x69, 0x65, 0x61, 0x69, 0x2f, 0x74, 0x69, 0x62, + 0x63, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x43, 0x50, 0xaa, 0x02, 0x13, 0x54, 0x69, + 0x62, 0x63, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x13, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x50, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x43, + 0x6f, 0x72, 0x65, 0x5c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x54, 0x69, 0x62, 0x63, + 0x3a, 0x3a, 0x43, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tibc_core_packet_v1_packet_proto_rawDescOnce sync.Once + file_tibc_core_packet_v1_packet_proto_rawDescData = file_tibc_core_packet_v1_packet_proto_rawDesc +) + +func file_tibc_core_packet_v1_packet_proto_rawDescGZIP() []byte { + file_tibc_core_packet_v1_packet_proto_rawDescOnce.Do(func() { + file_tibc_core_packet_v1_packet_proto_rawDescData = protoimpl.X.CompressGZIP(file_tibc_core_packet_v1_packet_proto_rawDescData) + }) + return file_tibc_core_packet_v1_packet_proto_rawDescData +} + +var file_tibc_core_packet_v1_packet_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_tibc_core_packet_v1_packet_proto_goTypes = []interface{}{ + (*Packet)(nil), // 0: tibc.core.packet.v1.Packet + (*CleanPacket)(nil), // 1: tibc.core.packet.v1.CleanPacket + (*PacketState)(nil), // 2: tibc.core.packet.v1.PacketState + (*Acknowledgement)(nil), // 3: tibc.core.packet.v1.Acknowledgement +} +var file_tibc_core_packet_v1_packet_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_tibc_core_packet_v1_packet_proto_init() } +func file_tibc_core_packet_v1_packet_proto_init() { + if File_tibc_core_packet_v1_packet_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_tibc_core_packet_v1_packet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Packet); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_packet_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CleanPacket); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_packet_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PacketState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_packet_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Acknowledgement); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_tibc_core_packet_v1_packet_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*Acknowledgement_Result)(nil), + (*Acknowledgement_Error)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_tibc_core_packet_v1_packet_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_tibc_core_packet_v1_packet_proto_goTypes, + DependencyIndexes: file_tibc_core_packet_v1_packet_proto_depIdxs, + MessageInfos: file_tibc_core_packet_v1_packet_proto_msgTypes, + }.Build() + File_tibc_core_packet_v1_packet_proto = out.File + file_tibc_core_packet_v1_packet_proto_rawDesc = nil + file_tibc_core_packet_v1_packet_proto_goTypes = nil + file_tibc_core_packet_v1_packet_proto_depIdxs = nil +} diff --git a/api/tibc/core/packet/v1/query.pulsar.go b/api/tibc/core/packet/v1/query.pulsar.go new file mode 100644 index 00000000..693e7665 --- /dev/null +++ b/api/tibc/core/packet/v1/query.pulsar.go @@ -0,0 +1,10835 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package packetv1 + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" + fmt "fmt" + v1 "github.com/bianjieai/tibc-go/api/tibc/core/client/v1" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_QueryPacketCommitmentRequest protoreflect.MessageDescriptor + fd_QueryPacketCommitmentRequest_dest_chain protoreflect.FieldDescriptor + fd_QueryPacketCommitmentRequest_source_chain protoreflect.FieldDescriptor + fd_QueryPacketCommitmentRequest_sequence protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_query_proto_init() + md_QueryPacketCommitmentRequest = File_tibc_core_packet_v1_query_proto.Messages().ByName("QueryPacketCommitmentRequest") + fd_QueryPacketCommitmentRequest_dest_chain = md_QueryPacketCommitmentRequest.Fields().ByName("dest_chain") + fd_QueryPacketCommitmentRequest_source_chain = md_QueryPacketCommitmentRequest.Fields().ByName("source_chain") + fd_QueryPacketCommitmentRequest_sequence = md_QueryPacketCommitmentRequest.Fields().ByName("sequence") +} + +var _ protoreflect.Message = (*fastReflection_QueryPacketCommitmentRequest)(nil) + +type fastReflection_QueryPacketCommitmentRequest QueryPacketCommitmentRequest + +func (x *QueryPacketCommitmentRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketCommitmentRequest)(x) +} + +func (x *QueryPacketCommitmentRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryPacketCommitmentRequest_messageType fastReflection_QueryPacketCommitmentRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketCommitmentRequest_messageType{} + +type fastReflection_QueryPacketCommitmentRequest_messageType struct{} + +func (x fastReflection_QueryPacketCommitmentRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketCommitmentRequest)(nil) +} +func (x fastReflection_QueryPacketCommitmentRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketCommitmentRequest) +} +func (x fastReflection_QueryPacketCommitmentRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketCommitmentRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryPacketCommitmentRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketCommitmentRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryPacketCommitmentRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketCommitmentRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryPacketCommitmentRequest) New() protoreflect.Message { + return new(fastReflection_QueryPacketCommitmentRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryPacketCommitmentRequest) Interface() protoreflect.ProtoMessage { + return (*QueryPacketCommitmentRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryPacketCommitmentRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DestChain != "" { + value := protoreflect.ValueOfString(x.DestChain) + if !f(fd_QueryPacketCommitmentRequest_dest_chain, value) { + return + } + } + if x.SourceChain != "" { + value := protoreflect.ValueOfString(x.SourceChain) + if !f(fd_QueryPacketCommitmentRequest_source_chain, value) { + return + } + } + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_QueryPacketCommitmentRequest_sequence, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryPacketCommitmentRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.dest_chain": + return x.DestChain != "" + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.source_chain": + return x.SourceChain != "" + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.sequence": + return x.Sequence != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketCommitmentRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.dest_chain": + x.DestChain = "" + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.source_chain": + x.SourceChain = "" + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.sequence": + x.Sequence = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryPacketCommitmentRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.dest_chain": + value := x.DestChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.source_chain": + value := x.SourceChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketCommitmentRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.dest_chain": + x.DestChain = value.Interface().(string) + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.source_chain": + x.SourceChain = value.Interface().(string) + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.sequence": + x.Sequence = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketCommitmentRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.dest_chain": + panic(fmt.Errorf("field dest_chain of message tibc.core.packet.v1.QueryPacketCommitmentRequest is not mutable")) + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.source_chain": + panic(fmt.Errorf("field source_chain of message tibc.core.packet.v1.QueryPacketCommitmentRequest is not mutable")) + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.sequence": + panic(fmt.Errorf("field sequence of message tibc.core.packet.v1.QueryPacketCommitmentRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryPacketCommitmentRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.dest_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.source_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.QueryPacketCommitmentRequest.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryPacketCommitmentRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.QueryPacketCommitmentRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryPacketCommitmentRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketCommitmentRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryPacketCommitmentRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryPacketCommitmentRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryPacketCommitmentRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DestChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.SourceChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketCommitmentRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x18 + } + if len(x.SourceChain) > 0 { + i -= len(x.SourceChain) + copy(dAtA[i:], x.SourceChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceChain))) + i-- + dAtA[i] = 0x12 + } + if len(x.DestChain) > 0 { + i -= len(x.DestChain) + copy(dAtA[i:], x.DestChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestChain))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketCommitmentRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketCommitmentRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketCommitmentRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DestChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SourceChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryPacketCommitmentResponse protoreflect.MessageDescriptor + fd_QueryPacketCommitmentResponse_commitment protoreflect.FieldDescriptor + fd_QueryPacketCommitmentResponse_proof protoreflect.FieldDescriptor + fd_QueryPacketCommitmentResponse_proof_height protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_query_proto_init() + md_QueryPacketCommitmentResponse = File_tibc_core_packet_v1_query_proto.Messages().ByName("QueryPacketCommitmentResponse") + fd_QueryPacketCommitmentResponse_commitment = md_QueryPacketCommitmentResponse.Fields().ByName("commitment") + fd_QueryPacketCommitmentResponse_proof = md_QueryPacketCommitmentResponse.Fields().ByName("proof") + fd_QueryPacketCommitmentResponse_proof_height = md_QueryPacketCommitmentResponse.Fields().ByName("proof_height") +} + +var _ protoreflect.Message = (*fastReflection_QueryPacketCommitmentResponse)(nil) + +type fastReflection_QueryPacketCommitmentResponse QueryPacketCommitmentResponse + +func (x *QueryPacketCommitmentResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketCommitmentResponse)(x) +} + +func (x *QueryPacketCommitmentResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryPacketCommitmentResponse_messageType fastReflection_QueryPacketCommitmentResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketCommitmentResponse_messageType{} + +type fastReflection_QueryPacketCommitmentResponse_messageType struct{} + +func (x fastReflection_QueryPacketCommitmentResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketCommitmentResponse)(nil) +} +func (x fastReflection_QueryPacketCommitmentResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketCommitmentResponse) +} +func (x fastReflection_QueryPacketCommitmentResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketCommitmentResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryPacketCommitmentResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketCommitmentResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryPacketCommitmentResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketCommitmentResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryPacketCommitmentResponse) New() protoreflect.Message { + return new(fastReflection_QueryPacketCommitmentResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryPacketCommitmentResponse) Interface() protoreflect.ProtoMessage { + return (*QueryPacketCommitmentResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryPacketCommitmentResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Commitment) != 0 { + value := protoreflect.ValueOfBytes(x.Commitment) + if !f(fd_QueryPacketCommitmentResponse_commitment, value) { + return + } + } + if len(x.Proof) != 0 { + value := protoreflect.ValueOfBytes(x.Proof) + if !f(fd_QueryPacketCommitmentResponse_proof, value) { + return + } + } + if x.ProofHeight != nil { + value := protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + if !f(fd_QueryPacketCommitmentResponse_proof_height, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryPacketCommitmentResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.commitment": + return len(x.Commitment) != 0 + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.proof": + return len(x.Proof) != 0 + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.proof_height": + return x.ProofHeight != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketCommitmentResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.commitment": + x.Commitment = nil + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.proof": + x.Proof = nil + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.proof_height": + x.ProofHeight = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryPacketCommitmentResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.commitment": + value := x.Commitment + return protoreflect.ValueOfBytes(value) + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.proof": + value := x.Proof + return protoreflect.ValueOfBytes(value) + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.proof_height": + value := x.ProofHeight + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketCommitmentResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.commitment": + x.Commitment = value.Bytes() + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.proof": + x.Proof = value.Bytes() + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.proof_height": + x.ProofHeight = value.Message().Interface().(*v1.Height) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketCommitmentResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.proof_height": + if x.ProofHeight == nil { + x.ProofHeight = new(v1.Height) + } + return protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.commitment": + panic(fmt.Errorf("field commitment of message tibc.core.packet.v1.QueryPacketCommitmentResponse is not mutable")) + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.proof": + panic(fmt.Errorf("field proof of message tibc.core.packet.v1.QueryPacketCommitmentResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryPacketCommitmentResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.commitment": + return protoreflect.ValueOfBytes(nil) + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.proof": + return protoreflect.ValueOfBytes(nil) + case "tibc.core.packet.v1.QueryPacketCommitmentResponse.proof_height": + m := new(v1.Height) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryPacketCommitmentResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.QueryPacketCommitmentResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryPacketCommitmentResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketCommitmentResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryPacketCommitmentResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryPacketCommitmentResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryPacketCommitmentResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Commitment) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Proof) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ProofHeight != nil { + l = options.Size(x.ProofHeight) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketCommitmentResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ProofHeight != nil { + encoded, err := options.Marshal(x.ProofHeight) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.Proof) > 0 { + i -= len(x.Proof) + copy(dAtA[i:], x.Proof) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Proof))) + i-- + dAtA[i] = 0x12 + } + if len(x.Commitment) > 0 { + i -= len(x.Commitment) + copy(dAtA[i:], x.Commitment) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Commitment))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketCommitmentResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketCommitmentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketCommitmentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Commitment", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Commitment = append(x.Commitment[:0], dAtA[iNdEx:postIndex]...) + if x.Commitment == nil { + x.Commitment = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Proof = append(x.Proof[:0], dAtA[iNdEx:postIndex]...) + if x.Proof == nil { + x.Proof = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ProofHeight == nil { + x.ProofHeight = &v1.Height{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ProofHeight); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryPacketCommitmentsRequest protoreflect.MessageDescriptor + fd_QueryPacketCommitmentsRequest_dest_chain protoreflect.FieldDescriptor + fd_QueryPacketCommitmentsRequest_source_chain protoreflect.FieldDescriptor + fd_QueryPacketCommitmentsRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_query_proto_init() + md_QueryPacketCommitmentsRequest = File_tibc_core_packet_v1_query_proto.Messages().ByName("QueryPacketCommitmentsRequest") + fd_QueryPacketCommitmentsRequest_dest_chain = md_QueryPacketCommitmentsRequest.Fields().ByName("dest_chain") + fd_QueryPacketCommitmentsRequest_source_chain = md_QueryPacketCommitmentsRequest.Fields().ByName("source_chain") + fd_QueryPacketCommitmentsRequest_pagination = md_QueryPacketCommitmentsRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryPacketCommitmentsRequest)(nil) + +type fastReflection_QueryPacketCommitmentsRequest QueryPacketCommitmentsRequest + +func (x *QueryPacketCommitmentsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketCommitmentsRequest)(x) +} + +func (x *QueryPacketCommitmentsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryPacketCommitmentsRequest_messageType fastReflection_QueryPacketCommitmentsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketCommitmentsRequest_messageType{} + +type fastReflection_QueryPacketCommitmentsRequest_messageType struct{} + +func (x fastReflection_QueryPacketCommitmentsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketCommitmentsRequest)(nil) +} +func (x fastReflection_QueryPacketCommitmentsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketCommitmentsRequest) +} +func (x fastReflection_QueryPacketCommitmentsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketCommitmentsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryPacketCommitmentsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketCommitmentsRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryPacketCommitmentsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketCommitmentsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryPacketCommitmentsRequest) New() protoreflect.Message { + return new(fastReflection_QueryPacketCommitmentsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryPacketCommitmentsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryPacketCommitmentsRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryPacketCommitmentsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DestChain != "" { + value := protoreflect.ValueOfString(x.DestChain) + if !f(fd_QueryPacketCommitmentsRequest_dest_chain, value) { + return + } + } + if x.SourceChain != "" { + value := protoreflect.ValueOfString(x.SourceChain) + if !f(fd_QueryPacketCommitmentsRequest_source_chain, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryPacketCommitmentsRequest_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryPacketCommitmentsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.dest_chain": + return x.DestChain != "" + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.source_chain": + return x.SourceChain != "" + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentsRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketCommitmentsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.dest_chain": + x.DestChain = "" + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.source_chain": + x.SourceChain = "" + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentsRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryPacketCommitmentsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.dest_chain": + value := x.DestChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.source_chain": + value := x.SourceChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentsRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketCommitmentsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.dest_chain": + x.DestChain = value.Interface().(string) + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.source_chain": + x.SourceChain = value.Interface().(string) + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentsRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketCommitmentsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.dest_chain": + panic(fmt.Errorf("field dest_chain of message tibc.core.packet.v1.QueryPacketCommitmentsRequest is not mutable")) + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.source_chain": + panic(fmt.Errorf("field source_chain of message tibc.core.packet.v1.QueryPacketCommitmentsRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentsRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryPacketCommitmentsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.dest_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.source_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.QueryPacketCommitmentsRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentsRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryPacketCommitmentsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.QueryPacketCommitmentsRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryPacketCommitmentsRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketCommitmentsRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryPacketCommitmentsRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryPacketCommitmentsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryPacketCommitmentsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DestChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.SourceChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketCommitmentsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.SourceChain) > 0 { + i -= len(x.SourceChain) + copy(dAtA[i:], x.SourceChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceChain))) + i-- + dAtA[i] = 0x12 + } + if len(x.DestChain) > 0 { + i -= len(x.DestChain) + copy(dAtA[i:], x.DestChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestChain))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketCommitmentsRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketCommitmentsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketCommitmentsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DestChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SourceChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryPacketCommitmentsResponse_1_list)(nil) + +type _QueryPacketCommitmentsResponse_1_list struct { + list *[]*PacketState +} + +func (x *_QueryPacketCommitmentsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryPacketCommitmentsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryPacketCommitmentsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PacketState) + (*x.list)[i] = concreteValue +} + +func (x *_QueryPacketCommitmentsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PacketState) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryPacketCommitmentsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(PacketState) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryPacketCommitmentsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryPacketCommitmentsResponse_1_list) NewElement() protoreflect.Value { + v := new(PacketState) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryPacketCommitmentsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryPacketCommitmentsResponse protoreflect.MessageDescriptor + fd_QueryPacketCommitmentsResponse_commitments protoreflect.FieldDescriptor + fd_QueryPacketCommitmentsResponse_pagination protoreflect.FieldDescriptor + fd_QueryPacketCommitmentsResponse_height protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_query_proto_init() + md_QueryPacketCommitmentsResponse = File_tibc_core_packet_v1_query_proto.Messages().ByName("QueryPacketCommitmentsResponse") + fd_QueryPacketCommitmentsResponse_commitments = md_QueryPacketCommitmentsResponse.Fields().ByName("commitments") + fd_QueryPacketCommitmentsResponse_pagination = md_QueryPacketCommitmentsResponse.Fields().ByName("pagination") + fd_QueryPacketCommitmentsResponse_height = md_QueryPacketCommitmentsResponse.Fields().ByName("height") +} + +var _ protoreflect.Message = (*fastReflection_QueryPacketCommitmentsResponse)(nil) + +type fastReflection_QueryPacketCommitmentsResponse QueryPacketCommitmentsResponse + +func (x *QueryPacketCommitmentsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketCommitmentsResponse)(x) +} + +func (x *QueryPacketCommitmentsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryPacketCommitmentsResponse_messageType fastReflection_QueryPacketCommitmentsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketCommitmentsResponse_messageType{} + +type fastReflection_QueryPacketCommitmentsResponse_messageType struct{} + +func (x fastReflection_QueryPacketCommitmentsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketCommitmentsResponse)(nil) +} +func (x fastReflection_QueryPacketCommitmentsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketCommitmentsResponse) +} +func (x fastReflection_QueryPacketCommitmentsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketCommitmentsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryPacketCommitmentsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketCommitmentsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryPacketCommitmentsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketCommitmentsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryPacketCommitmentsResponse) New() protoreflect.Message { + return new(fastReflection_QueryPacketCommitmentsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryPacketCommitmentsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryPacketCommitmentsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryPacketCommitmentsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Commitments) != 0 { + value := protoreflect.ValueOfList(&_QueryPacketCommitmentsResponse_1_list{list: &x.Commitments}) + if !f(fd_QueryPacketCommitmentsResponse_commitments, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryPacketCommitmentsResponse_pagination, value) { + return + } + } + if x.Height != nil { + value := protoreflect.ValueOfMessage(x.Height.ProtoReflect()) + if !f(fd_QueryPacketCommitmentsResponse_height, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryPacketCommitmentsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.commitments": + return len(x.Commitments) != 0 + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.pagination": + return x.Pagination != nil + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.height": + return x.Height != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketCommitmentsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.commitments": + x.Commitments = nil + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.pagination": + x.Pagination = nil + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.height": + x.Height = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryPacketCommitmentsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.commitments": + if len(x.Commitments) == 0 { + return protoreflect.ValueOfList(&_QueryPacketCommitmentsResponse_1_list{}) + } + listValue := &_QueryPacketCommitmentsResponse_1_list{list: &x.Commitments} + return protoreflect.ValueOfList(listValue) + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.height": + value := x.Height + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketCommitmentsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.commitments": + lv := value.List() + clv := lv.(*_QueryPacketCommitmentsResponse_1_list) + x.Commitments = *clv.list + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.height": + x.Height = value.Message().Interface().(*v1.Height) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketCommitmentsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.commitments": + if x.Commitments == nil { + x.Commitments = []*PacketState{} + } + value := &_QueryPacketCommitmentsResponse_1_list{list: &x.Commitments} + return protoreflect.ValueOfList(value) + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.height": + if x.Height == nil { + x.Height = new(v1.Height) + } + return protoreflect.ValueOfMessage(x.Height.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryPacketCommitmentsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.commitments": + list := []*PacketState{} + return protoreflect.ValueOfList(&_QueryPacketCommitmentsResponse_1_list{list: &list}) + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.packet.v1.QueryPacketCommitmentsResponse.height": + m := new(v1.Height) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketCommitmentsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketCommitmentsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryPacketCommitmentsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.QueryPacketCommitmentsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryPacketCommitmentsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketCommitmentsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryPacketCommitmentsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryPacketCommitmentsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryPacketCommitmentsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Commitments) > 0 { + for _, e := range x.Commitments { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Height != nil { + l = options.Size(x.Height) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketCommitmentsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Height != nil { + encoded, err := options.Marshal(x.Height) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Commitments) > 0 { + for iNdEx := len(x.Commitments) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Commitments[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketCommitmentsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketCommitmentsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketCommitmentsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Commitments", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Commitments = append(x.Commitments, &PacketState{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Commitments[len(x.Commitments)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Height == nil { + x.Height = &v1.Height{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Height); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryPacketReceiptRequest protoreflect.MessageDescriptor + fd_QueryPacketReceiptRequest_dest_chain protoreflect.FieldDescriptor + fd_QueryPacketReceiptRequest_source_chain protoreflect.FieldDescriptor + fd_QueryPacketReceiptRequest_sequence protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_query_proto_init() + md_QueryPacketReceiptRequest = File_tibc_core_packet_v1_query_proto.Messages().ByName("QueryPacketReceiptRequest") + fd_QueryPacketReceiptRequest_dest_chain = md_QueryPacketReceiptRequest.Fields().ByName("dest_chain") + fd_QueryPacketReceiptRequest_source_chain = md_QueryPacketReceiptRequest.Fields().ByName("source_chain") + fd_QueryPacketReceiptRequest_sequence = md_QueryPacketReceiptRequest.Fields().ByName("sequence") +} + +var _ protoreflect.Message = (*fastReflection_QueryPacketReceiptRequest)(nil) + +type fastReflection_QueryPacketReceiptRequest QueryPacketReceiptRequest + +func (x *QueryPacketReceiptRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketReceiptRequest)(x) +} + +func (x *QueryPacketReceiptRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryPacketReceiptRequest_messageType fastReflection_QueryPacketReceiptRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketReceiptRequest_messageType{} + +type fastReflection_QueryPacketReceiptRequest_messageType struct{} + +func (x fastReflection_QueryPacketReceiptRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketReceiptRequest)(nil) +} +func (x fastReflection_QueryPacketReceiptRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketReceiptRequest) +} +func (x fastReflection_QueryPacketReceiptRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketReceiptRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryPacketReceiptRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketReceiptRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryPacketReceiptRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketReceiptRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryPacketReceiptRequest) New() protoreflect.Message { + return new(fastReflection_QueryPacketReceiptRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryPacketReceiptRequest) Interface() protoreflect.ProtoMessage { + return (*QueryPacketReceiptRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryPacketReceiptRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DestChain != "" { + value := protoreflect.ValueOfString(x.DestChain) + if !f(fd_QueryPacketReceiptRequest_dest_chain, value) { + return + } + } + if x.SourceChain != "" { + value := protoreflect.ValueOfString(x.SourceChain) + if !f(fd_QueryPacketReceiptRequest_source_chain, value) { + return + } + } + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_QueryPacketReceiptRequest_sequence, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryPacketReceiptRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketReceiptRequest.dest_chain": + return x.DestChain != "" + case "tibc.core.packet.v1.QueryPacketReceiptRequest.source_chain": + return x.SourceChain != "" + case "tibc.core.packet.v1.QueryPacketReceiptRequest.sequence": + return x.Sequence != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketReceiptRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketReceiptRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketReceiptRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketReceiptRequest.dest_chain": + x.DestChain = "" + case "tibc.core.packet.v1.QueryPacketReceiptRequest.source_chain": + x.SourceChain = "" + case "tibc.core.packet.v1.QueryPacketReceiptRequest.sequence": + x.Sequence = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketReceiptRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketReceiptRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryPacketReceiptRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.QueryPacketReceiptRequest.dest_chain": + value := x.DestChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.QueryPacketReceiptRequest.source_chain": + value := x.SourceChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.QueryPacketReceiptRequest.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketReceiptRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketReceiptRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketReceiptRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketReceiptRequest.dest_chain": + x.DestChain = value.Interface().(string) + case "tibc.core.packet.v1.QueryPacketReceiptRequest.source_chain": + x.SourceChain = value.Interface().(string) + case "tibc.core.packet.v1.QueryPacketReceiptRequest.sequence": + x.Sequence = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketReceiptRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketReceiptRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketReceiptRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketReceiptRequest.dest_chain": + panic(fmt.Errorf("field dest_chain of message tibc.core.packet.v1.QueryPacketReceiptRequest is not mutable")) + case "tibc.core.packet.v1.QueryPacketReceiptRequest.source_chain": + panic(fmt.Errorf("field source_chain of message tibc.core.packet.v1.QueryPacketReceiptRequest is not mutable")) + case "tibc.core.packet.v1.QueryPacketReceiptRequest.sequence": + panic(fmt.Errorf("field sequence of message tibc.core.packet.v1.QueryPacketReceiptRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketReceiptRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketReceiptRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryPacketReceiptRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketReceiptRequest.dest_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.QueryPacketReceiptRequest.source_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.QueryPacketReceiptRequest.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketReceiptRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketReceiptRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryPacketReceiptRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.QueryPacketReceiptRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryPacketReceiptRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketReceiptRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryPacketReceiptRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryPacketReceiptRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryPacketReceiptRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DestChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.SourceChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketReceiptRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x18 + } + if len(x.SourceChain) > 0 { + i -= len(x.SourceChain) + copy(dAtA[i:], x.SourceChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceChain))) + i-- + dAtA[i] = 0x12 + } + if len(x.DestChain) > 0 { + i -= len(x.DestChain) + copy(dAtA[i:], x.DestChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestChain))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketReceiptRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketReceiptRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketReceiptRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DestChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SourceChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryPacketReceiptResponse protoreflect.MessageDescriptor + fd_QueryPacketReceiptResponse_received protoreflect.FieldDescriptor + fd_QueryPacketReceiptResponse_proof protoreflect.FieldDescriptor + fd_QueryPacketReceiptResponse_proof_height protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_query_proto_init() + md_QueryPacketReceiptResponse = File_tibc_core_packet_v1_query_proto.Messages().ByName("QueryPacketReceiptResponse") + fd_QueryPacketReceiptResponse_received = md_QueryPacketReceiptResponse.Fields().ByName("received") + fd_QueryPacketReceiptResponse_proof = md_QueryPacketReceiptResponse.Fields().ByName("proof") + fd_QueryPacketReceiptResponse_proof_height = md_QueryPacketReceiptResponse.Fields().ByName("proof_height") +} + +var _ protoreflect.Message = (*fastReflection_QueryPacketReceiptResponse)(nil) + +type fastReflection_QueryPacketReceiptResponse QueryPacketReceiptResponse + +func (x *QueryPacketReceiptResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketReceiptResponse)(x) +} + +func (x *QueryPacketReceiptResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryPacketReceiptResponse_messageType fastReflection_QueryPacketReceiptResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketReceiptResponse_messageType{} + +type fastReflection_QueryPacketReceiptResponse_messageType struct{} + +func (x fastReflection_QueryPacketReceiptResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketReceiptResponse)(nil) +} +func (x fastReflection_QueryPacketReceiptResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketReceiptResponse) +} +func (x fastReflection_QueryPacketReceiptResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketReceiptResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryPacketReceiptResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketReceiptResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryPacketReceiptResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketReceiptResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryPacketReceiptResponse) New() protoreflect.Message { + return new(fastReflection_QueryPacketReceiptResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryPacketReceiptResponse) Interface() protoreflect.ProtoMessage { + return (*QueryPacketReceiptResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryPacketReceiptResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Received != false { + value := protoreflect.ValueOfBool(x.Received) + if !f(fd_QueryPacketReceiptResponse_received, value) { + return + } + } + if len(x.Proof) != 0 { + value := protoreflect.ValueOfBytes(x.Proof) + if !f(fd_QueryPacketReceiptResponse_proof, value) { + return + } + } + if x.ProofHeight != nil { + value := protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + if !f(fd_QueryPacketReceiptResponse_proof_height, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryPacketReceiptResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketReceiptResponse.received": + return x.Received != false + case "tibc.core.packet.v1.QueryPacketReceiptResponse.proof": + return len(x.Proof) != 0 + case "tibc.core.packet.v1.QueryPacketReceiptResponse.proof_height": + return x.ProofHeight != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketReceiptResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketReceiptResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketReceiptResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketReceiptResponse.received": + x.Received = false + case "tibc.core.packet.v1.QueryPacketReceiptResponse.proof": + x.Proof = nil + case "tibc.core.packet.v1.QueryPacketReceiptResponse.proof_height": + x.ProofHeight = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketReceiptResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketReceiptResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryPacketReceiptResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.QueryPacketReceiptResponse.received": + value := x.Received + return protoreflect.ValueOfBool(value) + case "tibc.core.packet.v1.QueryPacketReceiptResponse.proof": + value := x.Proof + return protoreflect.ValueOfBytes(value) + case "tibc.core.packet.v1.QueryPacketReceiptResponse.proof_height": + value := x.ProofHeight + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketReceiptResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketReceiptResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketReceiptResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketReceiptResponse.received": + x.Received = value.Bool() + case "tibc.core.packet.v1.QueryPacketReceiptResponse.proof": + x.Proof = value.Bytes() + case "tibc.core.packet.v1.QueryPacketReceiptResponse.proof_height": + x.ProofHeight = value.Message().Interface().(*v1.Height) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketReceiptResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketReceiptResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketReceiptResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketReceiptResponse.proof_height": + if x.ProofHeight == nil { + x.ProofHeight = new(v1.Height) + } + return protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + case "tibc.core.packet.v1.QueryPacketReceiptResponse.received": + panic(fmt.Errorf("field received of message tibc.core.packet.v1.QueryPacketReceiptResponse is not mutable")) + case "tibc.core.packet.v1.QueryPacketReceiptResponse.proof": + panic(fmt.Errorf("field proof of message tibc.core.packet.v1.QueryPacketReceiptResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketReceiptResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketReceiptResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryPacketReceiptResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketReceiptResponse.received": + return protoreflect.ValueOfBool(false) + case "tibc.core.packet.v1.QueryPacketReceiptResponse.proof": + return protoreflect.ValueOfBytes(nil) + case "tibc.core.packet.v1.QueryPacketReceiptResponse.proof_height": + m := new(v1.Height) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketReceiptResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketReceiptResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryPacketReceiptResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.QueryPacketReceiptResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryPacketReceiptResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketReceiptResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryPacketReceiptResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryPacketReceiptResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryPacketReceiptResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Received { + n += 2 + } + l = len(x.Proof) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ProofHeight != nil { + l = options.Size(x.ProofHeight) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketReceiptResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ProofHeight != nil { + encoded, err := options.Marshal(x.ProofHeight) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if len(x.Proof) > 0 { + i -= len(x.Proof) + copy(dAtA[i:], x.Proof) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Proof))) + i-- + dAtA[i] = 0x1a + } + if x.Received { + i-- + if x.Received { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketReceiptResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketReceiptResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketReceiptResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Received", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Received = bool(v != 0) + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Proof = append(x.Proof[:0], dAtA[iNdEx:postIndex]...) + if x.Proof == nil { + x.Proof = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ProofHeight == nil { + x.ProofHeight = &v1.Height{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ProofHeight); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryPacketAcknowledgementRequest protoreflect.MessageDescriptor + fd_QueryPacketAcknowledgementRequest_dest_chain protoreflect.FieldDescriptor + fd_QueryPacketAcknowledgementRequest_source_chain protoreflect.FieldDescriptor + fd_QueryPacketAcknowledgementRequest_sequence protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_query_proto_init() + md_QueryPacketAcknowledgementRequest = File_tibc_core_packet_v1_query_proto.Messages().ByName("QueryPacketAcknowledgementRequest") + fd_QueryPacketAcknowledgementRequest_dest_chain = md_QueryPacketAcknowledgementRequest.Fields().ByName("dest_chain") + fd_QueryPacketAcknowledgementRequest_source_chain = md_QueryPacketAcknowledgementRequest.Fields().ByName("source_chain") + fd_QueryPacketAcknowledgementRequest_sequence = md_QueryPacketAcknowledgementRequest.Fields().ByName("sequence") +} + +var _ protoreflect.Message = (*fastReflection_QueryPacketAcknowledgementRequest)(nil) + +type fastReflection_QueryPacketAcknowledgementRequest QueryPacketAcknowledgementRequest + +func (x *QueryPacketAcknowledgementRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketAcknowledgementRequest)(x) +} + +func (x *QueryPacketAcknowledgementRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryPacketAcknowledgementRequest_messageType fastReflection_QueryPacketAcknowledgementRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketAcknowledgementRequest_messageType{} + +type fastReflection_QueryPacketAcknowledgementRequest_messageType struct{} + +func (x fastReflection_QueryPacketAcknowledgementRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketAcknowledgementRequest)(nil) +} +func (x fastReflection_QueryPacketAcknowledgementRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketAcknowledgementRequest) +} +func (x fastReflection_QueryPacketAcknowledgementRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketAcknowledgementRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryPacketAcknowledgementRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketAcknowledgementRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryPacketAcknowledgementRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketAcknowledgementRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryPacketAcknowledgementRequest) New() protoreflect.Message { + return new(fastReflection_QueryPacketAcknowledgementRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryPacketAcknowledgementRequest) Interface() protoreflect.ProtoMessage { + return (*QueryPacketAcknowledgementRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryPacketAcknowledgementRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DestChain != "" { + value := protoreflect.ValueOfString(x.DestChain) + if !f(fd_QueryPacketAcknowledgementRequest_dest_chain, value) { + return + } + } + if x.SourceChain != "" { + value := protoreflect.ValueOfString(x.SourceChain) + if !f(fd_QueryPacketAcknowledgementRequest_source_chain, value) { + return + } + } + if x.Sequence != uint64(0) { + value := protoreflect.ValueOfUint64(x.Sequence) + if !f(fd_QueryPacketAcknowledgementRequest_sequence, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryPacketAcknowledgementRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.dest_chain": + return x.DestChain != "" + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.source_chain": + return x.SourceChain != "" + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.sequence": + return x.Sequence != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketAcknowledgementRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.dest_chain": + x.DestChain = "" + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.source_chain": + x.SourceChain = "" + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.sequence": + x.Sequence = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryPacketAcknowledgementRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.dest_chain": + value := x.DestChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.source_chain": + value := x.SourceChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.sequence": + value := x.Sequence + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketAcknowledgementRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.dest_chain": + x.DestChain = value.Interface().(string) + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.source_chain": + x.SourceChain = value.Interface().(string) + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.sequence": + x.Sequence = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketAcknowledgementRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.dest_chain": + panic(fmt.Errorf("field dest_chain of message tibc.core.packet.v1.QueryPacketAcknowledgementRequest is not mutable")) + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.source_chain": + panic(fmt.Errorf("field source_chain of message tibc.core.packet.v1.QueryPacketAcknowledgementRequest is not mutable")) + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.sequence": + panic(fmt.Errorf("field sequence of message tibc.core.packet.v1.QueryPacketAcknowledgementRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryPacketAcknowledgementRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.dest_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.source_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.QueryPacketAcknowledgementRequest.sequence": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryPacketAcknowledgementRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.QueryPacketAcknowledgementRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryPacketAcknowledgementRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketAcknowledgementRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryPacketAcknowledgementRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryPacketAcknowledgementRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryPacketAcknowledgementRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DestChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.SourceChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Sequence != 0 { + n += 1 + runtime.Sov(uint64(x.Sequence)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketAcknowledgementRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Sequence != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) + i-- + dAtA[i] = 0x18 + } + if len(x.SourceChain) > 0 { + i -= len(x.SourceChain) + copy(dAtA[i:], x.SourceChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceChain))) + i-- + dAtA[i] = 0x12 + } + if len(x.DestChain) > 0 { + i -= len(x.DestChain) + copy(dAtA[i:], x.DestChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestChain))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketAcknowledgementRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketAcknowledgementRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketAcknowledgementRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DestChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SourceChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) + } + x.Sequence = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Sequence |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryPacketAcknowledgementResponse protoreflect.MessageDescriptor + fd_QueryPacketAcknowledgementResponse_acknowledgement protoreflect.FieldDescriptor + fd_QueryPacketAcknowledgementResponse_proof protoreflect.FieldDescriptor + fd_QueryPacketAcknowledgementResponse_proof_height protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_query_proto_init() + md_QueryPacketAcknowledgementResponse = File_tibc_core_packet_v1_query_proto.Messages().ByName("QueryPacketAcknowledgementResponse") + fd_QueryPacketAcknowledgementResponse_acknowledgement = md_QueryPacketAcknowledgementResponse.Fields().ByName("acknowledgement") + fd_QueryPacketAcknowledgementResponse_proof = md_QueryPacketAcknowledgementResponse.Fields().ByName("proof") + fd_QueryPacketAcknowledgementResponse_proof_height = md_QueryPacketAcknowledgementResponse.Fields().ByName("proof_height") +} + +var _ protoreflect.Message = (*fastReflection_QueryPacketAcknowledgementResponse)(nil) + +type fastReflection_QueryPacketAcknowledgementResponse QueryPacketAcknowledgementResponse + +func (x *QueryPacketAcknowledgementResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketAcknowledgementResponse)(x) +} + +func (x *QueryPacketAcknowledgementResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryPacketAcknowledgementResponse_messageType fastReflection_QueryPacketAcknowledgementResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketAcknowledgementResponse_messageType{} + +type fastReflection_QueryPacketAcknowledgementResponse_messageType struct{} + +func (x fastReflection_QueryPacketAcknowledgementResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketAcknowledgementResponse)(nil) +} +func (x fastReflection_QueryPacketAcknowledgementResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketAcknowledgementResponse) +} +func (x fastReflection_QueryPacketAcknowledgementResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketAcknowledgementResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryPacketAcknowledgementResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketAcknowledgementResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryPacketAcknowledgementResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketAcknowledgementResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryPacketAcknowledgementResponse) New() protoreflect.Message { + return new(fastReflection_QueryPacketAcknowledgementResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryPacketAcknowledgementResponse) Interface() protoreflect.ProtoMessage { + return (*QueryPacketAcknowledgementResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryPacketAcknowledgementResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Acknowledgement) != 0 { + value := protoreflect.ValueOfBytes(x.Acknowledgement) + if !f(fd_QueryPacketAcknowledgementResponse_acknowledgement, value) { + return + } + } + if len(x.Proof) != 0 { + value := protoreflect.ValueOfBytes(x.Proof) + if !f(fd_QueryPacketAcknowledgementResponse_proof, value) { + return + } + } + if x.ProofHeight != nil { + value := protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + if !f(fd_QueryPacketAcknowledgementResponse_proof_height, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryPacketAcknowledgementResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.acknowledgement": + return len(x.Acknowledgement) != 0 + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.proof": + return len(x.Proof) != 0 + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.proof_height": + return x.ProofHeight != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketAcknowledgementResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.acknowledgement": + x.Acknowledgement = nil + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.proof": + x.Proof = nil + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.proof_height": + x.ProofHeight = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryPacketAcknowledgementResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.acknowledgement": + value := x.Acknowledgement + return protoreflect.ValueOfBytes(value) + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.proof": + value := x.Proof + return protoreflect.ValueOfBytes(value) + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.proof_height": + value := x.ProofHeight + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketAcknowledgementResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.acknowledgement": + x.Acknowledgement = value.Bytes() + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.proof": + x.Proof = value.Bytes() + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.proof_height": + x.ProofHeight = value.Message().Interface().(*v1.Height) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketAcknowledgementResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.proof_height": + if x.ProofHeight == nil { + x.ProofHeight = new(v1.Height) + } + return protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.acknowledgement": + panic(fmt.Errorf("field acknowledgement of message tibc.core.packet.v1.QueryPacketAcknowledgementResponse is not mutable")) + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.proof": + panic(fmt.Errorf("field proof of message tibc.core.packet.v1.QueryPacketAcknowledgementResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryPacketAcknowledgementResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.acknowledgement": + return protoreflect.ValueOfBytes(nil) + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.proof": + return protoreflect.ValueOfBytes(nil) + case "tibc.core.packet.v1.QueryPacketAcknowledgementResponse.proof_height": + m := new(v1.Height) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryPacketAcknowledgementResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.QueryPacketAcknowledgementResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryPacketAcknowledgementResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketAcknowledgementResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryPacketAcknowledgementResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryPacketAcknowledgementResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryPacketAcknowledgementResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Acknowledgement) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Proof) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ProofHeight != nil { + l = options.Size(x.ProofHeight) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketAcknowledgementResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ProofHeight != nil { + encoded, err := options.Marshal(x.ProofHeight) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.Proof) > 0 { + i -= len(x.Proof) + copy(dAtA[i:], x.Proof) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Proof))) + i-- + dAtA[i] = 0x12 + } + if len(x.Acknowledgement) > 0 { + i -= len(x.Acknowledgement) + copy(dAtA[i:], x.Acknowledgement) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Acknowledgement))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketAcknowledgementResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketAcknowledgementResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketAcknowledgementResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Acknowledgement", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Acknowledgement = append(x.Acknowledgement[:0], dAtA[iNdEx:postIndex]...) + if x.Acknowledgement == nil { + x.Acknowledgement = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Proof = append(x.Proof[:0], dAtA[iNdEx:postIndex]...) + if x.Proof == nil { + x.Proof = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ProofHeight == nil { + x.ProofHeight = &v1.Height{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ProofHeight); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryPacketAcknowledgementsRequest protoreflect.MessageDescriptor + fd_QueryPacketAcknowledgementsRequest_dest_chain protoreflect.FieldDescriptor + fd_QueryPacketAcknowledgementsRequest_source_chain protoreflect.FieldDescriptor + fd_QueryPacketAcknowledgementsRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_query_proto_init() + md_QueryPacketAcknowledgementsRequest = File_tibc_core_packet_v1_query_proto.Messages().ByName("QueryPacketAcknowledgementsRequest") + fd_QueryPacketAcknowledgementsRequest_dest_chain = md_QueryPacketAcknowledgementsRequest.Fields().ByName("dest_chain") + fd_QueryPacketAcknowledgementsRequest_source_chain = md_QueryPacketAcknowledgementsRequest.Fields().ByName("source_chain") + fd_QueryPacketAcknowledgementsRequest_pagination = md_QueryPacketAcknowledgementsRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryPacketAcknowledgementsRequest)(nil) + +type fastReflection_QueryPacketAcknowledgementsRequest QueryPacketAcknowledgementsRequest + +func (x *QueryPacketAcknowledgementsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketAcknowledgementsRequest)(x) +} + +func (x *QueryPacketAcknowledgementsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryPacketAcknowledgementsRequest_messageType fastReflection_QueryPacketAcknowledgementsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketAcknowledgementsRequest_messageType{} + +type fastReflection_QueryPacketAcknowledgementsRequest_messageType struct{} + +func (x fastReflection_QueryPacketAcknowledgementsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketAcknowledgementsRequest)(nil) +} +func (x fastReflection_QueryPacketAcknowledgementsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketAcknowledgementsRequest) +} +func (x fastReflection_QueryPacketAcknowledgementsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketAcknowledgementsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryPacketAcknowledgementsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketAcknowledgementsRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryPacketAcknowledgementsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketAcknowledgementsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryPacketAcknowledgementsRequest) New() protoreflect.Message { + return new(fastReflection_QueryPacketAcknowledgementsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryPacketAcknowledgementsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryPacketAcknowledgementsRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryPacketAcknowledgementsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DestChain != "" { + value := protoreflect.ValueOfString(x.DestChain) + if !f(fd_QueryPacketAcknowledgementsRequest_dest_chain, value) { + return + } + } + if x.SourceChain != "" { + value := protoreflect.ValueOfString(x.SourceChain) + if !f(fd_QueryPacketAcknowledgementsRequest_source_chain, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryPacketAcknowledgementsRequest_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryPacketAcknowledgementsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.dest_chain": + return x.DestChain != "" + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.source_chain": + return x.SourceChain != "" + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementsRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketAcknowledgementsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.dest_chain": + x.DestChain = "" + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.source_chain": + x.SourceChain = "" + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementsRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryPacketAcknowledgementsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.dest_chain": + value := x.DestChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.source_chain": + value := x.SourceChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementsRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketAcknowledgementsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.dest_chain": + x.DestChain = value.Interface().(string) + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.source_chain": + x.SourceChain = value.Interface().(string) + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementsRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketAcknowledgementsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.dest_chain": + panic(fmt.Errorf("field dest_chain of message tibc.core.packet.v1.QueryPacketAcknowledgementsRequest is not mutable")) + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.source_chain": + panic(fmt.Errorf("field source_chain of message tibc.core.packet.v1.QueryPacketAcknowledgementsRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementsRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryPacketAcknowledgementsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.dest_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.source_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementsRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryPacketAcknowledgementsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.QueryPacketAcknowledgementsRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryPacketAcknowledgementsRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketAcknowledgementsRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryPacketAcknowledgementsRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryPacketAcknowledgementsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryPacketAcknowledgementsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DestChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.SourceChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketAcknowledgementsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.SourceChain) > 0 { + i -= len(x.SourceChain) + copy(dAtA[i:], x.SourceChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceChain))) + i-- + dAtA[i] = 0x12 + } + if len(x.DestChain) > 0 { + i -= len(x.DestChain) + copy(dAtA[i:], x.DestChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestChain))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketAcknowledgementsRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketAcknowledgementsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketAcknowledgementsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DestChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SourceChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryPacketAcknowledgementsResponse_1_list)(nil) + +type _QueryPacketAcknowledgementsResponse_1_list struct { + list *[]*PacketState +} + +func (x *_QueryPacketAcknowledgementsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryPacketAcknowledgementsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryPacketAcknowledgementsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PacketState) + (*x.list)[i] = concreteValue +} + +func (x *_QueryPacketAcknowledgementsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PacketState) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryPacketAcknowledgementsResponse_1_list) AppendMutable() protoreflect.Value { + v := new(PacketState) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryPacketAcknowledgementsResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryPacketAcknowledgementsResponse_1_list) NewElement() protoreflect.Value { + v := new(PacketState) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryPacketAcknowledgementsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryPacketAcknowledgementsResponse protoreflect.MessageDescriptor + fd_QueryPacketAcknowledgementsResponse_acknowledgements protoreflect.FieldDescriptor + fd_QueryPacketAcknowledgementsResponse_pagination protoreflect.FieldDescriptor + fd_QueryPacketAcknowledgementsResponse_height protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_query_proto_init() + md_QueryPacketAcknowledgementsResponse = File_tibc_core_packet_v1_query_proto.Messages().ByName("QueryPacketAcknowledgementsResponse") + fd_QueryPacketAcknowledgementsResponse_acknowledgements = md_QueryPacketAcknowledgementsResponse.Fields().ByName("acknowledgements") + fd_QueryPacketAcknowledgementsResponse_pagination = md_QueryPacketAcknowledgementsResponse.Fields().ByName("pagination") + fd_QueryPacketAcknowledgementsResponse_height = md_QueryPacketAcknowledgementsResponse.Fields().ByName("height") +} + +var _ protoreflect.Message = (*fastReflection_QueryPacketAcknowledgementsResponse)(nil) + +type fastReflection_QueryPacketAcknowledgementsResponse QueryPacketAcknowledgementsResponse + +func (x *QueryPacketAcknowledgementsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryPacketAcknowledgementsResponse)(x) +} + +func (x *QueryPacketAcknowledgementsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryPacketAcknowledgementsResponse_messageType fastReflection_QueryPacketAcknowledgementsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryPacketAcknowledgementsResponse_messageType{} + +type fastReflection_QueryPacketAcknowledgementsResponse_messageType struct{} + +func (x fastReflection_QueryPacketAcknowledgementsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryPacketAcknowledgementsResponse)(nil) +} +func (x fastReflection_QueryPacketAcknowledgementsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryPacketAcknowledgementsResponse) +} +func (x fastReflection_QueryPacketAcknowledgementsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketAcknowledgementsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryPacketAcknowledgementsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryPacketAcknowledgementsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryPacketAcknowledgementsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryPacketAcknowledgementsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryPacketAcknowledgementsResponse) New() protoreflect.Message { + return new(fastReflection_QueryPacketAcknowledgementsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryPacketAcknowledgementsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryPacketAcknowledgementsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryPacketAcknowledgementsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Acknowledgements) != 0 { + value := protoreflect.ValueOfList(&_QueryPacketAcknowledgementsResponse_1_list{list: &x.Acknowledgements}) + if !f(fd_QueryPacketAcknowledgementsResponse_acknowledgements, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryPacketAcknowledgementsResponse_pagination, value) { + return + } + } + if x.Height != nil { + value := protoreflect.ValueOfMessage(x.Height.ProtoReflect()) + if !f(fd_QueryPacketAcknowledgementsResponse_height, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryPacketAcknowledgementsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.acknowledgements": + return len(x.Acknowledgements) != 0 + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.pagination": + return x.Pagination != nil + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.height": + return x.Height != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketAcknowledgementsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.acknowledgements": + x.Acknowledgements = nil + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.pagination": + x.Pagination = nil + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.height": + x.Height = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryPacketAcknowledgementsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.acknowledgements": + if len(x.Acknowledgements) == 0 { + return protoreflect.ValueOfList(&_QueryPacketAcknowledgementsResponse_1_list{}) + } + listValue := &_QueryPacketAcknowledgementsResponse_1_list{list: &x.Acknowledgements} + return protoreflect.ValueOfList(listValue) + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.height": + value := x.Height + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketAcknowledgementsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.acknowledgements": + lv := value.List() + clv := lv.(*_QueryPacketAcknowledgementsResponse_1_list) + x.Acknowledgements = *clv.list + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.height": + x.Height = value.Message().Interface().(*v1.Height) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketAcknowledgementsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.acknowledgements": + if x.Acknowledgements == nil { + x.Acknowledgements = []*PacketState{} + } + value := &_QueryPacketAcknowledgementsResponse_1_list{list: &x.Acknowledgements} + return protoreflect.ValueOfList(value) + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.height": + if x.Height == nil { + x.Height = new(v1.Height) + } + return protoreflect.ValueOfMessage(x.Height.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryPacketAcknowledgementsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.acknowledgements": + list := []*PacketState{} + return protoreflect.ValueOfList(&_QueryPacketAcknowledgementsResponse_1_list{list: &list}) + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.height": + m := new(v1.Height) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryPacketAcknowledgementsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryPacketAcknowledgementsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryPacketAcknowledgementsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.QueryPacketAcknowledgementsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryPacketAcknowledgementsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryPacketAcknowledgementsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryPacketAcknowledgementsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryPacketAcknowledgementsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryPacketAcknowledgementsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Acknowledgements) > 0 { + for _, e := range x.Acknowledgements { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Height != nil { + l = options.Size(x.Height) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketAcknowledgementsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Height != nil { + encoded, err := options.Marshal(x.Height) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Acknowledgements) > 0 { + for iNdEx := len(x.Acknowledgements) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Acknowledgements[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryPacketAcknowledgementsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketAcknowledgementsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPacketAcknowledgementsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Acknowledgements", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Acknowledgements = append(x.Acknowledgements, &PacketState{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Acknowledgements[len(x.Acknowledgements)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Height == nil { + x.Height = &v1.Height{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Height); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryUnreceivedPacketsRequest_3_list)(nil) + +type _QueryUnreceivedPacketsRequest_3_list struct { + list *[]uint64 +} + +func (x *_QueryUnreceivedPacketsRequest_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryUnreceivedPacketsRequest_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfUint64((*x.list)[i]) +} + +func (x *_QueryUnreceivedPacketsRequest_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Uint() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_QueryUnreceivedPacketsRequest_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Uint() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryUnreceivedPacketsRequest_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message QueryUnreceivedPacketsRequest at list field PacketCommitmentSequences as it is not of Message kind")) +} + +func (x *_QueryUnreceivedPacketsRequest_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_QueryUnreceivedPacketsRequest_3_list) NewElement() protoreflect.Value { + v := uint64(0) + return protoreflect.ValueOfUint64(v) +} + +func (x *_QueryUnreceivedPacketsRequest_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryUnreceivedPacketsRequest protoreflect.MessageDescriptor + fd_QueryUnreceivedPacketsRequest_dest_chain protoreflect.FieldDescriptor + fd_QueryUnreceivedPacketsRequest_source_chain protoreflect.FieldDescriptor + fd_QueryUnreceivedPacketsRequest_packet_commitment_sequences protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_query_proto_init() + md_QueryUnreceivedPacketsRequest = File_tibc_core_packet_v1_query_proto.Messages().ByName("QueryUnreceivedPacketsRequest") + fd_QueryUnreceivedPacketsRequest_dest_chain = md_QueryUnreceivedPacketsRequest.Fields().ByName("dest_chain") + fd_QueryUnreceivedPacketsRequest_source_chain = md_QueryUnreceivedPacketsRequest.Fields().ByName("source_chain") + fd_QueryUnreceivedPacketsRequest_packet_commitment_sequences = md_QueryUnreceivedPacketsRequest.Fields().ByName("packet_commitment_sequences") +} + +var _ protoreflect.Message = (*fastReflection_QueryUnreceivedPacketsRequest)(nil) + +type fastReflection_QueryUnreceivedPacketsRequest QueryUnreceivedPacketsRequest + +func (x *QueryUnreceivedPacketsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryUnreceivedPacketsRequest)(x) +} + +func (x *QueryUnreceivedPacketsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryUnreceivedPacketsRequest_messageType fastReflection_QueryUnreceivedPacketsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryUnreceivedPacketsRequest_messageType{} + +type fastReflection_QueryUnreceivedPacketsRequest_messageType struct{} + +func (x fastReflection_QueryUnreceivedPacketsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryUnreceivedPacketsRequest)(nil) +} +func (x fastReflection_QueryUnreceivedPacketsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryUnreceivedPacketsRequest) +} +func (x fastReflection_QueryUnreceivedPacketsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUnreceivedPacketsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryUnreceivedPacketsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUnreceivedPacketsRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryUnreceivedPacketsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryUnreceivedPacketsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryUnreceivedPacketsRequest) New() protoreflect.Message { + return new(fastReflection_QueryUnreceivedPacketsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryUnreceivedPacketsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryUnreceivedPacketsRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryUnreceivedPacketsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DestChain != "" { + value := protoreflect.ValueOfString(x.DestChain) + if !f(fd_QueryUnreceivedPacketsRequest_dest_chain, value) { + return + } + } + if x.SourceChain != "" { + value := protoreflect.ValueOfString(x.SourceChain) + if !f(fd_QueryUnreceivedPacketsRequest_source_chain, value) { + return + } + } + if len(x.PacketCommitmentSequences) != 0 { + value := protoreflect.ValueOfList(&_QueryUnreceivedPacketsRequest_3_list{list: &x.PacketCommitmentSequences}) + if !f(fd_QueryUnreceivedPacketsRequest_packet_commitment_sequences, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryUnreceivedPacketsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.dest_chain": + return x.DestChain != "" + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.source_chain": + return x.SourceChain != "" + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.packet_commitment_sequences": + return len(x.PacketCommitmentSequences) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedPacketsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedPacketsRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUnreceivedPacketsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.dest_chain": + x.DestChain = "" + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.source_chain": + x.SourceChain = "" + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.packet_commitment_sequences": + x.PacketCommitmentSequences = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedPacketsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedPacketsRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryUnreceivedPacketsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.dest_chain": + value := x.DestChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.source_chain": + value := x.SourceChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.packet_commitment_sequences": + if len(x.PacketCommitmentSequences) == 0 { + return protoreflect.ValueOfList(&_QueryUnreceivedPacketsRequest_3_list{}) + } + listValue := &_QueryUnreceivedPacketsRequest_3_list{list: &x.PacketCommitmentSequences} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedPacketsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedPacketsRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUnreceivedPacketsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.dest_chain": + x.DestChain = value.Interface().(string) + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.source_chain": + x.SourceChain = value.Interface().(string) + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.packet_commitment_sequences": + lv := value.List() + clv := lv.(*_QueryUnreceivedPacketsRequest_3_list) + x.PacketCommitmentSequences = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedPacketsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedPacketsRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUnreceivedPacketsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.packet_commitment_sequences": + if x.PacketCommitmentSequences == nil { + x.PacketCommitmentSequences = []uint64{} + } + value := &_QueryUnreceivedPacketsRequest_3_list{list: &x.PacketCommitmentSequences} + return protoreflect.ValueOfList(value) + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.dest_chain": + panic(fmt.Errorf("field dest_chain of message tibc.core.packet.v1.QueryUnreceivedPacketsRequest is not mutable")) + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.source_chain": + panic(fmt.Errorf("field source_chain of message tibc.core.packet.v1.QueryUnreceivedPacketsRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedPacketsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedPacketsRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryUnreceivedPacketsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.dest_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.source_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.QueryUnreceivedPacketsRequest.packet_commitment_sequences": + list := []uint64{} + return protoreflect.ValueOfList(&_QueryUnreceivedPacketsRequest_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedPacketsRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedPacketsRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryUnreceivedPacketsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.QueryUnreceivedPacketsRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryUnreceivedPacketsRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUnreceivedPacketsRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryUnreceivedPacketsRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryUnreceivedPacketsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryUnreceivedPacketsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DestChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.SourceChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.PacketCommitmentSequences) > 0 { + l = 0 + for _, e := range x.PacketCommitmentSequences { + l += runtime.Sov(uint64(e)) + } + n += 1 + runtime.Sov(uint64(l)) + l + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryUnreceivedPacketsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.PacketCommitmentSequences) > 0 { + var pksize2 int + for _, num := range x.PacketCommitmentSequences { + pksize2 += runtime.Sov(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num := range x.PacketCommitmentSequences { + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0x1a + } + if len(x.SourceChain) > 0 { + i -= len(x.SourceChain) + copy(dAtA[i:], x.SourceChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceChain))) + i-- + dAtA[i] = 0x12 + } + if len(x.DestChain) > 0 { + i -= len(x.DestChain) + copy(dAtA[i:], x.DestChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestChain))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryUnreceivedPacketsRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUnreceivedPacketsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUnreceivedPacketsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DestChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SourceChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.PacketCommitmentSequences = append(x.PacketCommitmentSequences, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(x.PacketCommitmentSequences) == 0 { + x.PacketCommitmentSequences = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.PacketCommitmentSequences = append(x.PacketCommitmentSequences, v) + } + } else { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PacketCommitmentSequences", wireType) + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryUnreceivedPacketsResponse_1_list)(nil) + +type _QueryUnreceivedPacketsResponse_1_list struct { + list *[]uint64 +} + +func (x *_QueryUnreceivedPacketsResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryUnreceivedPacketsResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfUint64((*x.list)[i]) +} + +func (x *_QueryUnreceivedPacketsResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Uint() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_QueryUnreceivedPacketsResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Uint() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryUnreceivedPacketsResponse_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message QueryUnreceivedPacketsResponse at list field Sequences as it is not of Message kind")) +} + +func (x *_QueryUnreceivedPacketsResponse_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_QueryUnreceivedPacketsResponse_1_list) NewElement() protoreflect.Value { + v := uint64(0) + return protoreflect.ValueOfUint64(v) +} + +func (x *_QueryUnreceivedPacketsResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryUnreceivedPacketsResponse protoreflect.MessageDescriptor + fd_QueryUnreceivedPacketsResponse_sequences protoreflect.FieldDescriptor + fd_QueryUnreceivedPacketsResponse_height protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_query_proto_init() + md_QueryUnreceivedPacketsResponse = File_tibc_core_packet_v1_query_proto.Messages().ByName("QueryUnreceivedPacketsResponse") + fd_QueryUnreceivedPacketsResponse_sequences = md_QueryUnreceivedPacketsResponse.Fields().ByName("sequences") + fd_QueryUnreceivedPacketsResponse_height = md_QueryUnreceivedPacketsResponse.Fields().ByName("height") +} + +var _ protoreflect.Message = (*fastReflection_QueryUnreceivedPacketsResponse)(nil) + +type fastReflection_QueryUnreceivedPacketsResponse QueryUnreceivedPacketsResponse + +func (x *QueryUnreceivedPacketsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryUnreceivedPacketsResponse)(x) +} + +func (x *QueryUnreceivedPacketsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryUnreceivedPacketsResponse_messageType fastReflection_QueryUnreceivedPacketsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryUnreceivedPacketsResponse_messageType{} + +type fastReflection_QueryUnreceivedPacketsResponse_messageType struct{} + +func (x fastReflection_QueryUnreceivedPacketsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryUnreceivedPacketsResponse)(nil) +} +func (x fastReflection_QueryUnreceivedPacketsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryUnreceivedPacketsResponse) +} +func (x fastReflection_QueryUnreceivedPacketsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUnreceivedPacketsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryUnreceivedPacketsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUnreceivedPacketsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryUnreceivedPacketsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryUnreceivedPacketsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryUnreceivedPacketsResponse) New() protoreflect.Message { + return new(fastReflection_QueryUnreceivedPacketsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryUnreceivedPacketsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryUnreceivedPacketsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryUnreceivedPacketsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Sequences) != 0 { + value := protoreflect.ValueOfList(&_QueryUnreceivedPacketsResponse_1_list{list: &x.Sequences}) + if !f(fd_QueryUnreceivedPacketsResponse_sequences, value) { + return + } + } + if x.Height != nil { + value := protoreflect.ValueOfMessage(x.Height.ProtoReflect()) + if !f(fd_QueryUnreceivedPacketsResponse_height, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryUnreceivedPacketsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedPacketsResponse.sequences": + return len(x.Sequences) != 0 + case "tibc.core.packet.v1.QueryUnreceivedPacketsResponse.height": + return x.Height != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedPacketsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedPacketsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUnreceivedPacketsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedPacketsResponse.sequences": + x.Sequences = nil + case "tibc.core.packet.v1.QueryUnreceivedPacketsResponse.height": + x.Height = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedPacketsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedPacketsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryUnreceivedPacketsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedPacketsResponse.sequences": + if len(x.Sequences) == 0 { + return protoreflect.ValueOfList(&_QueryUnreceivedPacketsResponse_1_list{}) + } + listValue := &_QueryUnreceivedPacketsResponse_1_list{list: &x.Sequences} + return protoreflect.ValueOfList(listValue) + case "tibc.core.packet.v1.QueryUnreceivedPacketsResponse.height": + value := x.Height + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedPacketsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedPacketsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUnreceivedPacketsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedPacketsResponse.sequences": + lv := value.List() + clv := lv.(*_QueryUnreceivedPacketsResponse_1_list) + x.Sequences = *clv.list + case "tibc.core.packet.v1.QueryUnreceivedPacketsResponse.height": + x.Height = value.Message().Interface().(*v1.Height) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedPacketsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedPacketsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUnreceivedPacketsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedPacketsResponse.sequences": + if x.Sequences == nil { + x.Sequences = []uint64{} + } + value := &_QueryUnreceivedPacketsResponse_1_list{list: &x.Sequences} + return protoreflect.ValueOfList(value) + case "tibc.core.packet.v1.QueryUnreceivedPacketsResponse.height": + if x.Height == nil { + x.Height = new(v1.Height) + } + return protoreflect.ValueOfMessage(x.Height.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedPacketsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedPacketsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryUnreceivedPacketsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedPacketsResponse.sequences": + list := []uint64{} + return protoreflect.ValueOfList(&_QueryUnreceivedPacketsResponse_1_list{list: &list}) + case "tibc.core.packet.v1.QueryUnreceivedPacketsResponse.height": + m := new(v1.Height) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedPacketsResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedPacketsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryUnreceivedPacketsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.QueryUnreceivedPacketsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryUnreceivedPacketsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUnreceivedPacketsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryUnreceivedPacketsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryUnreceivedPacketsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryUnreceivedPacketsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Sequences) > 0 { + l = 0 + for _, e := range x.Sequences { + l += runtime.Sov(uint64(e)) + } + n += 1 + runtime.Sov(uint64(l)) + l + } + if x.Height != nil { + l = options.Size(x.Height) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryUnreceivedPacketsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Height != nil { + encoded, err := options.Marshal(x.Height) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sequences) > 0 { + var pksize2 int + for _, num := range x.Sequences { + pksize2 += runtime.Sov(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num := range x.Sequences { + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryUnreceivedPacketsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUnreceivedPacketsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUnreceivedPacketsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Sequences = append(x.Sequences, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(x.Sequences) == 0 { + x.Sequences = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Sequences = append(x.Sequences, v) + } + } else { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequences", wireType) + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Height == nil { + x.Height = &v1.Height{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Height); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryUnreceivedAcksRequest_3_list)(nil) + +type _QueryUnreceivedAcksRequest_3_list struct { + list *[]uint64 +} + +func (x *_QueryUnreceivedAcksRequest_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryUnreceivedAcksRequest_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfUint64((*x.list)[i]) +} + +func (x *_QueryUnreceivedAcksRequest_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Uint() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_QueryUnreceivedAcksRequest_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Uint() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryUnreceivedAcksRequest_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message QueryUnreceivedAcksRequest at list field PacketAckSequences as it is not of Message kind")) +} + +func (x *_QueryUnreceivedAcksRequest_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_QueryUnreceivedAcksRequest_3_list) NewElement() protoreflect.Value { + v := uint64(0) + return protoreflect.ValueOfUint64(v) +} + +func (x *_QueryUnreceivedAcksRequest_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryUnreceivedAcksRequest protoreflect.MessageDescriptor + fd_QueryUnreceivedAcksRequest_dest_chain protoreflect.FieldDescriptor + fd_QueryUnreceivedAcksRequest_source_chain protoreflect.FieldDescriptor + fd_QueryUnreceivedAcksRequest_packet_ack_sequences protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_query_proto_init() + md_QueryUnreceivedAcksRequest = File_tibc_core_packet_v1_query_proto.Messages().ByName("QueryUnreceivedAcksRequest") + fd_QueryUnreceivedAcksRequest_dest_chain = md_QueryUnreceivedAcksRequest.Fields().ByName("dest_chain") + fd_QueryUnreceivedAcksRequest_source_chain = md_QueryUnreceivedAcksRequest.Fields().ByName("source_chain") + fd_QueryUnreceivedAcksRequest_packet_ack_sequences = md_QueryUnreceivedAcksRequest.Fields().ByName("packet_ack_sequences") +} + +var _ protoreflect.Message = (*fastReflection_QueryUnreceivedAcksRequest)(nil) + +type fastReflection_QueryUnreceivedAcksRequest QueryUnreceivedAcksRequest + +func (x *QueryUnreceivedAcksRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryUnreceivedAcksRequest)(x) +} + +func (x *QueryUnreceivedAcksRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryUnreceivedAcksRequest_messageType fastReflection_QueryUnreceivedAcksRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryUnreceivedAcksRequest_messageType{} + +type fastReflection_QueryUnreceivedAcksRequest_messageType struct{} + +func (x fastReflection_QueryUnreceivedAcksRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryUnreceivedAcksRequest)(nil) +} +func (x fastReflection_QueryUnreceivedAcksRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryUnreceivedAcksRequest) +} +func (x fastReflection_QueryUnreceivedAcksRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUnreceivedAcksRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryUnreceivedAcksRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUnreceivedAcksRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryUnreceivedAcksRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryUnreceivedAcksRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryUnreceivedAcksRequest) New() protoreflect.Message { + return new(fastReflection_QueryUnreceivedAcksRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryUnreceivedAcksRequest) Interface() protoreflect.ProtoMessage { + return (*QueryUnreceivedAcksRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryUnreceivedAcksRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DestChain != "" { + value := protoreflect.ValueOfString(x.DestChain) + if !f(fd_QueryUnreceivedAcksRequest_dest_chain, value) { + return + } + } + if x.SourceChain != "" { + value := protoreflect.ValueOfString(x.SourceChain) + if !f(fd_QueryUnreceivedAcksRequest_source_chain, value) { + return + } + } + if len(x.PacketAckSequences) != 0 { + value := protoreflect.ValueOfList(&_QueryUnreceivedAcksRequest_3_list{list: &x.PacketAckSequences}) + if !f(fd_QueryUnreceivedAcksRequest_packet_ack_sequences, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryUnreceivedAcksRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.dest_chain": + return x.DestChain != "" + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.source_chain": + return x.SourceChain != "" + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.packet_ack_sequences": + return len(x.PacketAckSequences) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedAcksRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedAcksRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUnreceivedAcksRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.dest_chain": + x.DestChain = "" + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.source_chain": + x.SourceChain = "" + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.packet_ack_sequences": + x.PacketAckSequences = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedAcksRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedAcksRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryUnreceivedAcksRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.dest_chain": + value := x.DestChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.source_chain": + value := x.SourceChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.packet_ack_sequences": + if len(x.PacketAckSequences) == 0 { + return protoreflect.ValueOfList(&_QueryUnreceivedAcksRequest_3_list{}) + } + listValue := &_QueryUnreceivedAcksRequest_3_list{list: &x.PacketAckSequences} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedAcksRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedAcksRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUnreceivedAcksRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.dest_chain": + x.DestChain = value.Interface().(string) + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.source_chain": + x.SourceChain = value.Interface().(string) + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.packet_ack_sequences": + lv := value.List() + clv := lv.(*_QueryUnreceivedAcksRequest_3_list) + x.PacketAckSequences = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedAcksRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedAcksRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUnreceivedAcksRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.packet_ack_sequences": + if x.PacketAckSequences == nil { + x.PacketAckSequences = []uint64{} + } + value := &_QueryUnreceivedAcksRequest_3_list{list: &x.PacketAckSequences} + return protoreflect.ValueOfList(value) + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.dest_chain": + panic(fmt.Errorf("field dest_chain of message tibc.core.packet.v1.QueryUnreceivedAcksRequest is not mutable")) + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.source_chain": + panic(fmt.Errorf("field source_chain of message tibc.core.packet.v1.QueryUnreceivedAcksRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedAcksRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedAcksRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryUnreceivedAcksRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.dest_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.source_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.QueryUnreceivedAcksRequest.packet_ack_sequences": + list := []uint64{} + return protoreflect.ValueOfList(&_QueryUnreceivedAcksRequest_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedAcksRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedAcksRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryUnreceivedAcksRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.QueryUnreceivedAcksRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryUnreceivedAcksRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUnreceivedAcksRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryUnreceivedAcksRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryUnreceivedAcksRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryUnreceivedAcksRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DestChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.SourceChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.PacketAckSequences) > 0 { + l = 0 + for _, e := range x.PacketAckSequences { + l += runtime.Sov(uint64(e)) + } + n += 1 + runtime.Sov(uint64(l)) + l + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryUnreceivedAcksRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.PacketAckSequences) > 0 { + var pksize2 int + for _, num := range x.PacketAckSequences { + pksize2 += runtime.Sov(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num := range x.PacketAckSequences { + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0x1a + } + if len(x.SourceChain) > 0 { + i -= len(x.SourceChain) + copy(dAtA[i:], x.SourceChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceChain))) + i-- + dAtA[i] = 0x12 + } + if len(x.DestChain) > 0 { + i -= len(x.DestChain) + copy(dAtA[i:], x.DestChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestChain))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryUnreceivedAcksRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUnreceivedAcksRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUnreceivedAcksRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DestChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SourceChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.PacketAckSequences = append(x.PacketAckSequences, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(x.PacketAckSequences) == 0 { + x.PacketAckSequences = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.PacketAckSequences = append(x.PacketAckSequences, v) + } + } else { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PacketAckSequences", wireType) + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryUnreceivedAcksResponse_1_list)(nil) + +type _QueryUnreceivedAcksResponse_1_list struct { + list *[]uint64 +} + +func (x *_QueryUnreceivedAcksResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryUnreceivedAcksResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfUint64((*x.list)[i]) +} + +func (x *_QueryUnreceivedAcksResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Uint() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_QueryUnreceivedAcksResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Uint() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryUnreceivedAcksResponse_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message QueryUnreceivedAcksResponse at list field Sequences as it is not of Message kind")) +} + +func (x *_QueryUnreceivedAcksResponse_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_QueryUnreceivedAcksResponse_1_list) NewElement() protoreflect.Value { + v := uint64(0) + return protoreflect.ValueOfUint64(v) +} + +func (x *_QueryUnreceivedAcksResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryUnreceivedAcksResponse protoreflect.MessageDescriptor + fd_QueryUnreceivedAcksResponse_sequences protoreflect.FieldDescriptor + fd_QueryUnreceivedAcksResponse_height protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_query_proto_init() + md_QueryUnreceivedAcksResponse = File_tibc_core_packet_v1_query_proto.Messages().ByName("QueryUnreceivedAcksResponse") + fd_QueryUnreceivedAcksResponse_sequences = md_QueryUnreceivedAcksResponse.Fields().ByName("sequences") + fd_QueryUnreceivedAcksResponse_height = md_QueryUnreceivedAcksResponse.Fields().ByName("height") +} + +var _ protoreflect.Message = (*fastReflection_QueryUnreceivedAcksResponse)(nil) + +type fastReflection_QueryUnreceivedAcksResponse QueryUnreceivedAcksResponse + +func (x *QueryUnreceivedAcksResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryUnreceivedAcksResponse)(x) +} + +func (x *QueryUnreceivedAcksResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryUnreceivedAcksResponse_messageType fastReflection_QueryUnreceivedAcksResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryUnreceivedAcksResponse_messageType{} + +type fastReflection_QueryUnreceivedAcksResponse_messageType struct{} + +func (x fastReflection_QueryUnreceivedAcksResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryUnreceivedAcksResponse)(nil) +} +func (x fastReflection_QueryUnreceivedAcksResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryUnreceivedAcksResponse) +} +func (x fastReflection_QueryUnreceivedAcksResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUnreceivedAcksResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryUnreceivedAcksResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUnreceivedAcksResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryUnreceivedAcksResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryUnreceivedAcksResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryUnreceivedAcksResponse) New() protoreflect.Message { + return new(fastReflection_QueryUnreceivedAcksResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryUnreceivedAcksResponse) Interface() protoreflect.ProtoMessage { + return (*QueryUnreceivedAcksResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryUnreceivedAcksResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Sequences) != 0 { + value := protoreflect.ValueOfList(&_QueryUnreceivedAcksResponse_1_list{list: &x.Sequences}) + if !f(fd_QueryUnreceivedAcksResponse_sequences, value) { + return + } + } + if x.Height != nil { + value := protoreflect.ValueOfMessage(x.Height.ProtoReflect()) + if !f(fd_QueryUnreceivedAcksResponse_height, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryUnreceivedAcksResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedAcksResponse.sequences": + return len(x.Sequences) != 0 + case "tibc.core.packet.v1.QueryUnreceivedAcksResponse.height": + return x.Height != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedAcksResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedAcksResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUnreceivedAcksResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedAcksResponse.sequences": + x.Sequences = nil + case "tibc.core.packet.v1.QueryUnreceivedAcksResponse.height": + x.Height = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedAcksResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedAcksResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryUnreceivedAcksResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedAcksResponse.sequences": + if len(x.Sequences) == 0 { + return protoreflect.ValueOfList(&_QueryUnreceivedAcksResponse_1_list{}) + } + listValue := &_QueryUnreceivedAcksResponse_1_list{list: &x.Sequences} + return protoreflect.ValueOfList(listValue) + case "tibc.core.packet.v1.QueryUnreceivedAcksResponse.height": + value := x.Height + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedAcksResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedAcksResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUnreceivedAcksResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedAcksResponse.sequences": + lv := value.List() + clv := lv.(*_QueryUnreceivedAcksResponse_1_list) + x.Sequences = *clv.list + case "tibc.core.packet.v1.QueryUnreceivedAcksResponse.height": + x.Height = value.Message().Interface().(*v1.Height) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedAcksResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedAcksResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUnreceivedAcksResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedAcksResponse.sequences": + if x.Sequences == nil { + x.Sequences = []uint64{} + } + value := &_QueryUnreceivedAcksResponse_1_list{list: &x.Sequences} + return protoreflect.ValueOfList(value) + case "tibc.core.packet.v1.QueryUnreceivedAcksResponse.height": + if x.Height == nil { + x.Height = new(v1.Height) + } + return protoreflect.ValueOfMessage(x.Height.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedAcksResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedAcksResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryUnreceivedAcksResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryUnreceivedAcksResponse.sequences": + list := []uint64{} + return protoreflect.ValueOfList(&_QueryUnreceivedAcksResponse_1_list{list: &list}) + case "tibc.core.packet.v1.QueryUnreceivedAcksResponse.height": + m := new(v1.Height) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryUnreceivedAcksResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryUnreceivedAcksResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryUnreceivedAcksResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.QueryUnreceivedAcksResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryUnreceivedAcksResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUnreceivedAcksResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryUnreceivedAcksResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryUnreceivedAcksResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryUnreceivedAcksResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Sequences) > 0 { + l = 0 + for _, e := range x.Sequences { + l += runtime.Sov(uint64(e)) + } + n += 1 + runtime.Sov(uint64(l)) + l + } + if x.Height != nil { + l = options.Size(x.Height) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryUnreceivedAcksResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Height != nil { + encoded, err := options.Marshal(x.Height) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sequences) > 0 { + var pksize2 int + for _, num := range x.Sequences { + pksize2 += runtime.Sov(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num := range x.Sequences { + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryUnreceivedAcksResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUnreceivedAcksResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUnreceivedAcksResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Sequences = append(x.Sequences, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(x.Sequences) == 0 { + x.Sequences = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Sequences = append(x.Sequences, v) + } + } else { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequences", wireType) + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Height == nil { + x.Height = &v1.Height{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Height); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryCleanPacketCommitmentRequest protoreflect.MessageDescriptor + fd_QueryCleanPacketCommitmentRequest_dest_chain protoreflect.FieldDescriptor + fd_QueryCleanPacketCommitmentRequest_source_chain protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_query_proto_init() + md_QueryCleanPacketCommitmentRequest = File_tibc_core_packet_v1_query_proto.Messages().ByName("QueryCleanPacketCommitmentRequest") + fd_QueryCleanPacketCommitmentRequest_dest_chain = md_QueryCleanPacketCommitmentRequest.Fields().ByName("dest_chain") + fd_QueryCleanPacketCommitmentRequest_source_chain = md_QueryCleanPacketCommitmentRequest.Fields().ByName("source_chain") +} + +var _ protoreflect.Message = (*fastReflection_QueryCleanPacketCommitmentRequest)(nil) + +type fastReflection_QueryCleanPacketCommitmentRequest QueryCleanPacketCommitmentRequest + +func (x *QueryCleanPacketCommitmentRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryCleanPacketCommitmentRequest)(x) +} + +func (x *QueryCleanPacketCommitmentRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryCleanPacketCommitmentRequest_messageType fastReflection_QueryCleanPacketCommitmentRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryCleanPacketCommitmentRequest_messageType{} + +type fastReflection_QueryCleanPacketCommitmentRequest_messageType struct{} + +func (x fastReflection_QueryCleanPacketCommitmentRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryCleanPacketCommitmentRequest)(nil) +} +func (x fastReflection_QueryCleanPacketCommitmentRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryCleanPacketCommitmentRequest) +} +func (x fastReflection_QueryCleanPacketCommitmentRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCleanPacketCommitmentRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryCleanPacketCommitmentRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCleanPacketCommitmentRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryCleanPacketCommitmentRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryCleanPacketCommitmentRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryCleanPacketCommitmentRequest) New() protoreflect.Message { + return new(fastReflection_QueryCleanPacketCommitmentRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryCleanPacketCommitmentRequest) Interface() protoreflect.ProtoMessage { + return (*QueryCleanPacketCommitmentRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryCleanPacketCommitmentRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DestChain != "" { + value := protoreflect.ValueOfString(x.DestChain) + if !f(fd_QueryCleanPacketCommitmentRequest_dest_chain, value) { + return + } + } + if x.SourceChain != "" { + value := protoreflect.ValueOfString(x.SourceChain) + if !f(fd_QueryCleanPacketCommitmentRequest_source_chain, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryCleanPacketCommitmentRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryCleanPacketCommitmentRequest.dest_chain": + return x.DestChain != "" + case "tibc.core.packet.v1.QueryCleanPacketCommitmentRequest.source_chain": + return x.SourceChain != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryCleanPacketCommitmentRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryCleanPacketCommitmentRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCleanPacketCommitmentRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryCleanPacketCommitmentRequest.dest_chain": + x.DestChain = "" + case "tibc.core.packet.v1.QueryCleanPacketCommitmentRequest.source_chain": + x.SourceChain = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryCleanPacketCommitmentRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryCleanPacketCommitmentRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryCleanPacketCommitmentRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.QueryCleanPacketCommitmentRequest.dest_chain": + value := x.DestChain + return protoreflect.ValueOfString(value) + case "tibc.core.packet.v1.QueryCleanPacketCommitmentRequest.source_chain": + value := x.SourceChain + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryCleanPacketCommitmentRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryCleanPacketCommitmentRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCleanPacketCommitmentRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryCleanPacketCommitmentRequest.dest_chain": + x.DestChain = value.Interface().(string) + case "tibc.core.packet.v1.QueryCleanPacketCommitmentRequest.source_chain": + x.SourceChain = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryCleanPacketCommitmentRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryCleanPacketCommitmentRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCleanPacketCommitmentRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryCleanPacketCommitmentRequest.dest_chain": + panic(fmt.Errorf("field dest_chain of message tibc.core.packet.v1.QueryCleanPacketCommitmentRequest is not mutable")) + case "tibc.core.packet.v1.QueryCleanPacketCommitmentRequest.source_chain": + panic(fmt.Errorf("field source_chain of message tibc.core.packet.v1.QueryCleanPacketCommitmentRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryCleanPacketCommitmentRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryCleanPacketCommitmentRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryCleanPacketCommitmentRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryCleanPacketCommitmentRequest.dest_chain": + return protoreflect.ValueOfString("") + case "tibc.core.packet.v1.QueryCleanPacketCommitmentRequest.source_chain": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryCleanPacketCommitmentRequest")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryCleanPacketCommitmentRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryCleanPacketCommitmentRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.QueryCleanPacketCommitmentRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryCleanPacketCommitmentRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCleanPacketCommitmentRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryCleanPacketCommitmentRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryCleanPacketCommitmentRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryCleanPacketCommitmentRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DestChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.SourceChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryCleanPacketCommitmentRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.SourceChain) > 0 { + i -= len(x.SourceChain) + copy(dAtA[i:], x.SourceChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceChain))) + i-- + dAtA[i] = 0x12 + } + if len(x.DestChain) > 0 { + i -= len(x.DestChain) + copy(dAtA[i:], x.DestChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestChain))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryCleanPacketCommitmentRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCleanPacketCommitmentRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCleanPacketCommitmentRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DestChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SourceChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryCleanPacketCommitmentResponse protoreflect.MessageDescriptor + fd_QueryCleanPacketCommitmentResponse_commitment protoreflect.FieldDescriptor + fd_QueryCleanPacketCommitmentResponse_proof protoreflect.FieldDescriptor + fd_QueryCleanPacketCommitmentResponse_proof_height protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_query_proto_init() + md_QueryCleanPacketCommitmentResponse = File_tibc_core_packet_v1_query_proto.Messages().ByName("QueryCleanPacketCommitmentResponse") + fd_QueryCleanPacketCommitmentResponse_commitment = md_QueryCleanPacketCommitmentResponse.Fields().ByName("commitment") + fd_QueryCleanPacketCommitmentResponse_proof = md_QueryCleanPacketCommitmentResponse.Fields().ByName("proof") + fd_QueryCleanPacketCommitmentResponse_proof_height = md_QueryCleanPacketCommitmentResponse.Fields().ByName("proof_height") +} + +var _ protoreflect.Message = (*fastReflection_QueryCleanPacketCommitmentResponse)(nil) + +type fastReflection_QueryCleanPacketCommitmentResponse QueryCleanPacketCommitmentResponse + +func (x *QueryCleanPacketCommitmentResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryCleanPacketCommitmentResponse)(x) +} + +func (x *QueryCleanPacketCommitmentResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryCleanPacketCommitmentResponse_messageType fastReflection_QueryCleanPacketCommitmentResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryCleanPacketCommitmentResponse_messageType{} + +type fastReflection_QueryCleanPacketCommitmentResponse_messageType struct{} + +func (x fastReflection_QueryCleanPacketCommitmentResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryCleanPacketCommitmentResponse)(nil) +} +func (x fastReflection_QueryCleanPacketCommitmentResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryCleanPacketCommitmentResponse) +} +func (x fastReflection_QueryCleanPacketCommitmentResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCleanPacketCommitmentResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryCleanPacketCommitmentResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCleanPacketCommitmentResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryCleanPacketCommitmentResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryCleanPacketCommitmentResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryCleanPacketCommitmentResponse) New() protoreflect.Message { + return new(fastReflection_QueryCleanPacketCommitmentResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryCleanPacketCommitmentResponse) Interface() protoreflect.ProtoMessage { + return (*QueryCleanPacketCommitmentResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryCleanPacketCommitmentResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Commitment) != 0 { + value := protoreflect.ValueOfBytes(x.Commitment) + if !f(fd_QueryCleanPacketCommitmentResponse_commitment, value) { + return + } + } + if len(x.Proof) != 0 { + value := protoreflect.ValueOfBytes(x.Proof) + if !f(fd_QueryCleanPacketCommitmentResponse_proof, value) { + return + } + } + if x.ProofHeight != nil { + value := protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + if !f(fd_QueryCleanPacketCommitmentResponse_proof_height, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryCleanPacketCommitmentResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.commitment": + return len(x.Commitment) != 0 + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.proof": + return len(x.Proof) != 0 + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.proof_height": + return x.ProofHeight != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryCleanPacketCommitmentResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryCleanPacketCommitmentResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCleanPacketCommitmentResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.commitment": + x.Commitment = nil + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.proof": + x.Proof = nil + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.proof_height": + x.ProofHeight = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryCleanPacketCommitmentResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryCleanPacketCommitmentResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryCleanPacketCommitmentResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.commitment": + value := x.Commitment + return protoreflect.ValueOfBytes(value) + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.proof": + value := x.Proof + return protoreflect.ValueOfBytes(value) + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.proof_height": + value := x.ProofHeight + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryCleanPacketCommitmentResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryCleanPacketCommitmentResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCleanPacketCommitmentResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.commitment": + x.Commitment = value.Bytes() + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.proof": + x.Proof = value.Bytes() + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.proof_height": + x.ProofHeight = value.Message().Interface().(*v1.Height) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryCleanPacketCommitmentResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryCleanPacketCommitmentResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCleanPacketCommitmentResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.proof_height": + if x.ProofHeight == nil { + x.ProofHeight = new(v1.Height) + } + return protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.commitment": + panic(fmt.Errorf("field commitment of message tibc.core.packet.v1.QueryCleanPacketCommitmentResponse is not mutable")) + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.proof": + panic(fmt.Errorf("field proof of message tibc.core.packet.v1.QueryCleanPacketCommitmentResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryCleanPacketCommitmentResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryCleanPacketCommitmentResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryCleanPacketCommitmentResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.commitment": + return protoreflect.ValueOfBytes(nil) + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.proof": + return protoreflect.ValueOfBytes(nil) + case "tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.proof_height": + m := new(v1.Height) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.QueryCleanPacketCommitmentResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.QueryCleanPacketCommitmentResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryCleanPacketCommitmentResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.QueryCleanPacketCommitmentResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryCleanPacketCommitmentResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCleanPacketCommitmentResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryCleanPacketCommitmentResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryCleanPacketCommitmentResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryCleanPacketCommitmentResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Commitment) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Proof) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ProofHeight != nil { + l = options.Size(x.ProofHeight) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryCleanPacketCommitmentResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ProofHeight != nil { + encoded, err := options.Marshal(x.ProofHeight) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.Proof) > 0 { + i -= len(x.Proof) + copy(dAtA[i:], x.Proof) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Proof))) + i-- + dAtA[i] = 0x12 + } + if len(x.Commitment) > 0 { + i -= len(x.Commitment) + copy(dAtA[i:], x.Commitment) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Commitment))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryCleanPacketCommitmentResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCleanPacketCommitmentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCleanPacketCommitmentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Commitment", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Commitment = append(x.Commitment[:0], dAtA[iNdEx:postIndex]...) + if x.Commitment == nil { + x.Commitment = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Proof = append(x.Proof[:0], dAtA[iNdEx:postIndex]...) + if x.Proof == nil { + x.Proof = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ProofHeight == nil { + x.ProofHeight = &v1.Height{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ProofHeight); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: tibc/core/packet/v1/query.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// QueryPacketCommitmentRequest is the request type for the +// QueryPacketCommitment RPC method +type QueryPacketCommitmentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // dest chain name + DestChain string `protobuf:"bytes,1,opt,name=dest_chain,json=destChain,proto3" json:"dest_chain,omitempty"` + // source chain name + SourceChain string `protobuf:"bytes,2,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` + // packet sequence + Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (x *QueryPacketCommitmentRequest) Reset() { + *x = QueryPacketCommitmentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPacketCommitmentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPacketCommitmentRequest) ProtoMessage() {} + +// Deprecated: Use QueryPacketCommitmentRequest.ProtoReflect.Descriptor instead. +func (*QueryPacketCommitmentRequest) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_query_proto_rawDescGZIP(), []int{0} +} + +func (x *QueryPacketCommitmentRequest) GetDestChain() string { + if x != nil { + return x.DestChain + } + return "" +} + +func (x *QueryPacketCommitmentRequest) GetSourceChain() string { + if x != nil { + return x.SourceChain + } + return "" +} + +func (x *QueryPacketCommitmentRequest) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +// QueryPacketCommitmentResponse defines the client query response for a packet +// which also includes a proof and the height from which the proof was +// retrieved +type QueryPacketCommitmentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // packet associated with the request fields + Commitment []byte `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` + // merkle proof of existence + Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` + // height at which the proof was retrieved + ProofHeight *v1.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` +} + +func (x *QueryPacketCommitmentResponse) Reset() { + *x = QueryPacketCommitmentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPacketCommitmentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPacketCommitmentResponse) ProtoMessage() {} + +// Deprecated: Use QueryPacketCommitmentResponse.ProtoReflect.Descriptor instead. +func (*QueryPacketCommitmentResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryPacketCommitmentResponse) GetCommitment() []byte { + if x != nil { + return x.Commitment + } + return nil +} + +func (x *QueryPacketCommitmentResponse) GetProof() []byte { + if x != nil { + return x.Proof + } + return nil +} + +func (x *QueryPacketCommitmentResponse) GetProofHeight() *v1.Height { + if x != nil { + return x.ProofHeight + } + return nil +} + +// QueryPacketCommitmentsRequest is the request type for the +// Query/QueryPacketCommitments RPC method +type QueryPacketCommitmentsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // dest chain name + DestChain string `protobuf:"bytes,1,opt,name=dest_chain,json=destChain,proto3" json:"dest_chain,omitempty"` + // source chain name + SourceChain string `protobuf:"bytes,2,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` + // pagination request + Pagination *v1beta1.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryPacketCommitmentsRequest) Reset() { + *x = QueryPacketCommitmentsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPacketCommitmentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPacketCommitmentsRequest) ProtoMessage() {} + +// Deprecated: Use QueryPacketCommitmentsRequest.ProtoReflect.Descriptor instead. +func (*QueryPacketCommitmentsRequest) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_query_proto_rawDescGZIP(), []int{2} +} + +func (x *QueryPacketCommitmentsRequest) GetDestChain() string { + if x != nil { + return x.DestChain + } + return "" +} + +func (x *QueryPacketCommitmentsRequest) GetSourceChain() string { + if x != nil { + return x.SourceChain + } + return "" +} + +func (x *QueryPacketCommitmentsRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryPacketCommitmentsResponse is the request type for the +// Query/QueryPacketCommitments RPC method +type QueryPacketCommitmentsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Commitments []*PacketState `protobuf:"bytes,1,rep,name=commitments,proto3" json:"commitments,omitempty"` + // pagination response + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + // query block height + Height *v1.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height,omitempty"` +} + +func (x *QueryPacketCommitmentsResponse) Reset() { + *x = QueryPacketCommitmentsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPacketCommitmentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPacketCommitmentsResponse) ProtoMessage() {} + +// Deprecated: Use QueryPacketCommitmentsResponse.ProtoReflect.Descriptor instead. +func (*QueryPacketCommitmentsResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryPacketCommitmentsResponse) GetCommitments() []*PacketState { + if x != nil { + return x.Commitments + } + return nil +} + +func (x *QueryPacketCommitmentsResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +func (x *QueryPacketCommitmentsResponse) GetHeight() *v1.Height { + if x != nil { + return x.Height + } + return nil +} + +// QueryPacketReceiptRequest is the request type for the +// Query/PacketReceipt RPC method +type QueryPacketReceiptRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // dest chain name + DestChain string `protobuf:"bytes,1,opt,name=dest_chain,json=destChain,proto3" json:"dest_chain,omitempty"` + // source chain name + SourceChain string `protobuf:"bytes,2,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` + // packet sequence + Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (x *QueryPacketReceiptRequest) Reset() { + *x = QueryPacketReceiptRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPacketReceiptRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPacketReceiptRequest) ProtoMessage() {} + +// Deprecated: Use QueryPacketReceiptRequest.ProtoReflect.Descriptor instead. +func (*QueryPacketReceiptRequest) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_query_proto_rawDescGZIP(), []int{4} +} + +func (x *QueryPacketReceiptRequest) GetDestChain() string { + if x != nil { + return x.DestChain + } + return "" +} + +func (x *QueryPacketReceiptRequest) GetSourceChain() string { + if x != nil { + return x.SourceChain + } + return "" +} + +func (x *QueryPacketReceiptRequest) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +// QueryPacketReceiptResponse defines the client query response for a packet +// receipt which also includes a proof, and the height from which the proof was +// retrieved +type QueryPacketReceiptResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // success flag for if receipt exists + Received bool `protobuf:"varint,2,opt,name=received,proto3" json:"received,omitempty"` + // merkle proof of existence + Proof []byte `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"` + // height at which the proof was retrieved + ProofHeight *v1.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` +} + +func (x *QueryPacketReceiptResponse) Reset() { + *x = QueryPacketReceiptResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPacketReceiptResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPacketReceiptResponse) ProtoMessage() {} + +// Deprecated: Use QueryPacketReceiptResponse.ProtoReflect.Descriptor instead. +func (*QueryPacketReceiptResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryPacketReceiptResponse) GetReceived() bool { + if x != nil { + return x.Received + } + return false +} + +func (x *QueryPacketReceiptResponse) GetProof() []byte { + if x != nil { + return x.Proof + } + return nil +} + +func (x *QueryPacketReceiptResponse) GetProofHeight() *v1.Height { + if x != nil { + return x.ProofHeight + } + return nil +} + +// QueryPacketAcknowledgementRequest is the request type for the +// Query/PacketAcknowledgement RPC method +type QueryPacketAcknowledgementRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // dest chain name + DestChain string `protobuf:"bytes,1,opt,name=dest_chain,json=destChain,proto3" json:"dest_chain,omitempty"` + // source chain name + SourceChain string `protobuf:"bytes,2,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` + // packet sequence + Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` +} + +func (x *QueryPacketAcknowledgementRequest) Reset() { + *x = QueryPacketAcknowledgementRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPacketAcknowledgementRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPacketAcknowledgementRequest) ProtoMessage() {} + +// Deprecated: Use QueryPacketAcknowledgementRequest.ProtoReflect.Descriptor instead. +func (*QueryPacketAcknowledgementRequest) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_query_proto_rawDescGZIP(), []int{6} +} + +func (x *QueryPacketAcknowledgementRequest) GetDestChain() string { + if x != nil { + return x.DestChain + } + return "" +} + +func (x *QueryPacketAcknowledgementRequest) GetSourceChain() string { + if x != nil { + return x.SourceChain + } + return "" +} + +func (x *QueryPacketAcknowledgementRequest) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +// QueryPacketAcknowledgementResponse defines the client query response for a +// packet which also includes a proof and the height from which the +// proof was retrieved +type QueryPacketAcknowledgementResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // packet associated with the request fields + Acknowledgement []byte `protobuf:"bytes,1,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` + // merkle proof of existence + Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` + // height at which the proof was retrieved + ProofHeight *v1.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` +} + +func (x *QueryPacketAcknowledgementResponse) Reset() { + *x = QueryPacketAcknowledgementResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPacketAcknowledgementResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPacketAcknowledgementResponse) ProtoMessage() {} + +// Deprecated: Use QueryPacketAcknowledgementResponse.ProtoReflect.Descriptor instead. +func (*QueryPacketAcknowledgementResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_query_proto_rawDescGZIP(), []int{7} +} + +func (x *QueryPacketAcknowledgementResponse) GetAcknowledgement() []byte { + if x != nil { + return x.Acknowledgement + } + return nil +} + +func (x *QueryPacketAcknowledgementResponse) GetProof() []byte { + if x != nil { + return x.Proof + } + return nil +} + +func (x *QueryPacketAcknowledgementResponse) GetProofHeight() *v1.Height { + if x != nil { + return x.ProofHeight + } + return nil +} + +// QueryPacketAcknowledgementsRequest is the request type for the +// Query/QueryPacketCommitments RPC method +type QueryPacketAcknowledgementsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // dest chain name + DestChain string `protobuf:"bytes,1,opt,name=dest_chain,json=destChain,proto3" json:"dest_chain,omitempty"` + // source chain name + SourceChain string `protobuf:"bytes,2,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` + // pagination request + Pagination *v1beta1.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryPacketAcknowledgementsRequest) Reset() { + *x = QueryPacketAcknowledgementsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPacketAcknowledgementsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPacketAcknowledgementsRequest) ProtoMessage() {} + +// Deprecated: Use QueryPacketAcknowledgementsRequest.ProtoReflect.Descriptor instead. +func (*QueryPacketAcknowledgementsRequest) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_query_proto_rawDescGZIP(), []int{8} +} + +func (x *QueryPacketAcknowledgementsRequest) GetDestChain() string { + if x != nil { + return x.DestChain + } + return "" +} + +func (x *QueryPacketAcknowledgementsRequest) GetSourceChain() string { + if x != nil { + return x.SourceChain + } + return "" +} + +func (x *QueryPacketAcknowledgementsRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryPacketAcknowledgemetsResponse is the request type for the +// Query/QueryPacketAcknowledgements RPC method +type QueryPacketAcknowledgementsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Acknowledgements []*PacketState `protobuf:"bytes,1,rep,name=acknowledgements,proto3" json:"acknowledgements,omitempty"` + // pagination response + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + // query block height + Height *v1.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height,omitempty"` +} + +func (x *QueryPacketAcknowledgementsResponse) Reset() { + *x = QueryPacketAcknowledgementsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryPacketAcknowledgementsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryPacketAcknowledgementsResponse) ProtoMessage() {} + +// Deprecated: Use QueryPacketAcknowledgementsResponse.ProtoReflect.Descriptor instead. +func (*QueryPacketAcknowledgementsResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_query_proto_rawDescGZIP(), []int{9} +} + +func (x *QueryPacketAcknowledgementsResponse) GetAcknowledgements() []*PacketState { + if x != nil { + return x.Acknowledgements + } + return nil +} + +func (x *QueryPacketAcknowledgementsResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +func (x *QueryPacketAcknowledgementsResponse) GetHeight() *v1.Height { + if x != nil { + return x.Height + } + return nil +} + +// QueryUnreceivedPacketsRequest is the request type for the +// Query/UnreceivedPackets RPC method +type QueryUnreceivedPacketsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // dest chain name + DestChain string `protobuf:"bytes,1,opt,name=dest_chain,json=destChain,proto3" json:"dest_chain,omitempty"` + // source chain name + SourceChain string `protobuf:"bytes,2,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` + // list of packet sequences + PacketCommitmentSequences []uint64 `protobuf:"varint,3,rep,packed,name=packet_commitment_sequences,json=packetCommitmentSequences,proto3" json:"packet_commitment_sequences,omitempty"` +} + +func (x *QueryUnreceivedPacketsRequest) Reset() { + *x = QueryUnreceivedPacketsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryUnreceivedPacketsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryUnreceivedPacketsRequest) ProtoMessage() {} + +// Deprecated: Use QueryUnreceivedPacketsRequest.ProtoReflect.Descriptor instead. +func (*QueryUnreceivedPacketsRequest) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_query_proto_rawDescGZIP(), []int{10} +} + +func (x *QueryUnreceivedPacketsRequest) GetDestChain() string { + if x != nil { + return x.DestChain + } + return "" +} + +func (x *QueryUnreceivedPacketsRequest) GetSourceChain() string { + if x != nil { + return x.SourceChain + } + return "" +} + +func (x *QueryUnreceivedPacketsRequest) GetPacketCommitmentSequences() []uint64 { + if x != nil { + return x.PacketCommitmentSequences + } + return nil +} + +// QueryUnreceivedPacketsResponse is the response type for the +// Query/UnreceivedPacketCommitments RPC method +type QueryUnreceivedPacketsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // list of unreceived packet sequences + Sequences []uint64 `protobuf:"varint,1,rep,packed,name=sequences,proto3" json:"sequences,omitempty"` + // query block height + Height *v1.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height,omitempty"` +} + +func (x *QueryUnreceivedPacketsResponse) Reset() { + *x = QueryUnreceivedPacketsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryUnreceivedPacketsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryUnreceivedPacketsResponse) ProtoMessage() {} + +// Deprecated: Use QueryUnreceivedPacketsResponse.ProtoReflect.Descriptor instead. +func (*QueryUnreceivedPacketsResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_query_proto_rawDescGZIP(), []int{11} +} + +func (x *QueryUnreceivedPacketsResponse) GetSequences() []uint64 { + if x != nil { + return x.Sequences + } + return nil +} + +func (x *QueryUnreceivedPacketsResponse) GetHeight() *v1.Height { + if x != nil { + return x.Height + } + return nil +} + +// QueryUnreceivedAcks is the request type for the +// Query/UnreceivedAcks RPC method +type QueryUnreceivedAcksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // dest chain name + DestChain string `protobuf:"bytes,1,opt,name=dest_chain,json=destChain,proto3" json:"dest_chain,omitempty"` + // source chain name + SourceChain string `protobuf:"bytes,2,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` + // list of acknowledgement sequences + PacketAckSequences []uint64 `protobuf:"varint,3,rep,packed,name=packet_ack_sequences,json=packetAckSequences,proto3" json:"packet_ack_sequences,omitempty"` +} + +func (x *QueryUnreceivedAcksRequest) Reset() { + *x = QueryUnreceivedAcksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryUnreceivedAcksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryUnreceivedAcksRequest) ProtoMessage() {} + +// Deprecated: Use QueryUnreceivedAcksRequest.ProtoReflect.Descriptor instead. +func (*QueryUnreceivedAcksRequest) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_query_proto_rawDescGZIP(), []int{12} +} + +func (x *QueryUnreceivedAcksRequest) GetDestChain() string { + if x != nil { + return x.DestChain + } + return "" +} + +func (x *QueryUnreceivedAcksRequest) GetSourceChain() string { + if x != nil { + return x.SourceChain + } + return "" +} + +func (x *QueryUnreceivedAcksRequest) GetPacketAckSequences() []uint64 { + if x != nil { + return x.PacketAckSequences + } + return nil +} + +// QueryUnreceivedAcksResponse is the response type for the +// Query/UnreceivedAcks RPC method +type QueryUnreceivedAcksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // list of unreceived acknowledgement sequences + Sequences []uint64 `protobuf:"varint,1,rep,packed,name=sequences,proto3" json:"sequences,omitempty"` + // query block height + Height *v1.Height `protobuf:"bytes,2,opt,name=height,proto3" json:"height,omitempty"` +} + +func (x *QueryUnreceivedAcksResponse) Reset() { + *x = QueryUnreceivedAcksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryUnreceivedAcksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryUnreceivedAcksResponse) ProtoMessage() {} + +// Deprecated: Use QueryUnreceivedAcksResponse.ProtoReflect.Descriptor instead. +func (*QueryUnreceivedAcksResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_query_proto_rawDescGZIP(), []int{13} +} + +func (x *QueryUnreceivedAcksResponse) GetSequences() []uint64 { + if x != nil { + return x.Sequences + } + return nil +} + +func (x *QueryUnreceivedAcksResponse) GetHeight() *v1.Height { + if x != nil { + return x.Height + } + return nil +} + +// QueryCleanPacketCommitmentRequest is the request type for the +// QueryCleanPacketCommitment RPC method +type QueryCleanPacketCommitmentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // dest chain name + DestChain string `protobuf:"bytes,1,opt,name=dest_chain,json=destChain,proto3" json:"dest_chain,omitempty"` + // source chain name + SourceChain string `protobuf:"bytes,2,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` +} + +func (x *QueryCleanPacketCommitmentRequest) Reset() { + *x = QueryCleanPacketCommitmentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryCleanPacketCommitmentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryCleanPacketCommitmentRequest) ProtoMessage() {} + +// Deprecated: Use QueryCleanPacketCommitmentRequest.ProtoReflect.Descriptor instead. +func (*QueryCleanPacketCommitmentRequest) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_query_proto_rawDescGZIP(), []int{14} +} + +func (x *QueryCleanPacketCommitmentRequest) GetDestChain() string { + if x != nil { + return x.DestChain + } + return "" +} + +func (x *QueryCleanPacketCommitmentRequest) GetSourceChain() string { + if x != nil { + return x.SourceChain + } + return "" +} + +// QueryCleanPacketCommitmentResponse defines the client query response for a +// packet which also includes a proof and the height from which the proof was +// retrieved +type QueryCleanPacketCommitmentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // packet associated with the request fields + Commitment []byte `protobuf:"bytes,1,opt,name=commitment,proto3" json:"commitment,omitempty"` + // merkle proof of existence + Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` + // height at which the proof was retrieved + ProofHeight *v1.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` +} + +func (x *QueryCleanPacketCommitmentResponse) Reset() { + *x = QueryCleanPacketCommitmentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_query_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryCleanPacketCommitmentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryCleanPacketCommitmentResponse) ProtoMessage() {} + +// Deprecated: Use QueryCleanPacketCommitmentResponse.ProtoReflect.Descriptor instead. +func (*QueryCleanPacketCommitmentResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_query_proto_rawDescGZIP(), []int{15} +} + +func (x *QueryCleanPacketCommitmentResponse) GetCommitment() []byte { + if x != nil { + return x.Commitment + } + return nil +} + +func (x *QueryCleanPacketCommitmentResponse) GetProof() []byte { + if x != nil { + return x.Proof + } + return nil +} + +func (x *QueryCleanPacketCommitmentResponse) GetProofHeight() *v1.Height { + if x != nil { + return x.ProofHeight + } + return nil +} + +var File_tibc_core_packet_v1_query_proto protoreflect.FileDescriptor + +var file_tibc_core_packet_v1_query_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x13, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7c, 0x0a, 0x1c, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, + 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x64, 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, + 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, + 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, + 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, + 0x12, 0x44, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6f, 0x66, + 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xa9, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x74, + 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, + 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0xe8, 0x01, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x69, 0x62, + 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x79, 0x0a, + 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, + 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, + 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x64, 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, + 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, + 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x44, 0x0a, 0x0c, 0x70, 0x72, 0x6f, + 0x6f, 0x66, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, + 0x81, 0x01, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x41, + 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x73, 0x74, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x61, 0x63, + 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x44, 0x0a, 0x0c, 0x70, 0x72, + 0x6f, 0x6f, 0x66, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x04, 0xc8, + 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x22, 0xae, 0x01, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x74, 0x5f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x73, + 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0xf7, 0x01, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x10, 0x61, 0x63, 0x6b, + 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x10, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x39, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x04, 0xc8, + 0xde, 0x1f, 0x00, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xa1, 0x01, 0x0a, 0x1d, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x50, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x64, 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, + 0x3e, 0x0a, 0x1b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x04, 0x52, 0x19, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, + 0x79, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x04, 0x52, 0x09, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, + 0x39, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x1a, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x41, 0x63, + 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x73, + 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, + 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x12, 0x70, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x41, 0x63, 0x6b, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x76, 0x0a, + 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x41, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, + 0x09, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x69, 0x62, + 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x65, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, + 0x65, 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, + 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x64, 0x65, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x22, 0xa0, 0x01, 0x0a, + 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x44, 0x0a, 0x0c, 0x70, 0x72, 0x6f, + 0x6f, 0x66, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x04, 0xc8, 0xde, + 0x1f, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x32, + 0xee, 0x0f, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0xf0, 0x01, 0x0a, 0x10, 0x50, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x31, + 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x32, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x75, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x6f, 0x12, 0x6d, 0x2f, + 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x7b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x7d, 0x12, 0xe8, 0x01, 0x0a, + 0x11, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x32, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6a, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x64, 0x12, 0x62, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x7b, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x64, 0x65, 0x73, 0x74, + 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0xe4, 0x01, 0x0a, 0x0d, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x2e, 0x2e, 0x74, 0x69, 0x62, 0x63, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x74, 0x69, 0x62, 0x63, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x72, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x6c, 0x12, 0x6a, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x7b, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x64, 0x65, 0x73, 0x74, 0x5f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x70, 0x74, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x7d, 0x12, 0xf8, + 0x01, 0x0a, 0x15, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, + 0x65, 0x64, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, + 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x37, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x68, 0x12, 0x66, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x7b, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x6b, 0x73, 0x2f, 0x7b, + 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x7d, 0x12, 0xfc, 0x01, 0x0a, 0x16, 0x50, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x37, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, + 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x41, + 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x69, 0x12, + 0x67, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x7b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x7d, + 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, + 0x64, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x9c, 0x02, 0x0a, 0x11, 0x55, 0x6e, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x32, + 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x72, 0x65, 0x63, 0x65, + 0x69, 0x76, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9d, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x96, + 0x01, 0x12, 0x93, 0x01, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x7b, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x64, 0x65, 0x73, 0x74, 0x5f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, + 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x65, 0x73, 0x7d, 0x2f, 0x75, 0x6e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x89, 0x02, 0x0a, 0x0e, 0x55, 0x6e, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x41, 0x63, 0x6b, 0x73, 0x12, 0x2f, 0x2e, 0x74, 0x69, 0x62, + 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x41, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x74, 0x69, + 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x41, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x93, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x8c, 0x01, 0x12, 0x89, 0x01, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x73, 0x2f, 0x7b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x7d, + 0x2f, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x65, + 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, + 0x65, 0x73, 0x7d, 0x2f, 0x75, 0x6e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x61, + 0x63, 0x6b, 0x73, 0x12, 0xfa, 0x01, 0x0a, 0x15, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x2e, + 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x70, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x6a, 0x12, 0x68, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, + 0x7b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x64, + 0x65, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x2f, 0x7b, 0x64, 0x65, 0x73, 0x74, + 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x5f, 0x70, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x42, 0xd3, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x69, 0x61, 0x6e, 0x6a, 0x69, 0x65, 0x61, 0x69, + 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x69, 0x62, + 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x76, 0x31, + 0x3b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x43, 0x50, 0xaa, + 0x02, 0x13, 0x54, 0x69, 0x62, 0x63, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, + 0x65, 0x5c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x54, 0x69, + 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, + 0x54, 0x69, 0x62, 0x63, 0x3a, 0x3a, 0x43, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tibc_core_packet_v1_query_proto_rawDescOnce sync.Once + file_tibc_core_packet_v1_query_proto_rawDescData = file_tibc_core_packet_v1_query_proto_rawDesc +) + +func file_tibc_core_packet_v1_query_proto_rawDescGZIP() []byte { + file_tibc_core_packet_v1_query_proto_rawDescOnce.Do(func() { + file_tibc_core_packet_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_tibc_core_packet_v1_query_proto_rawDescData) + }) + return file_tibc_core_packet_v1_query_proto_rawDescData +} + +var file_tibc_core_packet_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_tibc_core_packet_v1_query_proto_goTypes = []interface{}{ + (*QueryPacketCommitmentRequest)(nil), // 0: tibc.core.packet.v1.QueryPacketCommitmentRequest + (*QueryPacketCommitmentResponse)(nil), // 1: tibc.core.packet.v1.QueryPacketCommitmentResponse + (*QueryPacketCommitmentsRequest)(nil), // 2: tibc.core.packet.v1.QueryPacketCommitmentsRequest + (*QueryPacketCommitmentsResponse)(nil), // 3: tibc.core.packet.v1.QueryPacketCommitmentsResponse + (*QueryPacketReceiptRequest)(nil), // 4: tibc.core.packet.v1.QueryPacketReceiptRequest + (*QueryPacketReceiptResponse)(nil), // 5: tibc.core.packet.v1.QueryPacketReceiptResponse + (*QueryPacketAcknowledgementRequest)(nil), // 6: tibc.core.packet.v1.QueryPacketAcknowledgementRequest + (*QueryPacketAcknowledgementResponse)(nil), // 7: tibc.core.packet.v1.QueryPacketAcknowledgementResponse + (*QueryPacketAcknowledgementsRequest)(nil), // 8: tibc.core.packet.v1.QueryPacketAcknowledgementsRequest + (*QueryPacketAcknowledgementsResponse)(nil), // 9: tibc.core.packet.v1.QueryPacketAcknowledgementsResponse + (*QueryUnreceivedPacketsRequest)(nil), // 10: tibc.core.packet.v1.QueryUnreceivedPacketsRequest + (*QueryUnreceivedPacketsResponse)(nil), // 11: tibc.core.packet.v1.QueryUnreceivedPacketsResponse + (*QueryUnreceivedAcksRequest)(nil), // 12: tibc.core.packet.v1.QueryUnreceivedAcksRequest + (*QueryUnreceivedAcksResponse)(nil), // 13: tibc.core.packet.v1.QueryUnreceivedAcksResponse + (*QueryCleanPacketCommitmentRequest)(nil), // 14: tibc.core.packet.v1.QueryCleanPacketCommitmentRequest + (*QueryCleanPacketCommitmentResponse)(nil), // 15: tibc.core.packet.v1.QueryCleanPacketCommitmentResponse + (*v1.Height)(nil), // 16: tibc.core.client.v1.Height + (*v1beta1.PageRequest)(nil), // 17: cosmos.base.query.v1beta1.PageRequest + (*PacketState)(nil), // 18: tibc.core.packet.v1.PacketState + (*v1beta1.PageResponse)(nil), // 19: cosmos.base.query.v1beta1.PageResponse +} +var file_tibc_core_packet_v1_query_proto_depIdxs = []int32{ + 16, // 0: tibc.core.packet.v1.QueryPacketCommitmentResponse.proof_height:type_name -> tibc.core.client.v1.Height + 17, // 1: tibc.core.packet.v1.QueryPacketCommitmentsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 18, // 2: tibc.core.packet.v1.QueryPacketCommitmentsResponse.commitments:type_name -> tibc.core.packet.v1.PacketState + 19, // 3: tibc.core.packet.v1.QueryPacketCommitmentsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 16, // 4: tibc.core.packet.v1.QueryPacketCommitmentsResponse.height:type_name -> tibc.core.client.v1.Height + 16, // 5: tibc.core.packet.v1.QueryPacketReceiptResponse.proof_height:type_name -> tibc.core.client.v1.Height + 16, // 6: tibc.core.packet.v1.QueryPacketAcknowledgementResponse.proof_height:type_name -> tibc.core.client.v1.Height + 17, // 7: tibc.core.packet.v1.QueryPacketAcknowledgementsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 18, // 8: tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.acknowledgements:type_name -> tibc.core.packet.v1.PacketState + 19, // 9: tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 16, // 10: tibc.core.packet.v1.QueryPacketAcknowledgementsResponse.height:type_name -> tibc.core.client.v1.Height + 16, // 11: tibc.core.packet.v1.QueryUnreceivedPacketsResponse.height:type_name -> tibc.core.client.v1.Height + 16, // 12: tibc.core.packet.v1.QueryUnreceivedAcksResponse.height:type_name -> tibc.core.client.v1.Height + 16, // 13: tibc.core.packet.v1.QueryCleanPacketCommitmentResponse.proof_height:type_name -> tibc.core.client.v1.Height + 0, // 14: tibc.core.packet.v1.Query.PacketCommitment:input_type -> tibc.core.packet.v1.QueryPacketCommitmentRequest + 2, // 15: tibc.core.packet.v1.Query.PacketCommitments:input_type -> tibc.core.packet.v1.QueryPacketCommitmentsRequest + 4, // 16: tibc.core.packet.v1.Query.PacketReceipt:input_type -> tibc.core.packet.v1.QueryPacketReceiptRequest + 6, // 17: tibc.core.packet.v1.Query.PacketAcknowledgement:input_type -> tibc.core.packet.v1.QueryPacketAcknowledgementRequest + 8, // 18: tibc.core.packet.v1.Query.PacketAcknowledgements:input_type -> tibc.core.packet.v1.QueryPacketAcknowledgementsRequest + 10, // 19: tibc.core.packet.v1.Query.UnreceivedPackets:input_type -> tibc.core.packet.v1.QueryUnreceivedPacketsRequest + 12, // 20: tibc.core.packet.v1.Query.UnreceivedAcks:input_type -> tibc.core.packet.v1.QueryUnreceivedAcksRequest + 14, // 21: tibc.core.packet.v1.Query.CleanPacketCommitment:input_type -> tibc.core.packet.v1.QueryCleanPacketCommitmentRequest + 1, // 22: tibc.core.packet.v1.Query.PacketCommitment:output_type -> tibc.core.packet.v1.QueryPacketCommitmentResponse + 3, // 23: tibc.core.packet.v1.Query.PacketCommitments:output_type -> tibc.core.packet.v1.QueryPacketCommitmentsResponse + 5, // 24: tibc.core.packet.v1.Query.PacketReceipt:output_type -> tibc.core.packet.v1.QueryPacketReceiptResponse + 7, // 25: tibc.core.packet.v1.Query.PacketAcknowledgement:output_type -> tibc.core.packet.v1.QueryPacketAcknowledgementResponse + 9, // 26: tibc.core.packet.v1.Query.PacketAcknowledgements:output_type -> tibc.core.packet.v1.QueryPacketAcknowledgementsResponse + 11, // 27: tibc.core.packet.v1.Query.UnreceivedPackets:output_type -> tibc.core.packet.v1.QueryUnreceivedPacketsResponse + 13, // 28: tibc.core.packet.v1.Query.UnreceivedAcks:output_type -> tibc.core.packet.v1.QueryUnreceivedAcksResponse + 15, // 29: tibc.core.packet.v1.Query.CleanPacketCommitment:output_type -> tibc.core.packet.v1.QueryCleanPacketCommitmentResponse + 22, // [22:30] is the sub-list for method output_type + 14, // [14:22] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_tibc_core_packet_v1_query_proto_init() } +func file_tibc_core_packet_v1_query_proto_init() { + if File_tibc_core_packet_v1_query_proto != nil { + return + } + file_tibc_core_packet_v1_packet_proto_init() + if !protoimpl.UnsafeEnabled { + file_tibc_core_packet_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketCommitmentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketCommitmentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketCommitmentsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketCommitmentsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketReceiptRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketReceiptResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketAcknowledgementRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketAcknowledgementResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketAcknowledgementsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryPacketAcknowledgementsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryUnreceivedPacketsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryUnreceivedPacketsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryUnreceivedAcksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryUnreceivedAcksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryCleanPacketCommitmentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryCleanPacketCommitmentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_tibc_core_packet_v1_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 16, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_tibc_core_packet_v1_query_proto_goTypes, + DependencyIndexes: file_tibc_core_packet_v1_query_proto_depIdxs, + MessageInfos: file_tibc_core_packet_v1_query_proto_msgTypes, + }.Build() + File_tibc_core_packet_v1_query_proto = out.File + file_tibc_core_packet_v1_query_proto_rawDesc = nil + file_tibc_core_packet_v1_query_proto_goTypes = nil + file_tibc_core_packet_v1_query_proto_depIdxs = nil +} diff --git a/api/tibc/core/packet/v1/query_grpc.pb.go b/api/tibc/core/packet/v1/query_grpc.pb.go new file mode 100644 index 00000000..c5c7ceef --- /dev/null +++ b/api/tibc/core/packet/v1/query_grpc.pb.go @@ -0,0 +1,413 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: tibc/core/packet/v1/query.proto + +package packetv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Query_PacketCommitment_FullMethodName = "/tibc.core.packet.v1.Query/PacketCommitment" + Query_PacketCommitments_FullMethodName = "/tibc.core.packet.v1.Query/PacketCommitments" + Query_PacketReceipt_FullMethodName = "/tibc.core.packet.v1.Query/PacketReceipt" + Query_PacketAcknowledgement_FullMethodName = "/tibc.core.packet.v1.Query/PacketAcknowledgement" + Query_PacketAcknowledgements_FullMethodName = "/tibc.core.packet.v1.Query/PacketAcknowledgements" + Query_UnreceivedPackets_FullMethodName = "/tibc.core.packet.v1.Query/UnreceivedPackets" + Query_UnreceivedAcks_FullMethodName = "/tibc.core.packet.v1.Query/UnreceivedAcks" + Query_CleanPacketCommitment_FullMethodName = "/tibc.core.packet.v1.Query/CleanPacketCommitment" +) + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Query provides defines the gRPC querier service +type QueryClient interface { + // PacketCommitment queries a stored packet commitment hash. + PacketCommitment(ctx context.Context, in *QueryPacketCommitmentRequest, opts ...grpc.CallOption) (*QueryPacketCommitmentResponse, error) + // PacketCommitments returns all the packet commitments hashes associated + PacketCommitments(ctx context.Context, in *QueryPacketCommitmentsRequest, opts ...grpc.CallOption) (*QueryPacketCommitmentsResponse, error) + // PacketReceipt queries if a given packet sequence has been received on the + // queried chain + PacketReceipt(ctx context.Context, in *QueryPacketReceiptRequest, opts ...grpc.CallOption) (*QueryPacketReceiptResponse, error) + // PacketAcknowledgement queries a stored packet acknowledgement hash. + PacketAcknowledgement(ctx context.Context, in *QueryPacketAcknowledgementRequest, opts ...grpc.CallOption) (*QueryPacketAcknowledgementResponse, error) + // PacketAcknowledgements returns all the packet acknowledgements associated + PacketAcknowledgements(ctx context.Context, in *QueryPacketAcknowledgementsRequest, opts ...grpc.CallOption) (*QueryPacketAcknowledgementsResponse, error) + // UnreceivedPackets returns all the unreceived TIBC packets associated with + // sequences. + UnreceivedPackets(ctx context.Context, in *QueryUnreceivedPacketsRequest, opts ...grpc.CallOption) (*QueryUnreceivedPacketsResponse, error) + // UnreceivedAcks returns all the unreceived TIBC acknowledgements associated + // with sequences. + UnreceivedAcks(ctx context.Context, in *QueryUnreceivedAcksRequest, opts ...grpc.CallOption) (*QueryUnreceivedAcksResponse, error) + // CleanPacketCommitment queries a stored packet commitment hash. + CleanPacketCommitment(ctx context.Context, in *QueryCleanPacketCommitmentRequest, opts ...grpc.CallOption) (*QueryCleanPacketCommitmentResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) PacketCommitment(ctx context.Context, in *QueryPacketCommitmentRequest, opts ...grpc.CallOption) (*QueryPacketCommitmentResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryPacketCommitmentResponse) + err := c.cc.Invoke(ctx, Query_PacketCommitment_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) PacketCommitments(ctx context.Context, in *QueryPacketCommitmentsRequest, opts ...grpc.CallOption) (*QueryPacketCommitmentsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryPacketCommitmentsResponse) + err := c.cc.Invoke(ctx, Query_PacketCommitments_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) PacketReceipt(ctx context.Context, in *QueryPacketReceiptRequest, opts ...grpc.CallOption) (*QueryPacketReceiptResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryPacketReceiptResponse) + err := c.cc.Invoke(ctx, Query_PacketReceipt_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) PacketAcknowledgement(ctx context.Context, in *QueryPacketAcknowledgementRequest, opts ...grpc.CallOption) (*QueryPacketAcknowledgementResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryPacketAcknowledgementResponse) + err := c.cc.Invoke(ctx, Query_PacketAcknowledgement_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) PacketAcknowledgements(ctx context.Context, in *QueryPacketAcknowledgementsRequest, opts ...grpc.CallOption) (*QueryPacketAcknowledgementsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryPacketAcknowledgementsResponse) + err := c.cc.Invoke(ctx, Query_PacketAcknowledgements_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) UnreceivedPackets(ctx context.Context, in *QueryUnreceivedPacketsRequest, opts ...grpc.CallOption) (*QueryUnreceivedPacketsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryUnreceivedPacketsResponse) + err := c.cc.Invoke(ctx, Query_UnreceivedPackets_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) UnreceivedAcks(ctx context.Context, in *QueryUnreceivedAcksRequest, opts ...grpc.CallOption) (*QueryUnreceivedAcksResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryUnreceivedAcksResponse) + err := c.cc.Invoke(ctx, Query_UnreceivedAcks_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CleanPacketCommitment(ctx context.Context, in *QueryCleanPacketCommitmentRequest, opts ...grpc.CallOption) (*QueryCleanPacketCommitmentResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryCleanPacketCommitmentResponse) + err := c.cc.Invoke(ctx, Query_CleanPacketCommitment_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility. +// +// Query provides defines the gRPC querier service +type QueryServer interface { + // PacketCommitment queries a stored packet commitment hash. + PacketCommitment(context.Context, *QueryPacketCommitmentRequest) (*QueryPacketCommitmentResponse, error) + // PacketCommitments returns all the packet commitments hashes associated + PacketCommitments(context.Context, *QueryPacketCommitmentsRequest) (*QueryPacketCommitmentsResponse, error) + // PacketReceipt queries if a given packet sequence has been received on the + // queried chain + PacketReceipt(context.Context, *QueryPacketReceiptRequest) (*QueryPacketReceiptResponse, error) + // PacketAcknowledgement queries a stored packet acknowledgement hash. + PacketAcknowledgement(context.Context, *QueryPacketAcknowledgementRequest) (*QueryPacketAcknowledgementResponse, error) + // PacketAcknowledgements returns all the packet acknowledgements associated + PacketAcknowledgements(context.Context, *QueryPacketAcknowledgementsRequest) (*QueryPacketAcknowledgementsResponse, error) + // UnreceivedPackets returns all the unreceived TIBC packets associated with + // sequences. + UnreceivedPackets(context.Context, *QueryUnreceivedPacketsRequest) (*QueryUnreceivedPacketsResponse, error) + // UnreceivedAcks returns all the unreceived TIBC acknowledgements associated + // with sequences. + UnreceivedAcks(context.Context, *QueryUnreceivedAcksRequest) (*QueryUnreceivedAcksResponse, error) + // CleanPacketCommitment queries a stored packet commitment hash. + CleanPacketCommitment(context.Context, *QueryCleanPacketCommitmentRequest) (*QueryCleanPacketCommitmentResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedQueryServer struct{} + +func (UnimplementedQueryServer) PacketCommitment(context.Context, *QueryPacketCommitmentRequest) (*QueryPacketCommitmentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PacketCommitment not implemented") +} +func (UnimplementedQueryServer) PacketCommitments(context.Context, *QueryPacketCommitmentsRequest) (*QueryPacketCommitmentsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PacketCommitments not implemented") +} +func (UnimplementedQueryServer) PacketReceipt(context.Context, *QueryPacketReceiptRequest) (*QueryPacketReceiptResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PacketReceipt not implemented") +} +func (UnimplementedQueryServer) PacketAcknowledgement(context.Context, *QueryPacketAcknowledgementRequest) (*QueryPacketAcknowledgementResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PacketAcknowledgement not implemented") +} +func (UnimplementedQueryServer) PacketAcknowledgements(context.Context, *QueryPacketAcknowledgementsRequest) (*QueryPacketAcknowledgementsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PacketAcknowledgements not implemented") +} +func (UnimplementedQueryServer) UnreceivedPackets(context.Context, *QueryUnreceivedPacketsRequest) (*QueryUnreceivedPacketsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnreceivedPackets not implemented") +} +func (UnimplementedQueryServer) UnreceivedAcks(context.Context, *QueryUnreceivedAcksRequest) (*QueryUnreceivedAcksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnreceivedAcks not implemented") +} +func (UnimplementedQueryServer) CleanPacketCommitment(context.Context, *QueryCleanPacketCommitmentRequest) (*QueryCleanPacketCommitmentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CleanPacketCommitment not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} +func (UnimplementedQueryServer) testEmbeddedByValue() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + // If the following call pancis, it indicates UnimplementedQueryServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_PacketCommitment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPacketCommitmentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PacketCommitment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_PacketCommitment_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PacketCommitment(ctx, req.(*QueryPacketCommitmentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_PacketCommitments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPacketCommitmentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PacketCommitments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_PacketCommitments_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PacketCommitments(ctx, req.(*QueryPacketCommitmentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_PacketReceipt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPacketReceiptRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PacketReceipt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_PacketReceipt_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PacketReceipt(ctx, req.(*QueryPacketReceiptRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_PacketAcknowledgement_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPacketAcknowledgementRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PacketAcknowledgement(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_PacketAcknowledgement_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PacketAcknowledgement(ctx, req.(*QueryPacketAcknowledgementRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_PacketAcknowledgements_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPacketAcknowledgementsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PacketAcknowledgements(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_PacketAcknowledgements_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PacketAcknowledgements(ctx, req.(*QueryPacketAcknowledgementsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_UnreceivedPackets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryUnreceivedPacketsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).UnreceivedPackets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_UnreceivedPackets_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UnreceivedPackets(ctx, req.(*QueryUnreceivedPacketsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_UnreceivedAcks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryUnreceivedAcksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).UnreceivedAcks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_UnreceivedAcks_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UnreceivedAcks(ctx, req.(*QueryUnreceivedAcksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CleanPacketCommitment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCleanPacketCommitmentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CleanPacketCommitment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_CleanPacketCommitment_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CleanPacketCommitment(ctx, req.(*QueryCleanPacketCommitmentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "tibc.core.packet.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "PacketCommitment", + Handler: _Query_PacketCommitment_Handler, + }, + { + MethodName: "PacketCommitments", + Handler: _Query_PacketCommitments_Handler, + }, + { + MethodName: "PacketReceipt", + Handler: _Query_PacketReceipt_Handler, + }, + { + MethodName: "PacketAcknowledgement", + Handler: _Query_PacketAcknowledgement_Handler, + }, + { + MethodName: "PacketAcknowledgements", + Handler: _Query_PacketAcknowledgements_Handler, + }, + { + MethodName: "UnreceivedPackets", + Handler: _Query_UnreceivedPackets_Handler, + }, + { + MethodName: "UnreceivedAcks", + Handler: _Query_UnreceivedAcks_Handler, + }, + { + MethodName: "CleanPacketCommitment", + Handler: _Query_CleanPacketCommitment_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "tibc/core/packet/v1/query.proto", +} diff --git a/api/tibc/core/packet/v1/tx.pulsar.go b/api/tibc/core/packet/v1/tx.pulsar.go new file mode 100644 index 00000000..9eeb16bb --- /dev/null +++ b/api/tibc/core/packet/v1/tx.pulsar.go @@ -0,0 +1,4592 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package packetv1 + +import ( + _ "cosmossdk.io/api/cosmos/msg/v1" + fmt "fmt" + v1 "github.com/bianjieai/tibc-go/api/tibc/core/client/v1" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_MsgRecvPacket protoreflect.MessageDescriptor + fd_MsgRecvPacket_packet protoreflect.FieldDescriptor + fd_MsgRecvPacket_proof_commitment protoreflect.FieldDescriptor + fd_MsgRecvPacket_proof_height protoreflect.FieldDescriptor + fd_MsgRecvPacket_signer protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_tx_proto_init() + md_MsgRecvPacket = File_tibc_core_packet_v1_tx_proto.Messages().ByName("MsgRecvPacket") + fd_MsgRecvPacket_packet = md_MsgRecvPacket.Fields().ByName("packet") + fd_MsgRecvPacket_proof_commitment = md_MsgRecvPacket.Fields().ByName("proof_commitment") + fd_MsgRecvPacket_proof_height = md_MsgRecvPacket.Fields().ByName("proof_height") + fd_MsgRecvPacket_signer = md_MsgRecvPacket.Fields().ByName("signer") +} + +var _ protoreflect.Message = (*fastReflection_MsgRecvPacket)(nil) + +type fastReflection_MsgRecvPacket MsgRecvPacket + +func (x *MsgRecvPacket) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRecvPacket)(x) +} + +func (x *MsgRecvPacket) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_tx_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRecvPacket_messageType fastReflection_MsgRecvPacket_messageType +var _ protoreflect.MessageType = fastReflection_MsgRecvPacket_messageType{} + +type fastReflection_MsgRecvPacket_messageType struct{} + +func (x fastReflection_MsgRecvPacket_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRecvPacket)(nil) +} +func (x fastReflection_MsgRecvPacket_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRecvPacket) +} +func (x fastReflection_MsgRecvPacket_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRecvPacket +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRecvPacket) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRecvPacket +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRecvPacket) Type() protoreflect.MessageType { + return _fastReflection_MsgRecvPacket_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRecvPacket) New() protoreflect.Message { + return new(fastReflection_MsgRecvPacket) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRecvPacket) Interface() protoreflect.ProtoMessage { + return (*MsgRecvPacket)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRecvPacket) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Packet != nil { + value := protoreflect.ValueOfMessage(x.Packet.ProtoReflect()) + if !f(fd_MsgRecvPacket_packet, value) { + return + } + } + if len(x.ProofCommitment) != 0 { + value := protoreflect.ValueOfBytes(x.ProofCommitment) + if !f(fd_MsgRecvPacket_proof_commitment, value) { + return + } + } + if x.ProofHeight != nil { + value := protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + if !f(fd_MsgRecvPacket_proof_height, value) { + return + } + } + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgRecvPacket_signer, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRecvPacket) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgRecvPacket.packet": + return x.Packet != nil + case "tibc.core.packet.v1.MsgRecvPacket.proof_commitment": + return len(x.ProofCommitment) != 0 + case "tibc.core.packet.v1.MsgRecvPacket.proof_height": + return x.ProofHeight != nil + case "tibc.core.packet.v1.MsgRecvPacket.signer": + return x.Signer != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvPacket does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRecvPacket) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgRecvPacket.packet": + x.Packet = nil + case "tibc.core.packet.v1.MsgRecvPacket.proof_commitment": + x.ProofCommitment = nil + case "tibc.core.packet.v1.MsgRecvPacket.proof_height": + x.ProofHeight = nil + case "tibc.core.packet.v1.MsgRecvPacket.signer": + x.Signer = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvPacket does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRecvPacket) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.MsgRecvPacket.packet": + value := x.Packet + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.packet.v1.MsgRecvPacket.proof_commitment": + value := x.ProofCommitment + return protoreflect.ValueOfBytes(value) + case "tibc.core.packet.v1.MsgRecvPacket.proof_height": + value := x.ProofHeight + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.packet.v1.MsgRecvPacket.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvPacket does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRecvPacket) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgRecvPacket.packet": + x.Packet = value.Message().Interface().(*Packet) + case "tibc.core.packet.v1.MsgRecvPacket.proof_commitment": + x.ProofCommitment = value.Bytes() + case "tibc.core.packet.v1.MsgRecvPacket.proof_height": + x.ProofHeight = value.Message().Interface().(*v1.Height) + case "tibc.core.packet.v1.MsgRecvPacket.signer": + x.Signer = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvPacket does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRecvPacket) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgRecvPacket.packet": + if x.Packet == nil { + x.Packet = new(Packet) + } + return protoreflect.ValueOfMessage(x.Packet.ProtoReflect()) + case "tibc.core.packet.v1.MsgRecvPacket.proof_height": + if x.ProofHeight == nil { + x.ProofHeight = new(v1.Height) + } + return protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + case "tibc.core.packet.v1.MsgRecvPacket.proof_commitment": + panic(fmt.Errorf("field proof_commitment of message tibc.core.packet.v1.MsgRecvPacket is not mutable")) + case "tibc.core.packet.v1.MsgRecvPacket.signer": + panic(fmt.Errorf("field signer of message tibc.core.packet.v1.MsgRecvPacket is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvPacket does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRecvPacket) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgRecvPacket.packet": + m := new(Packet) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.packet.v1.MsgRecvPacket.proof_commitment": + return protoreflect.ValueOfBytes(nil) + case "tibc.core.packet.v1.MsgRecvPacket.proof_height": + m := new(v1.Height) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.packet.v1.MsgRecvPacket.signer": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvPacket does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRecvPacket) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.MsgRecvPacket", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRecvPacket) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRecvPacket) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRecvPacket) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRecvPacket) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRecvPacket) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Packet != nil { + l = options.Size(x.Packet) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ProofCommitment) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ProofHeight != nil { + l = options.Size(x.ProofHeight) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRecvPacket) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0x22 + } + if x.ProofHeight != nil { + encoded, err := options.Marshal(x.ProofHeight) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.ProofCommitment) > 0 { + i -= len(x.ProofCommitment) + copy(dAtA[i:], x.ProofCommitment) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ProofCommitment))) + i-- + dAtA[i] = 0x12 + } + if x.Packet != nil { + encoded, err := options.Marshal(x.Packet) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRecvPacket) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRecvPacket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRecvPacket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Packet", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Packet == nil { + x.Packet = &Packet{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Packet); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofCommitment", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ProofCommitment = append(x.ProofCommitment[:0], dAtA[iNdEx:postIndex]...) + if x.ProofCommitment == nil { + x.ProofCommitment = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ProofHeight == nil { + x.ProofHeight = &v1.Height{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ProofHeight); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgRecvPacketResponse protoreflect.MessageDescriptor +) + +func init() { + file_tibc_core_packet_v1_tx_proto_init() + md_MsgRecvPacketResponse = File_tibc_core_packet_v1_tx_proto.Messages().ByName("MsgRecvPacketResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgRecvPacketResponse)(nil) + +type fastReflection_MsgRecvPacketResponse MsgRecvPacketResponse + +func (x *MsgRecvPacketResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRecvPacketResponse)(x) +} + +func (x *MsgRecvPacketResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_tx_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRecvPacketResponse_messageType fastReflection_MsgRecvPacketResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRecvPacketResponse_messageType{} + +type fastReflection_MsgRecvPacketResponse_messageType struct{} + +func (x fastReflection_MsgRecvPacketResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRecvPacketResponse)(nil) +} +func (x fastReflection_MsgRecvPacketResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRecvPacketResponse) +} +func (x fastReflection_MsgRecvPacketResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRecvPacketResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRecvPacketResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRecvPacketResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRecvPacketResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRecvPacketResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRecvPacketResponse) New() protoreflect.Message { + return new(fastReflection_MsgRecvPacketResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRecvPacketResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRecvPacketResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRecvPacketResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRecvPacketResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvPacketResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRecvPacketResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvPacketResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRecvPacketResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvPacketResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRecvPacketResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvPacketResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRecvPacketResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvPacketResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRecvPacketResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvPacketResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRecvPacketResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.MsgRecvPacketResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRecvPacketResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRecvPacketResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRecvPacketResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRecvPacketResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRecvPacketResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRecvPacketResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRecvPacketResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRecvPacketResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRecvPacketResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgAcknowledgement protoreflect.MessageDescriptor + fd_MsgAcknowledgement_packet protoreflect.FieldDescriptor + fd_MsgAcknowledgement_acknowledgement protoreflect.FieldDescriptor + fd_MsgAcknowledgement_proof_acked protoreflect.FieldDescriptor + fd_MsgAcknowledgement_proof_height protoreflect.FieldDescriptor + fd_MsgAcknowledgement_signer protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_tx_proto_init() + md_MsgAcknowledgement = File_tibc_core_packet_v1_tx_proto.Messages().ByName("MsgAcknowledgement") + fd_MsgAcknowledgement_packet = md_MsgAcknowledgement.Fields().ByName("packet") + fd_MsgAcknowledgement_acknowledgement = md_MsgAcknowledgement.Fields().ByName("acknowledgement") + fd_MsgAcknowledgement_proof_acked = md_MsgAcknowledgement.Fields().ByName("proof_acked") + fd_MsgAcknowledgement_proof_height = md_MsgAcknowledgement.Fields().ByName("proof_height") + fd_MsgAcknowledgement_signer = md_MsgAcknowledgement.Fields().ByName("signer") +} + +var _ protoreflect.Message = (*fastReflection_MsgAcknowledgement)(nil) + +type fastReflection_MsgAcknowledgement MsgAcknowledgement + +func (x *MsgAcknowledgement) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAcknowledgement)(x) +} + +func (x *MsgAcknowledgement) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_tx_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgAcknowledgement_messageType fastReflection_MsgAcknowledgement_messageType +var _ protoreflect.MessageType = fastReflection_MsgAcknowledgement_messageType{} + +type fastReflection_MsgAcknowledgement_messageType struct{} + +func (x fastReflection_MsgAcknowledgement_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAcknowledgement)(nil) +} +func (x fastReflection_MsgAcknowledgement_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAcknowledgement) +} +func (x fastReflection_MsgAcknowledgement_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAcknowledgement +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgAcknowledgement) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAcknowledgement +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgAcknowledgement) Type() protoreflect.MessageType { + return _fastReflection_MsgAcknowledgement_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgAcknowledgement) New() protoreflect.Message { + return new(fastReflection_MsgAcknowledgement) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgAcknowledgement) Interface() protoreflect.ProtoMessage { + return (*MsgAcknowledgement)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgAcknowledgement) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Packet != nil { + value := protoreflect.ValueOfMessage(x.Packet.ProtoReflect()) + if !f(fd_MsgAcknowledgement_packet, value) { + return + } + } + if len(x.Acknowledgement) != 0 { + value := protoreflect.ValueOfBytes(x.Acknowledgement) + if !f(fd_MsgAcknowledgement_acknowledgement, value) { + return + } + } + if len(x.ProofAcked) != 0 { + value := protoreflect.ValueOfBytes(x.ProofAcked) + if !f(fd_MsgAcknowledgement_proof_acked, value) { + return + } + } + if x.ProofHeight != nil { + value := protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + if !f(fd_MsgAcknowledgement_proof_height, value) { + return + } + } + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgAcknowledgement_signer, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgAcknowledgement) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgAcknowledgement.packet": + return x.Packet != nil + case "tibc.core.packet.v1.MsgAcknowledgement.acknowledgement": + return len(x.Acknowledgement) != 0 + case "tibc.core.packet.v1.MsgAcknowledgement.proof_acked": + return len(x.ProofAcked) != 0 + case "tibc.core.packet.v1.MsgAcknowledgement.proof_height": + return x.ProofHeight != nil + case "tibc.core.packet.v1.MsgAcknowledgement.signer": + return x.Signer != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgAcknowledgement")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgAcknowledgement does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAcknowledgement) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgAcknowledgement.packet": + x.Packet = nil + case "tibc.core.packet.v1.MsgAcknowledgement.acknowledgement": + x.Acknowledgement = nil + case "tibc.core.packet.v1.MsgAcknowledgement.proof_acked": + x.ProofAcked = nil + case "tibc.core.packet.v1.MsgAcknowledgement.proof_height": + x.ProofHeight = nil + case "tibc.core.packet.v1.MsgAcknowledgement.signer": + x.Signer = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgAcknowledgement")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgAcknowledgement does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgAcknowledgement) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.MsgAcknowledgement.packet": + value := x.Packet + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.packet.v1.MsgAcknowledgement.acknowledgement": + value := x.Acknowledgement + return protoreflect.ValueOfBytes(value) + case "tibc.core.packet.v1.MsgAcknowledgement.proof_acked": + value := x.ProofAcked + return protoreflect.ValueOfBytes(value) + case "tibc.core.packet.v1.MsgAcknowledgement.proof_height": + value := x.ProofHeight + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.packet.v1.MsgAcknowledgement.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgAcknowledgement")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgAcknowledgement does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAcknowledgement) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgAcknowledgement.packet": + x.Packet = value.Message().Interface().(*Packet) + case "tibc.core.packet.v1.MsgAcknowledgement.acknowledgement": + x.Acknowledgement = value.Bytes() + case "tibc.core.packet.v1.MsgAcknowledgement.proof_acked": + x.ProofAcked = value.Bytes() + case "tibc.core.packet.v1.MsgAcknowledgement.proof_height": + x.ProofHeight = value.Message().Interface().(*v1.Height) + case "tibc.core.packet.v1.MsgAcknowledgement.signer": + x.Signer = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgAcknowledgement")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgAcknowledgement does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAcknowledgement) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgAcknowledgement.packet": + if x.Packet == nil { + x.Packet = new(Packet) + } + return protoreflect.ValueOfMessage(x.Packet.ProtoReflect()) + case "tibc.core.packet.v1.MsgAcknowledgement.proof_height": + if x.ProofHeight == nil { + x.ProofHeight = new(v1.Height) + } + return protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + case "tibc.core.packet.v1.MsgAcknowledgement.acknowledgement": + panic(fmt.Errorf("field acknowledgement of message tibc.core.packet.v1.MsgAcknowledgement is not mutable")) + case "tibc.core.packet.v1.MsgAcknowledgement.proof_acked": + panic(fmt.Errorf("field proof_acked of message tibc.core.packet.v1.MsgAcknowledgement is not mutable")) + case "tibc.core.packet.v1.MsgAcknowledgement.signer": + panic(fmt.Errorf("field signer of message tibc.core.packet.v1.MsgAcknowledgement is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgAcknowledgement")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgAcknowledgement does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgAcknowledgement) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgAcknowledgement.packet": + m := new(Packet) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.packet.v1.MsgAcknowledgement.acknowledgement": + return protoreflect.ValueOfBytes(nil) + case "tibc.core.packet.v1.MsgAcknowledgement.proof_acked": + return protoreflect.ValueOfBytes(nil) + case "tibc.core.packet.v1.MsgAcknowledgement.proof_height": + m := new(v1.Height) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.packet.v1.MsgAcknowledgement.signer": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgAcknowledgement")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgAcknowledgement does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgAcknowledgement) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.MsgAcknowledgement", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgAcknowledgement) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAcknowledgement) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgAcknowledgement) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgAcknowledgement) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgAcknowledgement) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Packet != nil { + l = options.Size(x.Packet) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Acknowledgement) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ProofAcked) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ProofHeight != nil { + l = options.Size(x.ProofHeight) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgAcknowledgement) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0x2a + } + if x.ProofHeight != nil { + encoded, err := options.Marshal(x.ProofHeight) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if len(x.ProofAcked) > 0 { + i -= len(x.ProofAcked) + copy(dAtA[i:], x.ProofAcked) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ProofAcked))) + i-- + dAtA[i] = 0x1a + } + if len(x.Acknowledgement) > 0 { + i -= len(x.Acknowledgement) + copy(dAtA[i:], x.Acknowledgement) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Acknowledgement))) + i-- + dAtA[i] = 0x12 + } + if x.Packet != nil { + encoded, err := options.Marshal(x.Packet) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgAcknowledgement) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAcknowledgement: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAcknowledgement: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Packet", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Packet == nil { + x.Packet = &Packet{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Packet); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Acknowledgement", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Acknowledgement = append(x.Acknowledgement[:0], dAtA[iNdEx:postIndex]...) + if x.Acknowledgement == nil { + x.Acknowledgement = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofAcked", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ProofAcked = append(x.ProofAcked[:0], dAtA[iNdEx:postIndex]...) + if x.ProofAcked == nil { + x.ProofAcked = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ProofHeight == nil { + x.ProofHeight = &v1.Height{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ProofHeight); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgAcknowledgementResponse protoreflect.MessageDescriptor +) + +func init() { + file_tibc_core_packet_v1_tx_proto_init() + md_MsgAcknowledgementResponse = File_tibc_core_packet_v1_tx_proto.Messages().ByName("MsgAcknowledgementResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgAcknowledgementResponse)(nil) + +type fastReflection_MsgAcknowledgementResponse MsgAcknowledgementResponse + +func (x *MsgAcknowledgementResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAcknowledgementResponse)(x) +} + +func (x *MsgAcknowledgementResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_tx_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgAcknowledgementResponse_messageType fastReflection_MsgAcknowledgementResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgAcknowledgementResponse_messageType{} + +type fastReflection_MsgAcknowledgementResponse_messageType struct{} + +func (x fastReflection_MsgAcknowledgementResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAcknowledgementResponse)(nil) +} +func (x fastReflection_MsgAcknowledgementResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAcknowledgementResponse) +} +func (x fastReflection_MsgAcknowledgementResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAcknowledgementResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgAcknowledgementResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAcknowledgementResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgAcknowledgementResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgAcknowledgementResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgAcknowledgementResponse) New() protoreflect.Message { + return new(fastReflection_MsgAcknowledgementResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgAcknowledgementResponse) Interface() protoreflect.ProtoMessage { + return (*MsgAcknowledgementResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgAcknowledgementResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgAcknowledgementResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgAcknowledgementResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgAcknowledgementResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAcknowledgementResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgAcknowledgementResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgAcknowledgementResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgAcknowledgementResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgAcknowledgementResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgAcknowledgementResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAcknowledgementResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgAcknowledgementResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgAcknowledgementResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAcknowledgementResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgAcknowledgementResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgAcknowledgementResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgAcknowledgementResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgAcknowledgementResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgAcknowledgementResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgAcknowledgementResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.MsgAcknowledgementResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgAcknowledgementResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAcknowledgementResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgAcknowledgementResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgAcknowledgementResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgAcknowledgementResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgAcknowledgementResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgAcknowledgementResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAcknowledgementResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAcknowledgementResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgCleanPacket protoreflect.MessageDescriptor + fd_MsgCleanPacket_clean_packet protoreflect.FieldDescriptor + fd_MsgCleanPacket_signer protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_tx_proto_init() + md_MsgCleanPacket = File_tibc_core_packet_v1_tx_proto.Messages().ByName("MsgCleanPacket") + fd_MsgCleanPacket_clean_packet = md_MsgCleanPacket.Fields().ByName("clean_packet") + fd_MsgCleanPacket_signer = md_MsgCleanPacket.Fields().ByName("signer") +} + +var _ protoreflect.Message = (*fastReflection_MsgCleanPacket)(nil) + +type fastReflection_MsgCleanPacket MsgCleanPacket + +func (x *MsgCleanPacket) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCleanPacket)(x) +} + +func (x *MsgCleanPacket) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_tx_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgCleanPacket_messageType fastReflection_MsgCleanPacket_messageType +var _ protoreflect.MessageType = fastReflection_MsgCleanPacket_messageType{} + +type fastReflection_MsgCleanPacket_messageType struct{} + +func (x fastReflection_MsgCleanPacket_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCleanPacket)(nil) +} +func (x fastReflection_MsgCleanPacket_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCleanPacket) +} +func (x fastReflection_MsgCleanPacket_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCleanPacket +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCleanPacket) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCleanPacket +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgCleanPacket) Type() protoreflect.MessageType { + return _fastReflection_MsgCleanPacket_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCleanPacket) New() protoreflect.Message { + return new(fastReflection_MsgCleanPacket) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCleanPacket) Interface() protoreflect.ProtoMessage { + return (*MsgCleanPacket)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgCleanPacket) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.CleanPacket != nil { + value := protoreflect.ValueOfMessage(x.CleanPacket.ProtoReflect()) + if !f(fd_MsgCleanPacket_clean_packet, value) { + return + } + } + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgCleanPacket_signer, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgCleanPacket) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgCleanPacket.clean_packet": + return x.CleanPacket != nil + case "tibc.core.packet.v1.MsgCleanPacket.signer": + return x.Signer != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgCleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgCleanPacket does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCleanPacket) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgCleanPacket.clean_packet": + x.CleanPacket = nil + case "tibc.core.packet.v1.MsgCleanPacket.signer": + x.Signer = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgCleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgCleanPacket does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgCleanPacket) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.MsgCleanPacket.clean_packet": + value := x.CleanPacket + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.packet.v1.MsgCleanPacket.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgCleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgCleanPacket does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCleanPacket) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgCleanPacket.clean_packet": + x.CleanPacket = value.Message().Interface().(*CleanPacket) + case "tibc.core.packet.v1.MsgCleanPacket.signer": + x.Signer = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgCleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgCleanPacket does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCleanPacket) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgCleanPacket.clean_packet": + if x.CleanPacket == nil { + x.CleanPacket = new(CleanPacket) + } + return protoreflect.ValueOfMessage(x.CleanPacket.ProtoReflect()) + case "tibc.core.packet.v1.MsgCleanPacket.signer": + panic(fmt.Errorf("field signer of message tibc.core.packet.v1.MsgCleanPacket is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgCleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgCleanPacket does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgCleanPacket) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgCleanPacket.clean_packet": + m := new(CleanPacket) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.packet.v1.MsgCleanPacket.signer": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgCleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgCleanPacket does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgCleanPacket) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.MsgCleanPacket", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgCleanPacket) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCleanPacket) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgCleanPacket) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgCleanPacket) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCleanPacket) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.CleanPacket != nil { + l = options.Size(x.CleanPacket) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgCleanPacket) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0x12 + } + if x.CleanPacket != nil { + encoded, err := options.Marshal(x.CleanPacket) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgCleanPacket) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCleanPacket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCleanPacket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CleanPacket", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.CleanPacket == nil { + x.CleanPacket = &CleanPacket{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CleanPacket); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgCleanPacketResponse protoreflect.MessageDescriptor +) + +func init() { + file_tibc_core_packet_v1_tx_proto_init() + md_MsgCleanPacketResponse = File_tibc_core_packet_v1_tx_proto.Messages().ByName("MsgCleanPacketResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgCleanPacketResponse)(nil) + +type fastReflection_MsgCleanPacketResponse MsgCleanPacketResponse + +func (x *MsgCleanPacketResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCleanPacketResponse)(x) +} + +func (x *MsgCleanPacketResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_tx_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgCleanPacketResponse_messageType fastReflection_MsgCleanPacketResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCleanPacketResponse_messageType{} + +type fastReflection_MsgCleanPacketResponse_messageType struct{} + +func (x fastReflection_MsgCleanPacketResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCleanPacketResponse)(nil) +} +func (x fastReflection_MsgCleanPacketResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCleanPacketResponse) +} +func (x fastReflection_MsgCleanPacketResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCleanPacketResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCleanPacketResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCleanPacketResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgCleanPacketResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCleanPacketResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCleanPacketResponse) New() protoreflect.Message { + return new(fastReflection_MsgCleanPacketResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCleanPacketResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCleanPacketResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgCleanPacketResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgCleanPacketResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgCleanPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgCleanPacketResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCleanPacketResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgCleanPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgCleanPacketResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgCleanPacketResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgCleanPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgCleanPacketResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCleanPacketResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgCleanPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgCleanPacketResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCleanPacketResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgCleanPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgCleanPacketResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgCleanPacketResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgCleanPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgCleanPacketResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgCleanPacketResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.MsgCleanPacketResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgCleanPacketResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgCleanPacketResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgCleanPacketResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgCleanPacketResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCleanPacketResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgCleanPacketResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgCleanPacketResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCleanPacketResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCleanPacketResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgRecvCleanPacket protoreflect.MessageDescriptor + fd_MsgRecvCleanPacket_clean_packet protoreflect.FieldDescriptor + fd_MsgRecvCleanPacket_proof_commitment protoreflect.FieldDescriptor + fd_MsgRecvCleanPacket_proof_height protoreflect.FieldDescriptor + fd_MsgRecvCleanPacket_signer protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_packet_v1_tx_proto_init() + md_MsgRecvCleanPacket = File_tibc_core_packet_v1_tx_proto.Messages().ByName("MsgRecvCleanPacket") + fd_MsgRecvCleanPacket_clean_packet = md_MsgRecvCleanPacket.Fields().ByName("clean_packet") + fd_MsgRecvCleanPacket_proof_commitment = md_MsgRecvCleanPacket.Fields().ByName("proof_commitment") + fd_MsgRecvCleanPacket_proof_height = md_MsgRecvCleanPacket.Fields().ByName("proof_height") + fd_MsgRecvCleanPacket_signer = md_MsgRecvCleanPacket.Fields().ByName("signer") +} + +var _ protoreflect.Message = (*fastReflection_MsgRecvCleanPacket)(nil) + +type fastReflection_MsgRecvCleanPacket MsgRecvCleanPacket + +func (x *MsgRecvCleanPacket) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRecvCleanPacket)(x) +} + +func (x *MsgRecvCleanPacket) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_tx_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRecvCleanPacket_messageType fastReflection_MsgRecvCleanPacket_messageType +var _ protoreflect.MessageType = fastReflection_MsgRecvCleanPacket_messageType{} + +type fastReflection_MsgRecvCleanPacket_messageType struct{} + +func (x fastReflection_MsgRecvCleanPacket_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRecvCleanPacket)(nil) +} +func (x fastReflection_MsgRecvCleanPacket_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRecvCleanPacket) +} +func (x fastReflection_MsgRecvCleanPacket_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRecvCleanPacket +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRecvCleanPacket) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRecvCleanPacket +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRecvCleanPacket) Type() protoreflect.MessageType { + return _fastReflection_MsgRecvCleanPacket_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRecvCleanPacket) New() protoreflect.Message { + return new(fastReflection_MsgRecvCleanPacket) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRecvCleanPacket) Interface() protoreflect.ProtoMessage { + return (*MsgRecvCleanPacket)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRecvCleanPacket) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.CleanPacket != nil { + value := protoreflect.ValueOfMessage(x.CleanPacket.ProtoReflect()) + if !f(fd_MsgRecvCleanPacket_clean_packet, value) { + return + } + } + if len(x.ProofCommitment) != 0 { + value := protoreflect.ValueOfBytes(x.ProofCommitment) + if !f(fd_MsgRecvCleanPacket_proof_commitment, value) { + return + } + } + if x.ProofHeight != nil { + value := protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + if !f(fd_MsgRecvCleanPacket_proof_height, value) { + return + } + } + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgRecvCleanPacket_signer, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRecvCleanPacket) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgRecvCleanPacket.clean_packet": + return x.CleanPacket != nil + case "tibc.core.packet.v1.MsgRecvCleanPacket.proof_commitment": + return len(x.ProofCommitment) != 0 + case "tibc.core.packet.v1.MsgRecvCleanPacket.proof_height": + return x.ProofHeight != nil + case "tibc.core.packet.v1.MsgRecvCleanPacket.signer": + return x.Signer != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvCleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvCleanPacket does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRecvCleanPacket) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgRecvCleanPacket.clean_packet": + x.CleanPacket = nil + case "tibc.core.packet.v1.MsgRecvCleanPacket.proof_commitment": + x.ProofCommitment = nil + case "tibc.core.packet.v1.MsgRecvCleanPacket.proof_height": + x.ProofHeight = nil + case "tibc.core.packet.v1.MsgRecvCleanPacket.signer": + x.Signer = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvCleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvCleanPacket does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRecvCleanPacket) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.packet.v1.MsgRecvCleanPacket.clean_packet": + value := x.CleanPacket + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.packet.v1.MsgRecvCleanPacket.proof_commitment": + value := x.ProofCommitment + return protoreflect.ValueOfBytes(value) + case "tibc.core.packet.v1.MsgRecvCleanPacket.proof_height": + value := x.ProofHeight + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.packet.v1.MsgRecvCleanPacket.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvCleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvCleanPacket does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRecvCleanPacket) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgRecvCleanPacket.clean_packet": + x.CleanPacket = value.Message().Interface().(*CleanPacket) + case "tibc.core.packet.v1.MsgRecvCleanPacket.proof_commitment": + x.ProofCommitment = value.Bytes() + case "tibc.core.packet.v1.MsgRecvCleanPacket.proof_height": + x.ProofHeight = value.Message().Interface().(*v1.Height) + case "tibc.core.packet.v1.MsgRecvCleanPacket.signer": + x.Signer = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvCleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvCleanPacket does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRecvCleanPacket) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgRecvCleanPacket.clean_packet": + if x.CleanPacket == nil { + x.CleanPacket = new(CleanPacket) + } + return protoreflect.ValueOfMessage(x.CleanPacket.ProtoReflect()) + case "tibc.core.packet.v1.MsgRecvCleanPacket.proof_height": + if x.ProofHeight == nil { + x.ProofHeight = new(v1.Height) + } + return protoreflect.ValueOfMessage(x.ProofHeight.ProtoReflect()) + case "tibc.core.packet.v1.MsgRecvCleanPacket.proof_commitment": + panic(fmt.Errorf("field proof_commitment of message tibc.core.packet.v1.MsgRecvCleanPacket is not mutable")) + case "tibc.core.packet.v1.MsgRecvCleanPacket.signer": + panic(fmt.Errorf("field signer of message tibc.core.packet.v1.MsgRecvCleanPacket is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvCleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvCleanPacket does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRecvCleanPacket) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.packet.v1.MsgRecvCleanPacket.clean_packet": + m := new(CleanPacket) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.packet.v1.MsgRecvCleanPacket.proof_commitment": + return protoreflect.ValueOfBytes(nil) + case "tibc.core.packet.v1.MsgRecvCleanPacket.proof_height": + m := new(v1.Height) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.packet.v1.MsgRecvCleanPacket.signer": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvCleanPacket")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvCleanPacket does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRecvCleanPacket) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.MsgRecvCleanPacket", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRecvCleanPacket) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRecvCleanPacket) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRecvCleanPacket) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRecvCleanPacket) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRecvCleanPacket) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.CleanPacket != nil { + l = options.Size(x.CleanPacket) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ProofCommitment) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ProofHeight != nil { + l = options.Size(x.ProofHeight) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRecvCleanPacket) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0x22 + } + if x.ProofHeight != nil { + encoded, err := options.Marshal(x.ProofHeight) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.ProofCommitment) > 0 { + i -= len(x.ProofCommitment) + copy(dAtA[i:], x.ProofCommitment) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ProofCommitment))) + i-- + dAtA[i] = 0x12 + } + if x.CleanPacket != nil { + encoded, err := options.Marshal(x.CleanPacket) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRecvCleanPacket) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRecvCleanPacket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRecvCleanPacket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CleanPacket", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.CleanPacket == nil { + x.CleanPacket = &CleanPacket{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CleanPacket); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofCommitment", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ProofCommitment = append(x.ProofCommitment[:0], dAtA[iNdEx:postIndex]...) + if x.ProofCommitment == nil { + x.ProofCommitment = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ProofHeight == nil { + x.ProofHeight = &v1.Height{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ProofHeight); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgRecvCleanPacketResponse protoreflect.MessageDescriptor +) + +func init() { + file_tibc_core_packet_v1_tx_proto_init() + md_MsgRecvCleanPacketResponse = File_tibc_core_packet_v1_tx_proto.Messages().ByName("MsgRecvCleanPacketResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgRecvCleanPacketResponse)(nil) + +type fastReflection_MsgRecvCleanPacketResponse MsgRecvCleanPacketResponse + +func (x *MsgRecvCleanPacketResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRecvCleanPacketResponse)(x) +} + +func (x *MsgRecvCleanPacketResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_packet_v1_tx_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRecvCleanPacketResponse_messageType fastReflection_MsgRecvCleanPacketResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRecvCleanPacketResponse_messageType{} + +type fastReflection_MsgRecvCleanPacketResponse_messageType struct{} + +func (x fastReflection_MsgRecvCleanPacketResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRecvCleanPacketResponse)(nil) +} +func (x fastReflection_MsgRecvCleanPacketResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRecvCleanPacketResponse) +} +func (x fastReflection_MsgRecvCleanPacketResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRecvCleanPacketResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRecvCleanPacketResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRecvCleanPacketResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRecvCleanPacketResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRecvCleanPacketResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRecvCleanPacketResponse) New() protoreflect.Message { + return new(fastReflection_MsgRecvCleanPacketResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRecvCleanPacketResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRecvCleanPacketResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRecvCleanPacketResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRecvCleanPacketResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvCleanPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvCleanPacketResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRecvCleanPacketResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvCleanPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvCleanPacketResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRecvCleanPacketResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvCleanPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvCleanPacketResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRecvCleanPacketResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvCleanPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvCleanPacketResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRecvCleanPacketResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvCleanPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvCleanPacketResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRecvCleanPacketResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.packet.v1.MsgRecvCleanPacketResponse")) + } + panic(fmt.Errorf("message tibc.core.packet.v1.MsgRecvCleanPacketResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRecvCleanPacketResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.packet.v1.MsgRecvCleanPacketResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRecvCleanPacketResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRecvCleanPacketResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRecvCleanPacketResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRecvCleanPacketResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRecvCleanPacketResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRecvCleanPacketResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRecvCleanPacketResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRecvCleanPacketResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRecvCleanPacketResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: tibc/core/packet/v1/tx.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// MsgRecvPacket receives incoming TIBC packet +type MsgRecvPacket struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Packet *Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet,omitempty"` + ProofCommitment []byte `protobuf:"bytes,2,opt,name=proof_commitment,json=proofCommitment,proto3" json:"proof_commitment,omitempty"` + ProofHeight *v1.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` + Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (x *MsgRecvPacket) Reset() { + *x = MsgRecvPacket{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRecvPacket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRecvPacket) ProtoMessage() {} + +// Deprecated: Use MsgRecvPacket.ProtoReflect.Descriptor instead. +func (*MsgRecvPacket) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgRecvPacket) GetPacket() *Packet { + if x != nil { + return x.Packet + } + return nil +} + +func (x *MsgRecvPacket) GetProofCommitment() []byte { + if x != nil { + return x.ProofCommitment + } + return nil +} + +func (x *MsgRecvPacket) GetProofHeight() *v1.Height { + if x != nil { + return x.ProofHeight + } + return nil +} + +func (x *MsgRecvPacket) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +// MsgRecvPacketResponse defines the Msg/RecvPacket response type. +type MsgRecvPacketResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgRecvPacketResponse) Reset() { + *x = MsgRecvPacketResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRecvPacketResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRecvPacketResponse) ProtoMessage() {} + +// Deprecated: Use MsgRecvPacketResponse.ProtoReflect.Descriptor instead. +func (*MsgRecvPacketResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_tx_proto_rawDescGZIP(), []int{1} +} + +// MsgAcknowledgement receives incoming TIBC acknowledgement +type MsgAcknowledgement struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Packet *Packet `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet,omitempty"` + Acknowledgement []byte `protobuf:"bytes,2,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"` + ProofAcked []byte `protobuf:"bytes,3,opt,name=proof_acked,json=proofAcked,proto3" json:"proof_acked,omitempty"` + ProofHeight *v1.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (x *MsgAcknowledgement) Reset() { + *x = MsgAcknowledgement{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAcknowledgement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAcknowledgement) ProtoMessage() {} + +// Deprecated: Use MsgAcknowledgement.ProtoReflect.Descriptor instead. +func (*MsgAcknowledgement) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgAcknowledgement) GetPacket() *Packet { + if x != nil { + return x.Packet + } + return nil +} + +func (x *MsgAcknowledgement) GetAcknowledgement() []byte { + if x != nil { + return x.Acknowledgement + } + return nil +} + +func (x *MsgAcknowledgement) GetProofAcked() []byte { + if x != nil { + return x.ProofAcked + } + return nil +} + +func (x *MsgAcknowledgement) GetProofHeight() *v1.Height { + if x != nil { + return x.ProofHeight + } + return nil +} + +func (x *MsgAcknowledgement) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +// MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. +type MsgAcknowledgementResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgAcknowledgementResponse) Reset() { + *x = MsgAcknowledgementResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAcknowledgementResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAcknowledgementResponse) ProtoMessage() {} + +// Deprecated: Use MsgAcknowledgementResponse.ProtoReflect.Descriptor instead. +func (*MsgAcknowledgementResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_tx_proto_rawDescGZIP(), []int{3} +} + +// MsgRecvPacket receives incoming TIBC packet +type MsgCleanPacket struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CleanPacket *CleanPacket `protobuf:"bytes,1,opt,name=clean_packet,json=cleanPacket,proto3" json:"clean_packet,omitempty"` + Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (x *MsgCleanPacket) Reset() { + *x = MsgCleanPacket{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCleanPacket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCleanPacket) ProtoMessage() {} + +// Deprecated: Use MsgCleanPacket.ProtoReflect.Descriptor instead. +func (*MsgCleanPacket) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgCleanPacket) GetCleanPacket() *CleanPacket { + if x != nil { + return x.CleanPacket + } + return nil +} + +func (x *MsgCleanPacket) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +// MsgRecvPacketResponse defines the Msg/RecvPacket response type. +type MsgCleanPacketResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgCleanPacketResponse) Reset() { + *x = MsgCleanPacketResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCleanPacketResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCleanPacketResponse) ProtoMessage() {} + +// Deprecated: Use MsgCleanPacketResponse.ProtoReflect.Descriptor instead. +func (*MsgCleanPacketResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_tx_proto_rawDescGZIP(), []int{5} +} + +// MsgRecvPacket receives incoming TIBC packet +type MsgRecvCleanPacket struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CleanPacket *CleanPacket `protobuf:"bytes,1,opt,name=clean_packet,json=cleanPacket,proto3" json:"clean_packet,omitempty"` + ProofCommitment []byte `protobuf:"bytes,2,opt,name=proof_commitment,json=proofCommitment,proto3" json:"proof_commitment,omitempty"` + ProofHeight *v1.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"` + Signer string `protobuf:"bytes,4,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (x *MsgRecvCleanPacket) Reset() { + *x = MsgRecvCleanPacket{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRecvCleanPacket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRecvCleanPacket) ProtoMessage() {} + +// Deprecated: Use MsgRecvCleanPacket.ProtoReflect.Descriptor instead. +func (*MsgRecvCleanPacket) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgRecvCleanPacket) GetCleanPacket() *CleanPacket { + if x != nil { + return x.CleanPacket + } + return nil +} + +func (x *MsgRecvCleanPacket) GetProofCommitment() []byte { + if x != nil { + return x.ProofCommitment + } + return nil +} + +func (x *MsgRecvCleanPacket) GetProofHeight() *v1.Height { + if x != nil { + return x.ProofHeight + } + return nil +} + +func (x *MsgRecvCleanPacket) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +// MsgRecvPacketResponse defines the Msg/RecvPacket response type. +type MsgRecvCleanPacketResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgRecvCleanPacketResponse) Reset() { + *x = MsgRecvCleanPacketResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_packet_v1_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRecvCleanPacketResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRecvCleanPacketResponse) ProtoMessage() {} + +// Deprecated: Use MsgRecvCleanPacketResponse.ProtoReflect.Descriptor instead. +func (*MsgRecvCleanPacketResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_packet_v1_tx_proto_rawDescGZIP(), []int{7} +} + +var File_tibc_core_packet_v1_tx_proto protoreflect.FileDescriptor + +var file_tibc_core_packet_v1_tx_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, + 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x20, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x02, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x63, 0x76, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x12, 0x46, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x1b, 0xf2, + 0xde, 0x1f, 0x17, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x6f, + 0x66, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5b, 0x0a, 0x0c, 0x70, + 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x1b, + 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x72, + 0x6f, 0x6f, 0x66, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x52, 0x0b, 0x70, 0x72, 0x6f, + 0x6f, 0x66, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x3a, 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x63, 0x76, + 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbc, + 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x12, 0x28, 0x0a, 0x0f, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x61, 0x63, 0x6b, 0x6e, 0x6f, + 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x0b, 0x70, 0x72, + 0x6f, 0x6f, 0x66, 0x5f, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, + 0x16, 0xf2, 0xde, 0x1f, 0x12, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x72, 0x6f, 0x6f, 0x66, + 0x5f, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x22, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x41, 0x63, + 0x6b, 0x65, 0x64, 0x12, 0x5b, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x69, 0x62, 0x63, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x1b, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x13, + 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x22, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, + 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x1c, 0x0a, + 0x1a, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x0e, + 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x49, + 0x0a, 0x0c, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x6e, + 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x63, 0x6c, + 0x65, 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x3a, 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, + 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0xb1, 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x63, 0x76, 0x43, 0x6c, 0x65, 0x61, + 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x49, 0x0a, 0x0c, 0x63, 0x6c, 0x65, 0x61, 0x6e, + 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x12, 0x46, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x1b, 0xf2, 0xde, + 0x1f, 0x17, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x6f, 0x66, + 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5b, 0x0a, 0x0c, 0x70, 0x72, + 0x6f, 0x6f, 0x66, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x1b, 0xc8, + 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x72, 0x6f, + 0x6f, 0x66, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6f, + 0x66, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x3a, + 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x63, 0x76, 0x43, + 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x32, 0xa5, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x5c, 0x0a, 0x0a, 0x52, 0x65, + 0x63, 0x76, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x22, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x52, 0x65, 0x63, 0x76, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x1a, 0x2a, 0x2e, 0x74, + 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x63, 0x76, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0f, 0x41, 0x63, 0x6b, 0x6e, + 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x74, 0x69, + 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x2f, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x63, + 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x0b, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x12, 0x23, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, + 0x65, 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x1a, 0x2b, 0x2e, 0x74, 0x69, 0x62, 0x63, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0f, 0x52, 0x65, 0x63, 0x76, 0x43, 0x6c, + 0x65, 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x27, 0x2e, 0x74, 0x69, 0x62, 0x63, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x52, 0x65, 0x63, 0x76, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x1a, 0x2f, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x63, 0x76, + 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd0, 0x01, 0x0a, 0x17, 0x63, + 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x69, + 0x61, 0x6e, 0x6a, 0x69, 0x65, 0x61, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2d, 0x67, 0x6f, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x54, 0x43, 0x50, 0xaa, 0x02, 0x13, 0x54, 0x69, 0x62, 0x63, 0x2e, 0x43, 0x6f, + 0x72, 0x65, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x54, + 0x69, 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x50, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x54, 0x69, 0x62, 0x63, 0x3a, 0x3a, 0x43, 0x6f, 0x72, + 0x65, 0x3a, 0x3a, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tibc_core_packet_v1_tx_proto_rawDescOnce sync.Once + file_tibc_core_packet_v1_tx_proto_rawDescData = file_tibc_core_packet_v1_tx_proto_rawDesc +) + +func file_tibc_core_packet_v1_tx_proto_rawDescGZIP() []byte { + file_tibc_core_packet_v1_tx_proto_rawDescOnce.Do(func() { + file_tibc_core_packet_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_tibc_core_packet_v1_tx_proto_rawDescData) + }) + return file_tibc_core_packet_v1_tx_proto_rawDescData +} + +var file_tibc_core_packet_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_tibc_core_packet_v1_tx_proto_goTypes = []interface{}{ + (*MsgRecvPacket)(nil), // 0: tibc.core.packet.v1.MsgRecvPacket + (*MsgRecvPacketResponse)(nil), // 1: tibc.core.packet.v1.MsgRecvPacketResponse + (*MsgAcknowledgement)(nil), // 2: tibc.core.packet.v1.MsgAcknowledgement + (*MsgAcknowledgementResponse)(nil), // 3: tibc.core.packet.v1.MsgAcknowledgementResponse + (*MsgCleanPacket)(nil), // 4: tibc.core.packet.v1.MsgCleanPacket + (*MsgCleanPacketResponse)(nil), // 5: tibc.core.packet.v1.MsgCleanPacketResponse + (*MsgRecvCleanPacket)(nil), // 6: tibc.core.packet.v1.MsgRecvCleanPacket + (*MsgRecvCleanPacketResponse)(nil), // 7: tibc.core.packet.v1.MsgRecvCleanPacketResponse + (*Packet)(nil), // 8: tibc.core.packet.v1.Packet + (*v1.Height)(nil), // 9: tibc.core.client.v1.Height + (*CleanPacket)(nil), // 10: tibc.core.packet.v1.CleanPacket +} +var file_tibc_core_packet_v1_tx_proto_depIdxs = []int32{ + 8, // 0: tibc.core.packet.v1.MsgRecvPacket.packet:type_name -> tibc.core.packet.v1.Packet + 9, // 1: tibc.core.packet.v1.MsgRecvPacket.proof_height:type_name -> tibc.core.client.v1.Height + 8, // 2: tibc.core.packet.v1.MsgAcknowledgement.packet:type_name -> tibc.core.packet.v1.Packet + 9, // 3: tibc.core.packet.v1.MsgAcknowledgement.proof_height:type_name -> tibc.core.client.v1.Height + 10, // 4: tibc.core.packet.v1.MsgCleanPacket.clean_packet:type_name -> tibc.core.packet.v1.CleanPacket + 10, // 5: tibc.core.packet.v1.MsgRecvCleanPacket.clean_packet:type_name -> tibc.core.packet.v1.CleanPacket + 9, // 6: tibc.core.packet.v1.MsgRecvCleanPacket.proof_height:type_name -> tibc.core.client.v1.Height + 0, // 7: tibc.core.packet.v1.Msg.RecvPacket:input_type -> tibc.core.packet.v1.MsgRecvPacket + 2, // 8: tibc.core.packet.v1.Msg.Acknowledgement:input_type -> tibc.core.packet.v1.MsgAcknowledgement + 4, // 9: tibc.core.packet.v1.Msg.CleanPacket:input_type -> tibc.core.packet.v1.MsgCleanPacket + 6, // 10: tibc.core.packet.v1.Msg.RecvCleanPacket:input_type -> tibc.core.packet.v1.MsgRecvCleanPacket + 1, // 11: tibc.core.packet.v1.Msg.RecvPacket:output_type -> tibc.core.packet.v1.MsgRecvPacketResponse + 3, // 12: tibc.core.packet.v1.Msg.Acknowledgement:output_type -> tibc.core.packet.v1.MsgAcknowledgementResponse + 5, // 13: tibc.core.packet.v1.Msg.CleanPacket:output_type -> tibc.core.packet.v1.MsgCleanPacketResponse + 7, // 14: tibc.core.packet.v1.Msg.RecvCleanPacket:output_type -> tibc.core.packet.v1.MsgRecvCleanPacketResponse + 11, // [11:15] is the sub-list for method output_type + 7, // [7:11] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_tibc_core_packet_v1_tx_proto_init() } +func file_tibc_core_packet_v1_tx_proto_init() { + if File_tibc_core_packet_v1_tx_proto != nil { + return + } + file_tibc_core_packet_v1_packet_proto_init() + if !protoimpl.UnsafeEnabled { + file_tibc_core_packet_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRecvPacket); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRecvPacketResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgAcknowledgement); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgAcknowledgementResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCleanPacket); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCleanPacketResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRecvCleanPacket); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_packet_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRecvCleanPacketResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_tibc_core_packet_v1_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_tibc_core_packet_v1_tx_proto_goTypes, + DependencyIndexes: file_tibc_core_packet_v1_tx_proto_depIdxs, + MessageInfos: file_tibc_core_packet_v1_tx_proto_msgTypes, + }.Build() + File_tibc_core_packet_v1_tx_proto = out.File + file_tibc_core_packet_v1_tx_proto_rawDesc = nil + file_tibc_core_packet_v1_tx_proto_goTypes = nil + file_tibc_core_packet_v1_tx_proto_depIdxs = nil +} diff --git a/api/tibc/core/packet/v1/tx_grpc.pb.go b/api/tibc/core/packet/v1/tx_grpc.pb.go new file mode 100644 index 00000000..17c05697 --- /dev/null +++ b/api/tibc/core/packet/v1/tx_grpc.pb.go @@ -0,0 +1,247 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: tibc/core/packet/v1/tx.proto + +package packetv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Msg_RecvPacket_FullMethodName = "/tibc.core.packet.v1.Msg/RecvPacket" + Msg_Acknowledgement_FullMethodName = "/tibc.core.packet.v1.Msg/Acknowledgement" + Msg_CleanPacket_FullMethodName = "/tibc.core.packet.v1.Msg/CleanPacket" + Msg_RecvCleanPacket_FullMethodName = "/tibc.core.packet.v1.Msg/RecvCleanPacket" +) + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Msg defines the tibc/packet Msg service. +type MsgClient interface { + // RecvPacket defines a rpc handler method for MsgRecvPacket. + RecvPacket(ctx context.Context, in *MsgRecvPacket, opts ...grpc.CallOption) (*MsgRecvPacketResponse, error) + // Acknowledgement defines a rpc handler method for MsgAcknowledgement. + Acknowledgement(ctx context.Context, in *MsgAcknowledgement, opts ...grpc.CallOption) (*MsgAcknowledgementResponse, error) + // CleanPacket defines a rpc handler method for MsgCleanPacket. + CleanPacket(ctx context.Context, in *MsgCleanPacket, opts ...grpc.CallOption) (*MsgCleanPacketResponse, error) + // RecvCleanPacket defines a rpc handler method for MsgRecvCleanPacket. + RecvCleanPacket(ctx context.Context, in *MsgRecvCleanPacket, opts ...grpc.CallOption) (*MsgRecvCleanPacketResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) RecvPacket(ctx context.Context, in *MsgRecvPacket, opts ...grpc.CallOption) (*MsgRecvPacketResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgRecvPacketResponse) + err := c.cc.Invoke(ctx, Msg_RecvPacket_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Acknowledgement(ctx context.Context, in *MsgAcknowledgement, opts ...grpc.CallOption) (*MsgAcknowledgementResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgAcknowledgementResponse) + err := c.cc.Invoke(ctx, Msg_Acknowledgement_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CleanPacket(ctx context.Context, in *MsgCleanPacket, opts ...grpc.CallOption) (*MsgCleanPacketResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgCleanPacketResponse) + err := c.cc.Invoke(ctx, Msg_CleanPacket_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RecvCleanPacket(ctx context.Context, in *MsgRecvCleanPacket, opts ...grpc.CallOption) (*MsgRecvCleanPacketResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgRecvCleanPacketResponse) + err := c.cc.Invoke(ctx, Msg_RecvCleanPacket_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility. +// +// Msg defines the tibc/packet Msg service. +type MsgServer interface { + // RecvPacket defines a rpc handler method for MsgRecvPacket. + RecvPacket(context.Context, *MsgRecvPacket) (*MsgRecvPacketResponse, error) + // Acknowledgement defines a rpc handler method for MsgAcknowledgement. + Acknowledgement(context.Context, *MsgAcknowledgement) (*MsgAcknowledgementResponse, error) + // CleanPacket defines a rpc handler method for MsgCleanPacket. + CleanPacket(context.Context, *MsgCleanPacket) (*MsgCleanPacketResponse, error) + // RecvCleanPacket defines a rpc handler method for MsgRecvCleanPacket. + RecvCleanPacket(context.Context, *MsgRecvCleanPacket) (*MsgRecvCleanPacketResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedMsgServer struct{} + +func (UnimplementedMsgServer) RecvPacket(context.Context, *MsgRecvPacket) (*MsgRecvPacketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RecvPacket not implemented") +} +func (UnimplementedMsgServer) Acknowledgement(context.Context, *MsgAcknowledgement) (*MsgAcknowledgementResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Acknowledgement not implemented") +} +func (UnimplementedMsgServer) CleanPacket(context.Context, *MsgCleanPacket) (*MsgCleanPacketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CleanPacket not implemented") +} +func (UnimplementedMsgServer) RecvCleanPacket(context.Context, *MsgRecvCleanPacket) (*MsgRecvCleanPacketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RecvCleanPacket not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} +func (UnimplementedMsgServer) testEmbeddedByValue() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + // If the following call pancis, it indicates UnimplementedMsgServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_RecvPacket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRecvPacket) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RecvPacket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_RecvPacket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RecvPacket(ctx, req.(*MsgRecvPacket)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Acknowledgement_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAcknowledgement) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Acknowledgement(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_Acknowledgement_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Acknowledgement(ctx, req.(*MsgAcknowledgement)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CleanPacket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCleanPacket) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CleanPacket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_CleanPacket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CleanPacket(ctx, req.(*MsgCleanPacket)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RecvCleanPacket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRecvCleanPacket) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RecvCleanPacket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_RecvCleanPacket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RecvCleanPacket(ctx, req.(*MsgRecvCleanPacket)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "tibc.core.packet.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RecvPacket", + Handler: _Msg_RecvPacket_Handler, + }, + { + MethodName: "Acknowledgement", + Handler: _Msg_Acknowledgement_Handler, + }, + { + MethodName: "CleanPacket", + Handler: _Msg_CleanPacket_Handler, + }, + { + MethodName: "RecvCleanPacket", + Handler: _Msg_RecvCleanPacket_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "tibc/core/packet/v1/tx.proto", +} diff --git a/api/tibc/core/routing/v1/genesis.pulsar.go b/api/tibc/core/routing/v1/genesis.pulsar.go new file mode 100644 index 00000000..e805e50d --- /dev/null +++ b/api/tibc/core/routing/v1/genesis.pulsar.go @@ -0,0 +1,631 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package routingv1 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_GenesisState_1_list)(nil) + +type _GenesisState_1_list struct { + list *[]string +} + +func (x *_GenesisState_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_GenesisState_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message GenesisState at list field Rules as it is not of Message kind")) +} + +func (x *_GenesisState_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_GenesisState_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_rules protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_routing_v1_genesis_proto_init() + md_GenesisState = File_tibc_core_routing_v1_genesis_proto.Messages().ByName("GenesisState") + fd_GenesisState_rules = md_GenesisState.Fields().ByName("rules") +} + +var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) + +type fastReflection_GenesisState GenesisState + +func (x *GenesisState) ProtoReflect() protoreflect.Message { + return (*fastReflection_GenesisState)(x) +} + +func (x *GenesisState) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_routing_v1_genesis_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType +var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} + +type fastReflection_GenesisState_messageType struct{} + +func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { + return (*fastReflection_GenesisState)(nil) +} +func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} +func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { + return _fastReflection_GenesisState_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GenesisState) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { + return (*GenesisState)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Rules) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_1_list{list: &x.Rules}) + if !f(fd_GenesisState_rules, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.routing.v1.GenesisState.rules": + return len(x.Rules) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.routing.v1.GenesisState.rules": + x.Rules = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.routing.v1.GenesisState.rules": + if len(x.Rules) == 0 { + return protoreflect.ValueOfList(&_GenesisState_1_list{}) + } + listValue := &_GenesisState_1_list{list: &x.Rules} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.GenesisState does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.routing.v1.GenesisState.rules": + lv := value.List() + clv := lv.(*_GenesisState_1_list) + x.Rules = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.routing.v1.GenesisState.rules": + if x.Rules == nil { + x.Rules = []string{} + } + value := &_GenesisState_1_list{list: &x.Rules} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.routing.v1.GenesisState.rules": + list := []string{} + return protoreflect.ValueOfList(&_GenesisState_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.routing.v1.GenesisState", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_GenesisState) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Rules) > 0 { + for _, s := range x.Rules { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Rules) > 0 { + for iNdEx := len(x.Rules) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Rules[iNdEx]) + copy(dAtA[i:], x.Rules[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Rules[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Rules = append(x.Rules, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: tibc/core/routing/v1/genesis.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// GenesisState defines the tibc channel submodule's genesis state. +type GenesisState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Rules []string `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` +} + +func (x *GenesisState) Reset() { + *x = GenesisState{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_routing_v1_genesis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenesisState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenesisState) ProtoMessage() {} + +// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. +func (*GenesisState) Descriptor() ([]byte, []int) { + return file_tibc_core_routing_v1_genesis_proto_rawDescGZIP(), []int{0} +} + +func (x *GenesisState) GetRules() []string { + if x != nil { + return x.Rules + } + return nil +} + +var File_tibc_core_routing_v1_genesis_proto protoreflect.FileDescriptor + +var file_tibc_core_routing_v1_genesis_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x22, 0x24, 0x0a, 0x0c, 0x47, 0x65, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x42, 0xdc, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x69, 0x61, 0x6e, 0x6a, 0x69, + 0x65, 0x61, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x54, 0x43, 0x52, 0xaa, 0x02, 0x14, 0x54, 0x69, 0x62, 0x63, 0x2e, 0x43, 0x6f, 0x72, 0x65, + 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x14, 0x54, 0x69, + 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x20, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x52, + 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x54, 0x69, 0x62, 0x63, 0x3a, 0x3a, 0x43, 0x6f, + 0x72, 0x65, 0x3a, 0x3a, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tibc_core_routing_v1_genesis_proto_rawDescOnce sync.Once + file_tibc_core_routing_v1_genesis_proto_rawDescData = file_tibc_core_routing_v1_genesis_proto_rawDesc +) + +func file_tibc_core_routing_v1_genesis_proto_rawDescGZIP() []byte { + file_tibc_core_routing_v1_genesis_proto_rawDescOnce.Do(func() { + file_tibc_core_routing_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_tibc_core_routing_v1_genesis_proto_rawDescData) + }) + return file_tibc_core_routing_v1_genesis_proto_rawDescData +} + +var file_tibc_core_routing_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_tibc_core_routing_v1_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: tibc.core.routing.v1.GenesisState +} +var file_tibc_core_routing_v1_genesis_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_tibc_core_routing_v1_genesis_proto_init() } +func file_tibc_core_routing_v1_genesis_proto_init() { + if File_tibc_core_routing_v1_genesis_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_tibc_core_routing_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenesisState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_tibc_core_routing_v1_genesis_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_tibc_core_routing_v1_genesis_proto_goTypes, + DependencyIndexes: file_tibc_core_routing_v1_genesis_proto_depIdxs, + MessageInfos: file_tibc_core_routing_v1_genesis_proto_msgTypes, + }.Build() + File_tibc_core_routing_v1_genesis_proto = out.File + file_tibc_core_routing_v1_genesis_proto_rawDesc = nil + file_tibc_core_routing_v1_genesis_proto_goTypes = nil + file_tibc_core_routing_v1_genesis_proto_depIdxs = nil +} diff --git a/api/tibc/core/routing/v1/query.pulsar.go b/api/tibc/core/routing/v1/query.pulsar.go new file mode 100644 index 00000000..76beec0a --- /dev/null +++ b/api/tibc/core/routing/v1/query.pulsar.go @@ -0,0 +1,1047 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package routingv1 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_QueryRoutingRulesRequest protoreflect.MessageDescriptor +) + +func init() { + file_tibc_core_routing_v1_query_proto_init() + md_QueryRoutingRulesRequest = File_tibc_core_routing_v1_query_proto.Messages().ByName("QueryRoutingRulesRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryRoutingRulesRequest)(nil) + +type fastReflection_QueryRoutingRulesRequest QueryRoutingRulesRequest + +func (x *QueryRoutingRulesRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryRoutingRulesRequest)(x) +} + +func (x *QueryRoutingRulesRequest) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_routing_v1_query_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryRoutingRulesRequest_messageType fastReflection_QueryRoutingRulesRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryRoutingRulesRequest_messageType{} + +type fastReflection_QueryRoutingRulesRequest_messageType struct{} + +func (x fastReflection_QueryRoutingRulesRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryRoutingRulesRequest)(nil) +} +func (x fastReflection_QueryRoutingRulesRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryRoutingRulesRequest) +} +func (x fastReflection_QueryRoutingRulesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRoutingRulesRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryRoutingRulesRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRoutingRulesRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryRoutingRulesRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryRoutingRulesRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryRoutingRulesRequest) New() protoreflect.Message { + return new(fastReflection_QueryRoutingRulesRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryRoutingRulesRequest) Interface() protoreflect.ProtoMessage { + return (*QueryRoutingRulesRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryRoutingRulesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryRoutingRulesRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.QueryRoutingRulesRequest")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.QueryRoutingRulesRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRoutingRulesRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.QueryRoutingRulesRequest")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.QueryRoutingRulesRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryRoutingRulesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.QueryRoutingRulesRequest")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.QueryRoutingRulesRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRoutingRulesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.QueryRoutingRulesRequest")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.QueryRoutingRulesRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRoutingRulesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.QueryRoutingRulesRequest")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.QueryRoutingRulesRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryRoutingRulesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.QueryRoutingRulesRequest")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.QueryRoutingRulesRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryRoutingRulesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.routing.v1.QueryRoutingRulesRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryRoutingRulesRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRoutingRulesRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryRoutingRulesRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryRoutingRulesRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryRoutingRulesRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryRoutingRulesRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryRoutingRulesRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRoutingRulesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRoutingRulesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryRoutingRulesResponse_1_list)(nil) + +type _QueryRoutingRulesResponse_1_list struct { + list *[]string +} + +func (x *_QueryRoutingRulesResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryRoutingRulesResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_QueryRoutingRulesResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_QueryRoutingRulesResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryRoutingRulesResponse_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message QueryRoutingRulesResponse at list field Rules as it is not of Message kind")) +} + +func (x *_QueryRoutingRulesResponse_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_QueryRoutingRulesResponse_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_QueryRoutingRulesResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryRoutingRulesResponse protoreflect.MessageDescriptor + fd_QueryRoutingRulesResponse_rules protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_routing_v1_query_proto_init() + md_QueryRoutingRulesResponse = File_tibc_core_routing_v1_query_proto.Messages().ByName("QueryRoutingRulesResponse") + fd_QueryRoutingRulesResponse_rules = md_QueryRoutingRulesResponse.Fields().ByName("rules") +} + +var _ protoreflect.Message = (*fastReflection_QueryRoutingRulesResponse)(nil) + +type fastReflection_QueryRoutingRulesResponse QueryRoutingRulesResponse + +func (x *QueryRoutingRulesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryRoutingRulesResponse)(x) +} + +func (x *QueryRoutingRulesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_routing_v1_query_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryRoutingRulesResponse_messageType fastReflection_QueryRoutingRulesResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryRoutingRulesResponse_messageType{} + +type fastReflection_QueryRoutingRulesResponse_messageType struct{} + +func (x fastReflection_QueryRoutingRulesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryRoutingRulesResponse)(nil) +} +func (x fastReflection_QueryRoutingRulesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryRoutingRulesResponse) +} +func (x fastReflection_QueryRoutingRulesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRoutingRulesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryRoutingRulesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRoutingRulesResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryRoutingRulesResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryRoutingRulesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryRoutingRulesResponse) New() protoreflect.Message { + return new(fastReflection_QueryRoutingRulesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryRoutingRulesResponse) Interface() protoreflect.ProtoMessage { + return (*QueryRoutingRulesResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryRoutingRulesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Rules) != 0 { + value := protoreflect.ValueOfList(&_QueryRoutingRulesResponse_1_list{list: &x.Rules}) + if !f(fd_QueryRoutingRulesResponse_rules, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryRoutingRulesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.routing.v1.QueryRoutingRulesResponse.rules": + return len(x.Rules) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.QueryRoutingRulesResponse")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.QueryRoutingRulesResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRoutingRulesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.routing.v1.QueryRoutingRulesResponse.rules": + x.Rules = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.QueryRoutingRulesResponse")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.QueryRoutingRulesResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryRoutingRulesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.routing.v1.QueryRoutingRulesResponse.rules": + if len(x.Rules) == 0 { + return protoreflect.ValueOfList(&_QueryRoutingRulesResponse_1_list{}) + } + listValue := &_QueryRoutingRulesResponse_1_list{list: &x.Rules} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.QueryRoutingRulesResponse")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.QueryRoutingRulesResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRoutingRulesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.routing.v1.QueryRoutingRulesResponse.rules": + lv := value.List() + clv := lv.(*_QueryRoutingRulesResponse_1_list) + x.Rules = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.QueryRoutingRulesResponse")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.QueryRoutingRulesResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRoutingRulesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.routing.v1.QueryRoutingRulesResponse.rules": + if x.Rules == nil { + x.Rules = []string{} + } + value := &_QueryRoutingRulesResponse_1_list{list: &x.Rules} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.QueryRoutingRulesResponse")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.QueryRoutingRulesResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryRoutingRulesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.routing.v1.QueryRoutingRulesResponse.rules": + list := []string{} + return protoreflect.ValueOfList(&_QueryRoutingRulesResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.QueryRoutingRulesResponse")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.QueryRoutingRulesResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryRoutingRulesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.routing.v1.QueryRoutingRulesResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryRoutingRulesResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryRoutingRulesResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryRoutingRulesResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryRoutingRulesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryRoutingRulesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Rules) > 0 { + for _, s := range x.Rules { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryRoutingRulesResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Rules) > 0 { + for iNdEx := len(x.Rules) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Rules[iNdEx]) + copy(dAtA[i:], x.Rules[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Rules[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryRoutingRulesResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRoutingRulesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRoutingRulesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Rules = append(x.Rules, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: tibc/core/routing/v1/query.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// QueryRoutingRulesRequest is the request type for the +// RoutingRules RPC method +type QueryRoutingRulesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryRoutingRulesRequest) Reset() { + *x = QueryRoutingRulesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_routing_v1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRoutingRulesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRoutingRulesRequest) ProtoMessage() {} + +// Deprecated: Use QueryRoutingRulesRequest.ProtoReflect.Descriptor instead. +func (*QueryRoutingRulesRequest) Descriptor() ([]byte, []int) { + return file_tibc_core_routing_v1_query_proto_rawDescGZIP(), []int{0} +} + +// QueryRoutingRulesResponse defines the routing rules query response +type QueryRoutingRulesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // rule string array + Rules []string `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` +} + +func (x *QueryRoutingRulesResponse) Reset() { + *x = QueryRoutingRulesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_routing_v1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryRoutingRulesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryRoutingRulesResponse) ProtoMessage() {} + +// Deprecated: Use QueryRoutingRulesResponse.ProtoReflect.Descriptor instead. +func (*QueryRoutingRulesResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_routing_v1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryRoutingRulesResponse) GetRules() []string { + if x != nil { + return x.Rules + } + return nil +} + +var File_tibc_core_routing_v1_query_proto protoreflect.FileDescriptor + +var file_tibc_core_routing_v1_query_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x14, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x72, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1a, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x31, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x32, 0xab, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, + 0xa1, 0x01, 0x0a, 0x0c, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x2e, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x72, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2f, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x72, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x74, 0x69, 0x62, 0x63, + 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x42, 0xda, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x62, 0x63, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, + 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x69, 0x61, 0x6e, 0x6a, + 0x69, 0x65, 0x61, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x54, 0x43, 0x52, 0xaa, 0x02, 0x14, 0x54, 0x69, 0x62, 0x63, 0x2e, 0x43, 0x6f, 0x72, + 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x14, 0x54, + 0x69, 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x20, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, + 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x54, 0x69, 0x62, 0x63, 0x3a, 0x3a, 0x43, + 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tibc_core_routing_v1_query_proto_rawDescOnce sync.Once + file_tibc_core_routing_v1_query_proto_rawDescData = file_tibc_core_routing_v1_query_proto_rawDesc +) + +func file_tibc_core_routing_v1_query_proto_rawDescGZIP() []byte { + file_tibc_core_routing_v1_query_proto_rawDescOnce.Do(func() { + file_tibc_core_routing_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_tibc_core_routing_v1_query_proto_rawDescData) + }) + return file_tibc_core_routing_v1_query_proto_rawDescData +} + +var file_tibc_core_routing_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_tibc_core_routing_v1_query_proto_goTypes = []interface{}{ + (*QueryRoutingRulesRequest)(nil), // 0: tibc.core.routing.v1.QueryRoutingRulesRequest + (*QueryRoutingRulesResponse)(nil), // 1: tibc.core.routing.v1.QueryRoutingRulesResponse +} +var file_tibc_core_routing_v1_query_proto_depIdxs = []int32{ + 0, // 0: tibc.core.routing.v1.Query.RoutingRules:input_type -> tibc.core.routing.v1.QueryRoutingRulesRequest + 1, // 1: tibc.core.routing.v1.Query.RoutingRules:output_type -> tibc.core.routing.v1.QueryRoutingRulesResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_tibc_core_routing_v1_query_proto_init() } +func file_tibc_core_routing_v1_query_proto_init() { + if File_tibc_core_routing_v1_query_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_tibc_core_routing_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryRoutingRulesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_routing_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryRoutingRulesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_tibc_core_routing_v1_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_tibc_core_routing_v1_query_proto_goTypes, + DependencyIndexes: file_tibc_core_routing_v1_query_proto_depIdxs, + MessageInfos: file_tibc_core_routing_v1_query_proto_msgTypes, + }.Build() + File_tibc_core_routing_v1_query_proto = out.File + file_tibc_core_routing_v1_query_proto_rawDesc = nil + file_tibc_core_routing_v1_query_proto_goTypes = nil + file_tibc_core_routing_v1_query_proto_depIdxs = nil +} diff --git a/api/tibc/core/routing/v1/query_grpc.pb.go b/api/tibc/core/routing/v1/query_grpc.pb.go new file mode 100644 index 00000000..71e77b2e --- /dev/null +++ b/api/tibc/core/routing/v1/query_grpc.pb.go @@ -0,0 +1,127 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: tibc/core/routing/v1/query.proto + +package routingv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Query_RoutingRules_FullMethodName = "/tibc.core.routing.v1.Query/RoutingRules" +) + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Query provides defines the gRPC querier service +type QueryClient interface { + // RoutingRules queries all routing rules. + RoutingRules(ctx context.Context, in *QueryRoutingRulesRequest, opts ...grpc.CallOption) (*QueryRoutingRulesResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) RoutingRules(ctx context.Context, in *QueryRoutingRulesRequest, opts ...grpc.CallOption) (*QueryRoutingRulesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryRoutingRulesResponse) + err := c.cc.Invoke(ctx, Query_RoutingRules_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility. +// +// Query provides defines the gRPC querier service +type QueryServer interface { + // RoutingRules queries all routing rules. + RoutingRules(context.Context, *QueryRoutingRulesRequest) (*QueryRoutingRulesResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedQueryServer struct{} + +func (UnimplementedQueryServer) RoutingRules(context.Context, *QueryRoutingRulesRequest) (*QueryRoutingRulesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RoutingRules not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} +func (UnimplementedQueryServer) testEmbeddedByValue() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + // If the following call pancis, it indicates UnimplementedQueryServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_RoutingRules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRoutingRulesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).RoutingRules(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_RoutingRules_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).RoutingRules(ctx, req.(*QueryRoutingRulesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "tibc.core.routing.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RoutingRules", + Handler: _Query_RoutingRules_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "tibc/core/routing/v1/query.proto", +} diff --git a/api/tibc/core/routing/v1/routing.pulsar.go b/api/tibc/core/routing/v1/routing.pulsar.go new file mode 100644 index 00000000..d73ea30f --- /dev/null +++ b/api/tibc/core/routing/v1/routing.pulsar.go @@ -0,0 +1,785 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package routingv1 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_SetRoutingRulesProposal_3_list)(nil) + +type _SetRoutingRulesProposal_3_list struct { + list *[]string +} + +func (x *_SetRoutingRulesProposal_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_SetRoutingRulesProposal_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_SetRoutingRulesProposal_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_SetRoutingRulesProposal_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_SetRoutingRulesProposal_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message SetRoutingRulesProposal at list field Rules as it is not of Message kind")) +} + +func (x *_SetRoutingRulesProposal_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_SetRoutingRulesProposal_3_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_SetRoutingRulesProposal_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_SetRoutingRulesProposal protoreflect.MessageDescriptor + fd_SetRoutingRulesProposal_title protoreflect.FieldDescriptor + fd_SetRoutingRulesProposal_description protoreflect.FieldDescriptor + fd_SetRoutingRulesProposal_rules protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_routing_v1_routing_proto_init() + md_SetRoutingRulesProposal = File_tibc_core_routing_v1_routing_proto.Messages().ByName("SetRoutingRulesProposal") + fd_SetRoutingRulesProposal_title = md_SetRoutingRulesProposal.Fields().ByName("title") + fd_SetRoutingRulesProposal_description = md_SetRoutingRulesProposal.Fields().ByName("description") + fd_SetRoutingRulesProposal_rules = md_SetRoutingRulesProposal.Fields().ByName("rules") +} + +var _ protoreflect.Message = (*fastReflection_SetRoutingRulesProposal)(nil) + +type fastReflection_SetRoutingRulesProposal SetRoutingRulesProposal + +func (x *SetRoutingRulesProposal) ProtoReflect() protoreflect.Message { + return (*fastReflection_SetRoutingRulesProposal)(x) +} + +func (x *SetRoutingRulesProposal) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_routing_v1_routing_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_SetRoutingRulesProposal_messageType fastReflection_SetRoutingRulesProposal_messageType +var _ protoreflect.MessageType = fastReflection_SetRoutingRulesProposal_messageType{} + +type fastReflection_SetRoutingRulesProposal_messageType struct{} + +func (x fastReflection_SetRoutingRulesProposal_messageType) Zero() protoreflect.Message { + return (*fastReflection_SetRoutingRulesProposal)(nil) +} +func (x fastReflection_SetRoutingRulesProposal_messageType) New() protoreflect.Message { + return new(fastReflection_SetRoutingRulesProposal) +} +func (x fastReflection_SetRoutingRulesProposal_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SetRoutingRulesProposal +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_SetRoutingRulesProposal) Descriptor() protoreflect.MessageDescriptor { + return md_SetRoutingRulesProposal +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_SetRoutingRulesProposal) Type() protoreflect.MessageType { + return _fastReflection_SetRoutingRulesProposal_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_SetRoutingRulesProposal) New() protoreflect.Message { + return new(fastReflection_SetRoutingRulesProposal) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_SetRoutingRulesProposal) Interface() protoreflect.ProtoMessage { + return (*SetRoutingRulesProposal)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_SetRoutingRulesProposal) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_SetRoutingRulesProposal_title, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_SetRoutingRulesProposal_description, value) { + return + } + } + if len(x.Rules) != 0 { + value := protoreflect.ValueOfList(&_SetRoutingRulesProposal_3_list{list: &x.Rules}) + if !f(fd_SetRoutingRulesProposal_rules, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_SetRoutingRulesProposal) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.routing.v1.SetRoutingRulesProposal.title": + return x.Title != "" + case "tibc.core.routing.v1.SetRoutingRulesProposal.description": + return x.Description != "" + case "tibc.core.routing.v1.SetRoutingRulesProposal.rules": + return len(x.Rules) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.SetRoutingRulesProposal")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.SetRoutingRulesProposal does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_SetRoutingRulesProposal) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.routing.v1.SetRoutingRulesProposal.title": + x.Title = "" + case "tibc.core.routing.v1.SetRoutingRulesProposal.description": + x.Description = "" + case "tibc.core.routing.v1.SetRoutingRulesProposal.rules": + x.Rules = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.SetRoutingRulesProposal")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.SetRoutingRulesProposal does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_SetRoutingRulesProposal) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.routing.v1.SetRoutingRulesProposal.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "tibc.core.routing.v1.SetRoutingRulesProposal.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "tibc.core.routing.v1.SetRoutingRulesProposal.rules": + if len(x.Rules) == 0 { + return protoreflect.ValueOfList(&_SetRoutingRulesProposal_3_list{}) + } + listValue := &_SetRoutingRulesProposal_3_list{list: &x.Rules} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.SetRoutingRulesProposal")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.SetRoutingRulesProposal does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_SetRoutingRulesProposal) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.routing.v1.SetRoutingRulesProposal.title": + x.Title = value.Interface().(string) + case "tibc.core.routing.v1.SetRoutingRulesProposal.description": + x.Description = value.Interface().(string) + case "tibc.core.routing.v1.SetRoutingRulesProposal.rules": + lv := value.List() + clv := lv.(*_SetRoutingRulesProposal_3_list) + x.Rules = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.SetRoutingRulesProposal")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.SetRoutingRulesProposal does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_SetRoutingRulesProposal) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.routing.v1.SetRoutingRulesProposal.rules": + if x.Rules == nil { + x.Rules = []string{} + } + value := &_SetRoutingRulesProposal_3_list{list: &x.Rules} + return protoreflect.ValueOfList(value) + case "tibc.core.routing.v1.SetRoutingRulesProposal.title": + panic(fmt.Errorf("field title of message tibc.core.routing.v1.SetRoutingRulesProposal is not mutable")) + case "tibc.core.routing.v1.SetRoutingRulesProposal.description": + panic(fmt.Errorf("field description of message tibc.core.routing.v1.SetRoutingRulesProposal is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.SetRoutingRulesProposal")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.SetRoutingRulesProposal does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_SetRoutingRulesProposal) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.routing.v1.SetRoutingRulesProposal.title": + return protoreflect.ValueOfString("") + case "tibc.core.routing.v1.SetRoutingRulesProposal.description": + return protoreflect.ValueOfString("") + case "tibc.core.routing.v1.SetRoutingRulesProposal.rules": + list := []string{} + return protoreflect.ValueOfList(&_SetRoutingRulesProposal_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.SetRoutingRulesProposal")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.SetRoutingRulesProposal does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_SetRoutingRulesProposal) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.routing.v1.SetRoutingRulesProposal", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_SetRoutingRulesProposal) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_SetRoutingRulesProposal) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_SetRoutingRulesProposal) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_SetRoutingRulesProposal) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*SetRoutingRulesProposal) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Title) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Rules) > 0 { + for _, s := range x.Rules { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*SetRoutingRulesProposal) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Rules) > 0 { + for iNdEx := len(x.Rules) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Rules[iNdEx]) + copy(dAtA[i:], x.Rules[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Rules[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x12 + } + if len(x.Title) > 0 { + i -= len(x.Title) + copy(dAtA[i:], x.Title) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*SetRoutingRulesProposal) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SetRoutingRulesProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SetRoutingRulesProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Rules = append(x.Rules, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: tibc/core/routing/v1/routing.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// SetRoutingRulesProposal defines a proposal to set routing rules +type SetRoutingRulesProposal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the title of the update proposal + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // the description of the proposal + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // routing rules list + Rules []string `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"` +} + +func (x *SetRoutingRulesProposal) Reset() { + *x = SetRoutingRulesProposal{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_routing_v1_routing_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetRoutingRulesProposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetRoutingRulesProposal) ProtoMessage() {} + +// Deprecated: Use SetRoutingRulesProposal.ProtoReflect.Descriptor instead. +func (*SetRoutingRulesProposal) Descriptor() ([]byte, []int) { + return file_tibc_core_routing_v1_routing_proto_rawDescGZIP(), []int{0} +} + +func (x *SetRoutingRulesProposal) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *SetRoutingRulesProposal) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *SetRoutingRulesProposal) GetRules() []string { + if x != nil { + return x.Rules + } + return nil +} + +var File_tibc_core_routing_v1_routing_proto protoreflect.FileDescriptor + +var file_tibc_core_routing_v1_routing_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x6d, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x3a, 0x04, 0x88, 0xa0, 0x1f, 0x00, 0x42, + 0xdc, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x52, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x69, 0x61, 0x6e, 0x6a, 0x69, 0x65, + 0x61, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2d, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, + 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, + 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x54, 0x43, 0x52, 0xaa, 0x02, 0x14, 0x54, 0x69, 0x62, 0x63, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, + 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x14, 0x54, 0x69, 0x62, + 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x20, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x52, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x54, 0x69, 0x62, 0x63, 0x3a, 0x3a, 0x43, 0x6f, 0x72, + 0x65, 0x3a, 0x3a, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tibc_core_routing_v1_routing_proto_rawDescOnce sync.Once + file_tibc_core_routing_v1_routing_proto_rawDescData = file_tibc_core_routing_v1_routing_proto_rawDesc +) + +func file_tibc_core_routing_v1_routing_proto_rawDescGZIP() []byte { + file_tibc_core_routing_v1_routing_proto_rawDescOnce.Do(func() { + file_tibc_core_routing_v1_routing_proto_rawDescData = protoimpl.X.CompressGZIP(file_tibc_core_routing_v1_routing_proto_rawDescData) + }) + return file_tibc_core_routing_v1_routing_proto_rawDescData +} + +var file_tibc_core_routing_v1_routing_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_tibc_core_routing_v1_routing_proto_goTypes = []interface{}{ + (*SetRoutingRulesProposal)(nil), // 0: tibc.core.routing.v1.SetRoutingRulesProposal +} +var file_tibc_core_routing_v1_routing_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_tibc_core_routing_v1_routing_proto_init() } +func file_tibc_core_routing_v1_routing_proto_init() { + if File_tibc_core_routing_v1_routing_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_tibc_core_routing_v1_routing_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetRoutingRulesProposal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_tibc_core_routing_v1_routing_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_tibc_core_routing_v1_routing_proto_goTypes, + DependencyIndexes: file_tibc_core_routing_v1_routing_proto_depIdxs, + MessageInfos: file_tibc_core_routing_v1_routing_proto_msgTypes, + }.Build() + File_tibc_core_routing_v1_routing_proto = out.File + file_tibc_core_routing_v1_routing_proto_rawDesc = nil + file_tibc_core_routing_v1_routing_proto_goTypes = nil + file_tibc_core_routing_v1_routing_proto_depIdxs = nil +} diff --git a/api/tibc/core/routing/v1/tx.pulsar.go b/api/tibc/core/routing/v1/tx.pulsar.go new file mode 100644 index 00000000..5030169a --- /dev/null +++ b/api/tibc/core/routing/v1/tx.pulsar.go @@ -0,0 +1,1275 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package routingv1 + +import ( + _ "cosmossdk.io/api/cosmos/msg/v1" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_MsgSetRoutingRules_3_list)(nil) + +type _MsgSetRoutingRules_3_list struct { + list *[]string +} + +func (x *_MsgSetRoutingRules_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgSetRoutingRules_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_MsgSetRoutingRules_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgSetRoutingRules_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgSetRoutingRules_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgSetRoutingRules at list field Rules as it is not of Message kind")) +} + +func (x *_MsgSetRoutingRules_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgSetRoutingRules_3_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgSetRoutingRules_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgSetRoutingRules protoreflect.MessageDescriptor + fd_MsgSetRoutingRules_title protoreflect.FieldDescriptor + fd_MsgSetRoutingRules_description protoreflect.FieldDescriptor + fd_MsgSetRoutingRules_rules protoreflect.FieldDescriptor + fd_MsgSetRoutingRules_authority protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_routing_v1_tx_proto_init() + md_MsgSetRoutingRules = File_tibc_core_routing_v1_tx_proto.Messages().ByName("MsgSetRoutingRules") + fd_MsgSetRoutingRules_title = md_MsgSetRoutingRules.Fields().ByName("title") + fd_MsgSetRoutingRules_description = md_MsgSetRoutingRules.Fields().ByName("description") + fd_MsgSetRoutingRules_rules = md_MsgSetRoutingRules.Fields().ByName("rules") + fd_MsgSetRoutingRules_authority = md_MsgSetRoutingRules.Fields().ByName("authority") +} + +var _ protoreflect.Message = (*fastReflection_MsgSetRoutingRules)(nil) + +type fastReflection_MsgSetRoutingRules MsgSetRoutingRules + +func (x *MsgSetRoutingRules) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSetRoutingRules)(x) +} + +func (x *MsgSetRoutingRules) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_routing_v1_tx_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgSetRoutingRules_messageType fastReflection_MsgSetRoutingRules_messageType +var _ protoreflect.MessageType = fastReflection_MsgSetRoutingRules_messageType{} + +type fastReflection_MsgSetRoutingRules_messageType struct{} + +func (x fastReflection_MsgSetRoutingRules_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSetRoutingRules)(nil) +} +func (x fastReflection_MsgSetRoutingRules_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSetRoutingRules) +} +func (x fastReflection_MsgSetRoutingRules_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetRoutingRules +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSetRoutingRules) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetRoutingRules +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSetRoutingRules) Type() protoreflect.MessageType { + return _fastReflection_MsgSetRoutingRules_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSetRoutingRules) New() protoreflect.Message { + return new(fastReflection_MsgSetRoutingRules) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSetRoutingRules) Interface() protoreflect.ProtoMessage { + return (*MsgSetRoutingRules)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSetRoutingRules) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Title != "" { + value := protoreflect.ValueOfString(x.Title) + if !f(fd_MsgSetRoutingRules_title, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_MsgSetRoutingRules_description, value) { + return + } + } + if len(x.Rules) != 0 { + value := protoreflect.ValueOfList(&_MsgSetRoutingRules_3_list{list: &x.Rules}) + if !f(fd_MsgSetRoutingRules_rules, value) { + return + } + } + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgSetRoutingRules_authority, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSetRoutingRules) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.routing.v1.MsgSetRoutingRules.title": + return x.Title != "" + case "tibc.core.routing.v1.MsgSetRoutingRules.description": + return x.Description != "" + case "tibc.core.routing.v1.MsgSetRoutingRules.rules": + return len(x.Rules) != 0 + case "tibc.core.routing.v1.MsgSetRoutingRules.authority": + return x.Authority != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.MsgSetRoutingRules")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.MsgSetRoutingRules does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetRoutingRules) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.routing.v1.MsgSetRoutingRules.title": + x.Title = "" + case "tibc.core.routing.v1.MsgSetRoutingRules.description": + x.Description = "" + case "tibc.core.routing.v1.MsgSetRoutingRules.rules": + x.Rules = nil + case "tibc.core.routing.v1.MsgSetRoutingRules.authority": + x.Authority = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.MsgSetRoutingRules")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.MsgSetRoutingRules does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSetRoutingRules) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.routing.v1.MsgSetRoutingRules.title": + value := x.Title + return protoreflect.ValueOfString(value) + case "tibc.core.routing.v1.MsgSetRoutingRules.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "tibc.core.routing.v1.MsgSetRoutingRules.rules": + if len(x.Rules) == 0 { + return protoreflect.ValueOfList(&_MsgSetRoutingRules_3_list{}) + } + listValue := &_MsgSetRoutingRules_3_list{list: &x.Rules} + return protoreflect.ValueOfList(listValue) + case "tibc.core.routing.v1.MsgSetRoutingRules.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.MsgSetRoutingRules")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.MsgSetRoutingRules does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetRoutingRules) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.routing.v1.MsgSetRoutingRules.title": + x.Title = value.Interface().(string) + case "tibc.core.routing.v1.MsgSetRoutingRules.description": + x.Description = value.Interface().(string) + case "tibc.core.routing.v1.MsgSetRoutingRules.rules": + lv := value.List() + clv := lv.(*_MsgSetRoutingRules_3_list) + x.Rules = *clv.list + case "tibc.core.routing.v1.MsgSetRoutingRules.authority": + x.Authority = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.MsgSetRoutingRules")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.MsgSetRoutingRules does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetRoutingRules) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.routing.v1.MsgSetRoutingRules.rules": + if x.Rules == nil { + x.Rules = []string{} + } + value := &_MsgSetRoutingRules_3_list{list: &x.Rules} + return protoreflect.ValueOfList(value) + case "tibc.core.routing.v1.MsgSetRoutingRules.title": + panic(fmt.Errorf("field title of message tibc.core.routing.v1.MsgSetRoutingRules is not mutable")) + case "tibc.core.routing.v1.MsgSetRoutingRules.description": + panic(fmt.Errorf("field description of message tibc.core.routing.v1.MsgSetRoutingRules is not mutable")) + case "tibc.core.routing.v1.MsgSetRoutingRules.authority": + panic(fmt.Errorf("field authority of message tibc.core.routing.v1.MsgSetRoutingRules is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.MsgSetRoutingRules")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.MsgSetRoutingRules does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSetRoutingRules) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.routing.v1.MsgSetRoutingRules.title": + return protoreflect.ValueOfString("") + case "tibc.core.routing.v1.MsgSetRoutingRules.description": + return protoreflect.ValueOfString("") + case "tibc.core.routing.v1.MsgSetRoutingRules.rules": + list := []string{} + return protoreflect.ValueOfList(&_MsgSetRoutingRules_3_list{list: &list}) + case "tibc.core.routing.v1.MsgSetRoutingRules.authority": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.MsgSetRoutingRules")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.MsgSetRoutingRules does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSetRoutingRules) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.routing.v1.MsgSetRoutingRules", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSetRoutingRules) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetRoutingRules) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSetRoutingRules) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSetRoutingRules) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSetRoutingRules) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Title) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Rules) > 0 { + for _, s := range x.Rules { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSetRoutingRules) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0x22 + } + if len(x.Rules) > 0 { + for iNdEx := len(x.Rules) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Rules[iNdEx]) + copy(dAtA[i:], x.Rules[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Rules[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x12 + } + if len(x.Title) > 0 { + i -= len(x.Title) + copy(dAtA[i:], x.Title) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Title))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSetRoutingRules) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetRoutingRules: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetRoutingRules: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Rules = append(x.Rules, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgSetRoutingRulesResponse protoreflect.MessageDescriptor +) + +func init() { + file_tibc_core_routing_v1_tx_proto_init() + md_MsgSetRoutingRulesResponse = File_tibc_core_routing_v1_tx_proto.Messages().ByName("MsgSetRoutingRulesResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgSetRoutingRulesResponse)(nil) + +type fastReflection_MsgSetRoutingRulesResponse MsgSetRoutingRulesResponse + +func (x *MsgSetRoutingRulesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSetRoutingRulesResponse)(x) +} + +func (x *MsgSetRoutingRulesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_routing_v1_tx_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgSetRoutingRulesResponse_messageType fastReflection_MsgSetRoutingRulesResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgSetRoutingRulesResponse_messageType{} + +type fastReflection_MsgSetRoutingRulesResponse_messageType struct{} + +func (x fastReflection_MsgSetRoutingRulesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSetRoutingRulesResponse)(nil) +} +func (x fastReflection_MsgSetRoutingRulesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSetRoutingRulesResponse) +} +func (x fastReflection_MsgSetRoutingRulesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetRoutingRulesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSetRoutingRulesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetRoutingRulesResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSetRoutingRulesResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgSetRoutingRulesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSetRoutingRulesResponse) New() protoreflect.Message { + return new(fastReflection_MsgSetRoutingRulesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSetRoutingRulesResponse) Interface() protoreflect.ProtoMessage { + return (*MsgSetRoutingRulesResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSetRoutingRulesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSetRoutingRulesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.MsgSetRoutingRulesResponse")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.MsgSetRoutingRulesResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetRoutingRulesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.MsgSetRoutingRulesResponse")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.MsgSetRoutingRulesResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSetRoutingRulesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.MsgSetRoutingRulesResponse")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.MsgSetRoutingRulesResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetRoutingRulesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.MsgSetRoutingRulesResponse")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.MsgSetRoutingRulesResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetRoutingRulesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.MsgSetRoutingRulesResponse")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.MsgSetRoutingRulesResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSetRoutingRulesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.routing.v1.MsgSetRoutingRulesResponse")) + } + panic(fmt.Errorf("message tibc.core.routing.v1.MsgSetRoutingRulesResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSetRoutingRulesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.routing.v1.MsgSetRoutingRulesResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSetRoutingRulesResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetRoutingRulesResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSetRoutingRulesResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSetRoutingRulesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSetRoutingRulesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSetRoutingRulesResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSetRoutingRulesResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetRoutingRulesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetRoutingRulesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: tibc/core/routing/v1/tx.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// MsgSetRoutingRules defines a proposal to set routing rules +type MsgSetRoutingRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // the title of the update proposal + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // the description of the proposal + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // routing rules list + Rules []string `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"` + // authority is the address that controls the module (defaults to x/gov unless + // overwritten). + Authority string `protobuf:"bytes,4,opt,name=authority,proto3" json:"authority,omitempty"` +} + +func (x *MsgSetRoutingRules) Reset() { + *x = MsgSetRoutingRules{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_routing_v1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSetRoutingRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSetRoutingRules) ProtoMessage() {} + +// Deprecated: Use MsgSetRoutingRules.ProtoReflect.Descriptor instead. +func (*MsgSetRoutingRules) Descriptor() ([]byte, []int) { + return file_tibc_core_routing_v1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgSetRoutingRules) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *MsgSetRoutingRules) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *MsgSetRoutingRules) GetRules() []string { + if x != nil { + return x.Rules + } + return nil +} + +func (x *MsgSetRoutingRules) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +// MsgSetRoutingRulesResponse defines the Msg/SetRoutingRules response type. +type MsgSetRoutingRulesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgSetRoutingRulesResponse) Reset() { + *x = MsgSetRoutingRulesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_routing_v1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSetRoutingRulesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSetRoutingRulesResponse) ProtoMessage() {} + +// Deprecated: Use MsgSetRoutingRulesResponse.ProtoReflect.Descriptor instead. +func (*MsgSetRoutingRulesResponse) Descriptor() ([]byte, []int) { + return file_tibc_core_routing_v1_tx_proto_rawDescGZIP(), []int{1} +} + +var File_tibc_core_routing_v1_tx_proto protoreflect.FileDescriptor + +var file_tibc_core_routing_v1_tx_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x14, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xae, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, + 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x12, 0x88, 0xa0, + 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x7b, + 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x6d, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, + 0x65, 0x73, 0x1a, 0x30, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x72, + 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, + 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xd7, 0x01, 0x0a, 0x18, + 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x72, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x62, 0x69, 0x61, 0x6e, 0x6a, 0x69, 0x65, 0x61, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2d, 0x67, + 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x43, 0x52, 0xaa, 0x02, 0x14, 0x54, 0x69, 0x62, + 0x63, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x14, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x52, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x20, 0x54, 0x69, 0x62, 0x63, 0x5c, + 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x54, 0x69, + 0x62, 0x63, 0x3a, 0x3a, 0x43, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tibc_core_routing_v1_tx_proto_rawDescOnce sync.Once + file_tibc_core_routing_v1_tx_proto_rawDescData = file_tibc_core_routing_v1_tx_proto_rawDesc +) + +func file_tibc_core_routing_v1_tx_proto_rawDescGZIP() []byte { + file_tibc_core_routing_v1_tx_proto_rawDescOnce.Do(func() { + file_tibc_core_routing_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_tibc_core_routing_v1_tx_proto_rawDescData) + }) + return file_tibc_core_routing_v1_tx_proto_rawDescData +} + +var file_tibc_core_routing_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_tibc_core_routing_v1_tx_proto_goTypes = []interface{}{ + (*MsgSetRoutingRules)(nil), // 0: tibc.core.routing.v1.MsgSetRoutingRules + (*MsgSetRoutingRulesResponse)(nil), // 1: tibc.core.routing.v1.MsgSetRoutingRulesResponse +} +var file_tibc_core_routing_v1_tx_proto_depIdxs = []int32{ + 0, // 0: tibc.core.routing.v1.Msg.SetRoutingRules:input_type -> tibc.core.routing.v1.MsgSetRoutingRules + 1, // 1: tibc.core.routing.v1.Msg.SetRoutingRules:output_type -> tibc.core.routing.v1.MsgSetRoutingRulesResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_tibc_core_routing_v1_tx_proto_init() } +func file_tibc_core_routing_v1_tx_proto_init() { + if File_tibc_core_routing_v1_tx_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_tibc_core_routing_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSetRoutingRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tibc_core_routing_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSetRoutingRulesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_tibc_core_routing_v1_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_tibc_core_routing_v1_tx_proto_goTypes, + DependencyIndexes: file_tibc_core_routing_v1_tx_proto_depIdxs, + MessageInfos: file_tibc_core_routing_v1_tx_proto_msgTypes, + }.Build() + File_tibc_core_routing_v1_tx_proto = out.File + file_tibc_core_routing_v1_tx_proto_rawDesc = nil + file_tibc_core_routing_v1_tx_proto_goTypes = nil + file_tibc_core_routing_v1_tx_proto_depIdxs = nil +} diff --git a/api/tibc/core/routing/v1/tx_grpc.pb.go b/api/tibc/core/routing/v1/tx_grpc.pb.go new file mode 100644 index 00000000..2cdf7ad9 --- /dev/null +++ b/api/tibc/core/routing/v1/tx_grpc.pb.go @@ -0,0 +1,127 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: tibc/core/routing/v1/tx.proto + +package routingv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Msg_SetRoutingRules_FullMethodName = "/tibc.core.routing.v1.Msg/SetRoutingRules" +) + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Msg defines the tibc/routing Msg service. +type MsgClient interface { + // SetRoutingRules defines a rpc handler method for MsgSetRoutingRules. + SetRoutingRules(ctx context.Context, in *MsgSetRoutingRules, opts ...grpc.CallOption) (*MsgSetRoutingRulesResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) SetRoutingRules(ctx context.Context, in *MsgSetRoutingRules, opts ...grpc.CallOption) (*MsgSetRoutingRulesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgSetRoutingRulesResponse) + err := c.cc.Invoke(ctx, Msg_SetRoutingRules_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility. +// +// Msg defines the tibc/routing Msg service. +type MsgServer interface { + // SetRoutingRules defines a rpc handler method for MsgSetRoutingRules. + SetRoutingRules(context.Context, *MsgSetRoutingRules) (*MsgSetRoutingRulesResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedMsgServer struct{} + +func (UnimplementedMsgServer) SetRoutingRules(context.Context, *MsgSetRoutingRules) (*MsgSetRoutingRulesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetRoutingRules not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} +func (UnimplementedMsgServer) testEmbeddedByValue() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + // If the following call pancis, it indicates UnimplementedMsgServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_SetRoutingRules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSetRoutingRules) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SetRoutingRules(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_SetRoutingRules_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SetRoutingRules(ctx, req.(*MsgSetRoutingRules)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "tibc.core.routing.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SetRoutingRules", + Handler: _Msg_SetRoutingRules_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "tibc/core/routing/v1/tx.proto", +} diff --git a/api/tibc/core/types/v1/genesis.pulsar.go b/api/tibc/core/types/v1/genesis.pulsar.go new file mode 100644 index 00000000..c406246f --- /dev/null +++ b/api/tibc/core/types/v1/genesis.pulsar.go @@ -0,0 +1,798 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package typesv1 + +import ( + fmt "fmt" + v1 "github.com/bianjieai/tibc-go/api/tibc/core/client/v1" + v11 "github.com/bianjieai/tibc-go/api/tibc/core/packet/v1" + v12 "github.com/bianjieai/tibc-go/api/tibc/core/routing/v1" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_client_genesis protoreflect.FieldDescriptor + fd_GenesisState_packet_genesis protoreflect.FieldDescriptor + fd_GenesisState_routing_genesis protoreflect.FieldDescriptor +) + +func init() { + file_tibc_core_types_v1_genesis_proto_init() + md_GenesisState = File_tibc_core_types_v1_genesis_proto.Messages().ByName("GenesisState") + fd_GenesisState_client_genesis = md_GenesisState.Fields().ByName("client_genesis") + fd_GenesisState_packet_genesis = md_GenesisState.Fields().ByName("packet_genesis") + fd_GenesisState_routing_genesis = md_GenesisState.Fields().ByName("routing_genesis") +} + +var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) + +type fastReflection_GenesisState GenesisState + +func (x *GenesisState) ProtoReflect() protoreflect.Message { + return (*fastReflection_GenesisState)(x) +} + +func (x *GenesisState) slowProtoReflect() protoreflect.Message { + mi := &file_tibc_core_types_v1_genesis_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType +var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} + +type fastReflection_GenesisState_messageType struct{} + +func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { + return (*fastReflection_GenesisState)(nil) +} +func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} +func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { + return _fastReflection_GenesisState_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GenesisState) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { + return (*GenesisState)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ClientGenesis != nil { + value := protoreflect.ValueOfMessage(x.ClientGenesis.ProtoReflect()) + if !f(fd_GenesisState_client_genesis, value) { + return + } + } + if x.PacketGenesis != nil { + value := protoreflect.ValueOfMessage(x.PacketGenesis.ProtoReflect()) + if !f(fd_GenesisState_packet_genesis, value) { + return + } + } + if x.RoutingGenesis != nil { + value := protoreflect.ValueOfMessage(x.RoutingGenesis.ProtoReflect()) + if !f(fd_GenesisState_routing_genesis, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "tibc.core.types.v1.GenesisState.client_genesis": + return x.ClientGenesis != nil + case "tibc.core.types.v1.GenesisState.packet_genesis": + return x.PacketGenesis != nil + case "tibc.core.types.v1.GenesisState.routing_genesis": + return x.RoutingGenesis != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.types.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.types.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "tibc.core.types.v1.GenesisState.client_genesis": + x.ClientGenesis = nil + case "tibc.core.types.v1.GenesisState.packet_genesis": + x.PacketGenesis = nil + case "tibc.core.types.v1.GenesisState.routing_genesis": + x.RoutingGenesis = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.types.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.types.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "tibc.core.types.v1.GenesisState.client_genesis": + value := x.ClientGenesis + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.types.v1.GenesisState.packet_genesis": + value := x.PacketGenesis + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "tibc.core.types.v1.GenesisState.routing_genesis": + value := x.RoutingGenesis + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.types.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.types.v1.GenesisState does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "tibc.core.types.v1.GenesisState.client_genesis": + x.ClientGenesis = value.Message().Interface().(*v1.GenesisState) + case "tibc.core.types.v1.GenesisState.packet_genesis": + x.PacketGenesis = value.Message().Interface().(*v11.GenesisState) + case "tibc.core.types.v1.GenesisState.routing_genesis": + x.RoutingGenesis = value.Message().Interface().(*v12.GenesisState) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.types.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.types.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.types.v1.GenesisState.client_genesis": + if x.ClientGenesis == nil { + x.ClientGenesis = new(v1.GenesisState) + } + return protoreflect.ValueOfMessage(x.ClientGenesis.ProtoReflect()) + case "tibc.core.types.v1.GenesisState.packet_genesis": + if x.PacketGenesis == nil { + x.PacketGenesis = new(v11.GenesisState) + } + return protoreflect.ValueOfMessage(x.PacketGenesis.ProtoReflect()) + case "tibc.core.types.v1.GenesisState.routing_genesis": + if x.RoutingGenesis == nil { + x.RoutingGenesis = new(v12.GenesisState) + } + return protoreflect.ValueOfMessage(x.RoutingGenesis.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.types.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.types.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "tibc.core.types.v1.GenesisState.client_genesis": + m := new(v1.GenesisState) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.types.v1.GenesisState.packet_genesis": + m := new(v11.GenesisState) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "tibc.core.types.v1.GenesisState.routing_genesis": + m := new(v12.GenesisState) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: tibc.core.types.v1.GenesisState")) + } + panic(fmt.Errorf("message tibc.core.types.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in tibc.core.types.v1.GenesisState", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_GenesisState) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.ClientGenesis != nil { + l = options.Size(x.ClientGenesis) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.PacketGenesis != nil { + l = options.Size(x.PacketGenesis) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.RoutingGenesis != nil { + l = options.Size(x.RoutingGenesis) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.RoutingGenesis != nil { + encoded, err := options.Marshal(x.RoutingGenesis) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if x.PacketGenesis != nil { + encoded, err := options.Marshal(x.PacketGenesis) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.ClientGenesis != nil { + encoded, err := options.Marshal(x.ClientGenesis) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClientGenesis", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ClientGenesis == nil { + x.ClientGenesis = &v1.GenesisState{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ClientGenesis); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PacketGenesis", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.PacketGenesis == nil { + x.PacketGenesis = &v11.GenesisState{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PacketGenesis); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RoutingGenesis", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.RoutingGenesis == nil { + x.RoutingGenesis = &v12.GenesisState{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RoutingGenesis); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: tibc/core/types/v1/genesis.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// GenesisState defines the tibc module's genesis state. +type GenesisState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // TICS002 - Clients genesis state + ClientGenesis *v1.GenesisState `protobuf:"bytes,1,opt,name=client_genesis,json=clientGenesis,proto3" json:"client_genesis,omitempty"` + // TICS004 - Packet genesis state + PacketGenesis *v11.GenesisState `protobuf:"bytes,3,opt,name=packet_genesis,json=packetGenesis,proto3" json:"packet_genesis,omitempty"` + // TICS026 - Routing genesis state + RoutingGenesis *v12.GenesisState `protobuf:"bytes,4,opt,name=routing_genesis,json=routingGenesis,proto3" json:"routing_genesis,omitempty"` +} + +func (x *GenesisState) Reset() { + *x = GenesisState{} + if protoimpl.UnsafeEnabled { + mi := &file_tibc_core_types_v1_genesis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenesisState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenesisState) ProtoMessage() {} + +// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. +func (*GenesisState) Descriptor() ([]byte, []int) { + return file_tibc_core_types_v1_genesis_proto_rawDescGZIP(), []int{0} +} + +func (x *GenesisState) GetClientGenesis() *v1.GenesisState { + if x != nil { + return x.ClientGenesis + } + return nil +} + +func (x *GenesisState) GetPacketGenesis() *v11.GenesisState { + if x != nil { + return x.PacketGenesis + } + return nil +} + +func (x *GenesisState) GetRoutingGenesis() *v12.GenesisState { + if x != nil { + return x.RoutingGenesis + } + return nil +} + +var File_tibc_core_types_v1_genesis_proto protoreflect.FileDescriptor + +var file_tibc_core_types_v1_genesis_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x12, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x74, 0x69, + 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, + 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x21, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x22, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x72, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x02, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, + 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x67, 0x0a, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x21, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, + 0x3a, 0x22, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x22, 0x52, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x12, 0x67, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x73, + 0x69, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x1d, 0xc8, 0xde, 0x1f, + 0x00, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x22, 0x52, 0x0d, 0x70, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x12, 0x6b, 0x0a, 0x0f, 0x72, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x72, + 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, + 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x1e, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x16, + 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x65, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x22, 0x52, 0x0e, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x47, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x42, 0xce, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x74, + 0x69, 0x62, 0x63, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x69, + 0x61, 0x6e, 0x6a, 0x69, 0x65, 0x61, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2d, 0x67, 0x6f, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x74, 0x69, 0x62, 0x63, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x54, 0x43, 0x54, 0xaa, 0x02, 0x12, 0x54, 0x69, 0x62, 0x63, 0x2e, 0x43, 0x6f, 0x72, 0x65, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x54, 0x69, 0x62, 0x63, + 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, + 0x1e, 0x54, 0x69, 0x62, 0x63, 0x5c, 0x43, 0x6f, 0x72, 0x65, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x15, 0x54, 0x69, 0x62, 0x63, 0x3a, 0x3a, 0x43, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_tibc_core_types_v1_genesis_proto_rawDescOnce sync.Once + file_tibc_core_types_v1_genesis_proto_rawDescData = file_tibc_core_types_v1_genesis_proto_rawDesc +) + +func file_tibc_core_types_v1_genesis_proto_rawDescGZIP() []byte { + file_tibc_core_types_v1_genesis_proto_rawDescOnce.Do(func() { + file_tibc_core_types_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_tibc_core_types_v1_genesis_proto_rawDescData) + }) + return file_tibc_core_types_v1_genesis_proto_rawDescData +} + +var file_tibc_core_types_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_tibc_core_types_v1_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: tibc.core.types.v1.GenesisState + (*v1.GenesisState)(nil), // 1: tibc.core.client.v1.GenesisState + (*v11.GenesisState)(nil), // 2: tibc.core.packet.v1.GenesisState + (*v12.GenesisState)(nil), // 3: tibc.core.routing.v1.GenesisState +} +var file_tibc_core_types_v1_genesis_proto_depIdxs = []int32{ + 1, // 0: tibc.core.types.v1.GenesisState.client_genesis:type_name -> tibc.core.client.v1.GenesisState + 2, // 1: tibc.core.types.v1.GenesisState.packet_genesis:type_name -> tibc.core.packet.v1.GenesisState + 3, // 2: tibc.core.types.v1.GenesisState.routing_genesis:type_name -> tibc.core.routing.v1.GenesisState + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_tibc_core_types_v1_genesis_proto_init() } +func file_tibc_core_types_v1_genesis_proto_init() { + if File_tibc_core_types_v1_genesis_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_tibc_core_types_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenesisState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_tibc_core_types_v1_genesis_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_tibc_core_types_v1_genesis_proto_goTypes, + DependencyIndexes: file_tibc_core_types_v1_genesis_proto_depIdxs, + MessageInfos: file_tibc_core_types_v1_genesis_proto_msgTypes, + }.Build() + File_tibc_core_types_v1_genesis_proto = out.File + file_tibc_core_types_v1_genesis_proto_rawDesc = nil + file_tibc_core_types_v1_genesis_proto_goTypes = nil + file_tibc_core_types_v1_genesis_proto_depIdxs = nil +} diff --git a/go.mod b/go.mod index e94531b1..d3eff45b 100644 --- a/go.mod +++ b/go.mod @@ -1,98 +1,106 @@ module github.com/bianjieai/tibc-go -go 1.18 +go 1.21 require ( - cosmossdk.io/api v0.3.1 - cosmossdk.io/core v0.5.1 - cosmossdk.io/depinject v1.0.0-alpha.4 - github.com/cometbft/cometbft v0.37.4 - github.com/cometbft/cometbft-db v0.7.0 - github.com/cosmos/cosmos-proto v1.0.0-beta.4 - github.com/cosmos/cosmos-sdk v0.47.9 - github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/ics23/go v0.10.0 - google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 - mods.irisnet.org/modules/mt v0.0.0-20240703035959-5248ff27f9d7 - mods.irisnet.org/modules/nft v0.0.0-20240703035959-5248ff27f9d7 + cosmossdk.io/api v0.7.5 + cosmossdk.io/core v0.11.1 + cosmossdk.io/depinject v1.0.0 + cosmossdk.io/errors v1.0.1 + cosmossdk.io/log v1.4.1 + cosmossdk.io/store v1.1.1 + cosmossdk.io/x/evidence v0.1.1 + cosmossdk.io/x/feegrant v0.1.1 + cosmossdk.io/x/tx v0.13.5 + cosmossdk.io/x/upgrade v0.1.4 + github.com/cometbft/cometbft v0.38.12 + github.com/cometbft/cometbft-db v0.11.0 + github.com/cosmos/cosmos-db v1.0.2 + github.com/cosmos/cosmos-proto v1.0.0-beta.5 + github.com/cosmos/cosmos-sdk v0.50.10 + github.com/cosmos/gogoproto v1.7.0 + github.com/cosmos/ics23/go v0.11.0 + github.com/hashicorp/go-metrics v0.5.3 + google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 + mods.irisnet.org/modules/mt v0.0.0-20241202072418-ae2ffd0c842e + mods.irisnet.org/modules/nft v0.0.0-20241202072418-ae2ffd0c842e ) require ( - cosmossdk.io/math v1.2.0 + cosmossdk.io/math v1.3.0 github.com/OneOfOne/xxhash v1.2.5 // indirect - github.com/armon/go-metrics v0.4.1 github.com/edsrzf/mmap-go v1.0.0 github.com/ethereum/go-ethereum v1.10.17 - github.com/golang/protobuf v1.5.3 - github.com/gorilla/mux v1.8.0 + github.com/golang/protobuf v1.5.4 + github.com/gorilla/mux v1.8.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d + github.com/hashicorp/golang-lru v1.0.2 github.com/pkg/errors v0.9.1 - github.com/rakyll/statik v0.1.7 - github.com/spf13/cast v1.5.0 - github.com/spf13/cobra v1.6.1 + github.com/spf13/cast v1.6.0 + github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.14.0 // indirect - github.com/stretchr/testify v1.8.4 - golang.org/x/crypto v0.16.0 - google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 // indirect - google.golang.org/grpc v1.60.1 - google.golang.org/protobuf v1.32.0 + github.com/spf13/viper v1.19.0 // indirect + github.com/stretchr/testify v1.9.0 + golang.org/x/crypto v0.26.0 + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/grpc v1.64.1 + google.golang.org/protobuf v1.34.2 ) require ( - cloud.google.com/go v0.111.0 // indirect - cloud.google.com/go/compute v1.23.3 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.5 // indirect - cloud.google.com/go/storage v1.30.1 // indirect - cosmossdk.io/errors v1.0.1 // indirect - cosmossdk.io/log v1.3.1 // indirect - cosmossdk.io/tools/rosetta v0.2.1 // indirect + cloud.google.com/go v0.112.1 // indirect + cloud.google.com/go/compute/metadata v0.3.0 // indirect + cloud.google.com/go/iam v1.1.6 // indirect + cloud.google.com/go/storage v1.38.0 // indirect + cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/x/nft v0.1.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect - github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect + github.com/DataDog/datadog-go v3.2.0+incompatible // indirect + github.com/DataDog/zstd v1.5.5 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/VictoriaMetrics/fastcache v1.6.0 // indirect - github.com/aws/aws-sdk-go v1.44.203 // indirect + github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/bits-and-blooms/bitset v1.8.0 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect - github.com/cockroachdb/errors v1.10.0 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/pebble v1.1.1 // indirect github.com/cockroachdb/redact v1.1.5 // indirect - github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect - github.com/confio/ics23/go v0.9.0 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v0.20.1 // indirect - github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect - github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect - github.com/creachadair/taskgroup v0.3.2 // indirect + github.com/cosmos/iavl v1.2.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/deckarep/golang-set v1.8.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.23.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect + github.com/fatih/color v1.15.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-stack/stack v1.8.0 // indirect @@ -100,7 +108,7 @@ require ( github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.2 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.4 // indirect @@ -108,69 +116,73 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/s2a-go v0.1.7 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect + github.com/googleapis/gax-go/v2 v2.12.3 // indirect github.com/gorilla/handlers v1.5.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect - github.com/gtank/merlin v0.1.1 // indirect - github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.1 // indirect + github.com/hashicorp/go-getter v1.7.4 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/uint256 v1.2.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.7 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/magiconair/properties v1.8.6 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect + github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect + github.com/oklog/run v1.1.0 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.7 // indirect - github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.20.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/prometheus/tsdb v0.7.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/rs/cors v1.8.2 // indirect - github.com/rs/zerolog v1.32.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/rs/zerolog v1.33.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect - github.com/spf13/afero v1.9.2 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/subosito/gotenv v1.4.1 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect github.com/tidwall/gjson v1.14.4 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect @@ -179,27 +191,30 @@ require ( github.com/ulikunitz/xz v0.5.11 // indirect github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // indirect - go.etcd.io/bbolt v1.3.7 // indirect + go.etcd.io/bbolt v1.3.10 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect - golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/oauth2 v0.13.0 // indirect - golang.org/x/sync v0.4.0 // indirect - golang.org/x/sys v0.16.0 // indirect - golang.org/x/term v0.15.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/api v0.149.0 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + golang.org/x/time v0.5.0 // indirect + google.golang.org/api v0.171.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - mods.irisnet.org/api v0.0.0-20240628054110-4cb043e0238a // indirect + gotest.tools/v3 v3.5.1 // indirect + mods.irisnet.org/api v0.0.0-20241118093307-345265846e1d // indirect nhooyr.io/websocket v1.8.6 // indirect pgregory.net/rapid v1.1.0 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index 4eebbba7..8387490a 100644 --- a/go.sum +++ b/go.sum @@ -4,7 +4,6 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -18,7 +17,6 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= @@ -34,8 +32,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.111.0 h1:YHLKNupSD1KqjDbQ3+LVdQ81h/UJbJyZG203cEfnQgM= -cloud.google.com/go v0.111.0/go.mod h1:0mibmpKP1TyOOFYQY5izo0LnT+ecvOQ0Sg3OdmMiNRU= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -73,10 +71,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -114,8 +110,8 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= -cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= @@ -173,12 +169,11 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= -cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= +cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -191,26 +186,35 @@ cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuW cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= -cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= -cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= -cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= -cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= -cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= -cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ= +cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.1 h1:h9WfBey7NAiFfIcUhDVNS503I2P2HdZLebJlUIs8LPA= +cosmossdk.io/core v0.11.1/go.mod h1:OJzxcdC+RPrgGF8NJZR2uoQr56tc7gfBKhiKeDO7hH0= +cosmossdk.io/depinject v1.0.0 h1:dQaTu6+O6askNXO06+jyeUAnF2/ssKwrrszP9t5q050= +cosmossdk.io/depinject v1.0.0/go.mod h1:zxK/h3HgHoA/eJVtiSsoaRaRA2D5U4cJ5thIG4ssbB8= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= -cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= -cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= -cosmossdk.io/math v1.2.0 h1:8gudhTkkD3NxOP2YyyJIYYmt6dQ55ZfJkDOaxXpy7Ig= -cosmossdk.io/math v1.2.0/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= -cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= -cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y= +cosmossdk.io/store v1.1.1/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= +cosmossdk.io/x/evidence v0.1.1 h1:Ks+BLTa3uftFpElLTDp9L76t2b58htjVbSZ86aoK/E4= +cosmossdk.io/x/evidence v0.1.1/go.mod h1:OoDsWlbtuyqS70LY51aX8FBTvguQqvFrt78qL7UzeNc= +cosmossdk.io/x/feegrant v0.1.1 h1:EKFWOeo/pup0yF0svDisWWKAA9Zags6Zd0P3nRvVvw8= +cosmossdk.io/x/feegrant v0.1.1/go.mod h1:2GjVVxX6G2fta8LWj7pC/ytHjryA6MHAJroBWHFNiEQ= +cosmossdk.io/x/nft v0.1.1 h1:pslAVS8P5NkW080+LWOamInjDcq+v2GSCo+BjN9sxZ8= +cosmossdk.io/x/nft v0.1.1/go.mod h1:Kac6F6y2gsKvoxU+fy8uvxRTi4BIhLOor2zgCNQwVgY= +cosmossdk.io/x/tx v0.13.5 h1:FdnU+MdmFWn1pTsbfU0OCf2u6mJ8cqc1H4OMG418MLw= +cosmossdk.io/x/tx v0.13.5/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= +cosmossdk.io/x/upgrade v0.1.4 h1:/BWJim24QHoXde8Bc64/2BSEB6W4eTydq0X/2f8+g38= +cosmossdk.io/x/upgrade v0.1.4/go.mod h1:9v0Aj+fs97O+Ztw+tG3/tp5JSlrmT7IcFhAebQHmOPo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw= -git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9/go.mod h1:BVJwbDfVjCjoFiKrhkei6NdGcZYpkDkdyCdg1ukytRA= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= @@ -218,17 +222,20 @@ github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwR github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= -github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.5 h1:zl/OfRA6nftbBK9qTohYBJ5xvw6C/oNKizR7cZGl3cI= github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= @@ -241,9 +248,8 @@ github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= -github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -261,15 +267,13 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= -github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= +github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= @@ -280,6 +284,7 @@ github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7 github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -289,34 +294,20 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= -github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.21.0-beta.0.20201114000516-e9c7a5ac6401/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs= -github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= -github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= github.com/btcsuite/btcd/btcec/v2 v2.1.2/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= -github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= -github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= -github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= -github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= -github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= -github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= -github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= @@ -329,8 +320,8 @@ github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= @@ -356,28 +347,31 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= +github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= -github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/pebble v1.1.1 h1:XnKU22oiCLy2Xn8vp1re67cXg4SAasg/WDt1NtcRFaw= +github.com/cockroachdb/pebble v1.1.1/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= -github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= -github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= -github.com/cometbft/cometbft v0.37.4 h1:xyvvEqlyfK8MgNIIKVJaMsuIp03wxOcFmVkT26+Ikpg= -github.com/cometbft/cometbft v0.37.4/go.mod h1:Cmg5Hp4sNpapm7j+x0xRyt2g0juQfmB752ous+pA0G8= -github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= -github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= -github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= -github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= +github.com/cometbft/cometbft v0.38.12 h1:OWsLZN2KcSSFe8bet9xCn07VwhBnavPea3VyPnNq1bg= +github.com/cometbft/cometbft v0.38.12/go.mod h1:GPHp3/pehPqgX1930HmK1BpBLZPxB75v/dZg8Viwy+o= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= -github.com/consensys/bavard v0.1.8-0.20210915155054-088da2f7f54a/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= -github.com/consensys/gnark-crypto v0.5.3/go.mod h1:hOdPlWQV1gDLp7faZVeg8Y0iEPFaOUnCc4XeCCk96p0= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -386,49 +380,46 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU= -github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= -github.com/cosmos/cosmos-sdk v0.47.9 h1:D51VLkF59D53PMLsbNtp6JyWR+6MbetFyomrH88+y08= -github.com/cosmos/cosmos-sdk v0.47.9/go.mod h1:cmAawe8FV/52oPKbgeHLt4UpNkrNu8R5KD+kw0kxJFc= -github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.50.10 h1:zXfeu/z653tWZARr/jESzAEiCUYjgJwwG4ytnYWMoDM= +github.com/cosmos/cosmos-sdk v0.50.10/go.mod h1:6Eesrx3ZE7vxBZWpK++30H+Uc7Q4ahQWCL7JKU/LEdU= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= -github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw= -github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M= -github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= -github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.2.0 h1:kVxTmjTh4k0Dh1VNL046v6BXqKziqMDzxo93oh3kOfM= +github.com/cosmos/iavl v1.2.0/go.mod h1:HidWWLVAtODJqFD6Hbne2Y0q3SdxByJepHUOeoH4LiI= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= -github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= -github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= -github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= @@ -436,7 +427,6 @@ github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFM github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= @@ -450,7 +440,9 @@ github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/ github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -465,6 +457,8 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -478,39 +472,42 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go. github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ethereum/go-ethereum v1.10.17 h1:XEcumY+qSr1cZQaWsQs5Kck3FHB0V2RiMHPdTBJ+oT8= github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= -github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= -github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= -github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -519,16 +516,17 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= @@ -540,10 +538,13 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= @@ -576,8 +577,8 @@ github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzw github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -612,8 +613,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -645,12 +646,14 @@ github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -662,7 +665,6 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -673,12 +675,11 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= @@ -693,10 +694,9 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= +github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= @@ -708,24 +708,19 @@ github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB7 github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= -github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= -github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -734,13 +729,19 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= -github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.4 h1:3yQjWuxICvSpYwqSayAdKRFcvBl1y/vogCxczWSmix0= +github.com/hashicorp/go-getter v1.7.4/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -748,22 +749,28 @@ github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoD github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= @@ -778,13 +785,15 @@ github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXM github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v1.0.3-0.20220313090229-ca81a64b4204/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= @@ -799,9 +808,8 @@ github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mq github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= -github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -811,13 +819,13 @@ github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= @@ -831,20 +839,18 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -854,24 +860,25 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= @@ -882,6 +889,7 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -902,12 +910,7 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -922,7 +925,6 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= @@ -932,10 +934,13 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -949,13 +954,16 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= @@ -968,17 +976,20 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= +github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -989,6 +1000,7 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= @@ -996,30 +1008,29 @@ github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144T github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.7 h1:muncTPStnKRos5dpVKULv2FVd4bMOhNePj9CjgDb8Us= -github.com/pelletier/go-toml/v2 v2.0.7/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= -github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -1027,16 +1038,16 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= +github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -1045,20 +1056,18 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= -github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -1068,23 +1077,26 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= -github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= -github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= @@ -1096,33 +1108,34 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU= -github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1130,8 +1143,9 @@ github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5J github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1143,28 +1157,24 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= -github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= -github.com/tidwall/gjson v1.12.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/gjson v1.14.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tidwall/sjson v1.2.4/go.mod h1:098SZ494YoMWPmMO6ct4dcFnqxwj9r/gF0Etp19pSNM= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= @@ -1175,12 +1185,12 @@ github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hM github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -1190,13 +1200,10 @@ github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/X github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= -github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1208,8 +1215,8 @@ github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWp github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= -go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= +go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1222,48 +1229,51 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= -go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= +go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1278,8 +1288,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1307,8 +1317,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1351,7 +1361,6 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -1361,7 +1370,6 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1374,8 +1382,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1401,8 +1409,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= -golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1417,8 +1425,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1482,7 +1490,6 @@ golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1491,7 +1498,6 @@ golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1504,7 +1510,8 @@ golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1524,19 +1531,18 @@ golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1546,16 +1552,17 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1579,6 +1586,7 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1614,7 +1622,6 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -1622,7 +1629,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1630,8 +1638,9 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= @@ -1687,8 +1696,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.149.0 h1:b2CqT6kG+zqJIVKRQ3ELJVLN1PwHZ6DJ3dW8yl82rgY= -google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= +google.golang.org/api v0.171.0 h1:w174hnBPqut76FzW5Qaupt7zY8Kql6fiVjgys4f58sU= +google.golang.org/api v0.171.0/go.mod h1:Hnq5AHm4OTMt2BUVjael2CWZFD6vksJdWCWiUAmjC9o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1697,8 +1706,6 @@ google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1739,10 +1746,8 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1809,12 +1814,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 h1:nz5NESFLZbJGPFxDT/HCn+V1mZ8JGNoY4nUpmW/Y2eg= -google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917/go.mod h1:pZqR+glSb11aJ+JQcczCvgf47+duRuzNSKqE8YAQnV0= -google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 h1:s1w3X6gQxwrLEpxnLd/qXTVLgQE2yXwaOaoa6IlY/+o= -google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0/go.mod h1:CAny0tYF+0/9rmDB9fahA9YLzX3+AEVl1qXbv5hhj6c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 h1:gphdwh0npgs8elJ4T6J+DQJHPVF7RsuJHCfwztUb4J4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 h1:RFiFrvy37/mpSpdySBDrUdipW/dHwsRwh3J3+A9VgT4= +google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go.mod h1:Z5Iiy3jtmioajWHDGFk7CeugTyHtPvMHA4UTmUkyalE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 h1:SbSDUWW1PAO24TNpLdeheoYPd7kllICcLU52x6eD4kQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1856,8 +1861,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= -google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= +google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= +google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1874,8 +1879,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1912,9 +1917,9 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1924,13 +1929,14 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -mods.irisnet.org/api v0.0.0-20240628054110-4cb043e0238a h1:/MLyi/CV2TrCVtGREoSpeLpXZvCgIUfbe3vqy8Lo/k4= -mods.irisnet.org/api v0.0.0-20240628054110-4cb043e0238a/go.mod h1:TpMaRRYSpqsXdeX4gDVFRj9ggedQ60Zcjs4iE2DIhsc= -mods.irisnet.org/modules/mt v0.0.0-20240703035959-5248ff27f9d7 h1:vtdjX/s9i74BCzNxc1gmuOrRqBOfv3HhEqDHdsCpYIk= -mods.irisnet.org/modules/mt v0.0.0-20240703035959-5248ff27f9d7/go.mod h1:5x3w5k27g0Y9vIeh8DzcRVJMngnENelt2p/mKv4l0vg= -mods.irisnet.org/modules/nft v0.0.0-20240703035959-5248ff27f9d7 h1:vIoff6KxFmZjn0vUh+aeST/a7UT31N1OOAJHJPifREI= -mods.irisnet.org/modules/nft v0.0.0-20240703035959-5248ff27f9d7/go.mod h1:XfSo9X+EHlYLsW1S3OW2hn4XagVbWcRwxH3W6yIPyoI= -mods.irisnet.org/simapp v0.0.0-20240628054110-4cb043e0238a h1:zjb4v3bQSgSXZtW0+Xh8vOqBcgEjfxJrTh4l5AsaX/8= +mods.irisnet.org/api v0.0.0-20241118093307-345265846e1d h1:O9WkEH5ydPGg32YL+fVQr5MFOuYqjZFdIekTpiWU7bg= +mods.irisnet.org/api v0.0.0-20241118093307-345265846e1d/go.mod h1:TpMaRRYSpqsXdeX4gDVFRj9ggedQ60Zcjs4iE2DIhsc= +mods.irisnet.org/modules/mt v0.0.0-20241202072418-ae2ffd0c842e h1:+kL2d61TIA6hvX30ZDOSYaOKl+xbHMmItOtXUFH8igQ= +mods.irisnet.org/modules/mt v0.0.0-20241202072418-ae2ffd0c842e/go.mod h1:Dw1zm350HiRuNjrnwZnV4XGB8PNf1SXmjGJA5Xslg0Q= +mods.irisnet.org/modules/nft v0.0.0-20241202072418-ae2ffd0c842e h1:XjtU54H7iHopFpI2pGqp7ZK1UUCjNgq5Tsyiq0mob6E= +mods.irisnet.org/modules/nft v0.0.0-20241202072418-ae2ffd0c842e/go.mod h1:VjySqJfECBW8cApFB8W66Yk6tMR2oJEc7FTDaHfeg8I= +mods.irisnet.org/simapp v0.0.0-20241118093307-345265846e1d h1:rZjX7uXO6xGZgZIj3xnMkiGik1VXZRFqceR11rZb5pw= +mods.irisnet.org/simapp v0.0.0-20241118093307-345265846e1d/go.mod h1:t7FSQJkJOgXq1/LdhpBeOu7TS8hLQkAMMx9fL5w53PY= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= @@ -1939,8 +1945,7 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/modules/tibc/apps/mt_transfer/depinject.go b/modules/tibc/apps/mt_transfer/depinject.go index 3ca7b223..5576d3bb 100644 --- a/modules/tibc/apps/mt_transfer/depinject.go +++ b/modules/tibc/apps/mt_transfer/depinject.go @@ -3,8 +3,8 @@ package mttransfer import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" + store "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - store "github.com/cosmos/cosmos-sdk/store/types" modulev1 "github.com/bianjieai/tibc-go/api/tibc/apps/mt_transfer/module/v1" "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer/keeper" diff --git a/modules/tibc/apps/mt_transfer/handler.go b/modules/tibc/apps/mt_transfer/handler.go deleted file mode 100644 index 84c16556..00000000 --- a/modules/tibc/apps/mt_transfer/handler.go +++ /dev/null @@ -1,25 +0,0 @@ -package mttransfer - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer/keeper" - mttransfertypes "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer/types" -) - -// NewHandler defines the TIBC mt transfer handler -func NewHandler(k keeper.Keeper) sdk.Handler { - return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - ctx = ctx.WithEventManager(sdk.NewEventManager()) - - switch msg := msg.(type) { - case *mttransfertypes.MsgMtTransfer: - res, err := k.MtTransfer(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) - - default: - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized TIBC message type: %T", msg) - } - } -} diff --git a/modules/tibc/apps/mt_transfer/keeper/grpc_query.go b/modules/tibc/apps/mt_transfer/keeper/grpc_query.go index d5f5ea7e..ce3f4a60 100644 --- a/modules/tibc/apps/mt_transfer/keeper/grpc_query.go +++ b/modules/tibc/apps/mt_transfer/keeper/grpc_query.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/cosmos/cosmos-sdk/store/prefix" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -32,7 +32,7 @@ func (q Keeper) ClassTrace(c context.Context, req *types.QueryClassTraceRequest) if !found { return nil, status.Error( codes.NotFound, - sdkerrors.Wrap(types.ErrTraceNotFound, req.Hash).Error(), + errorsmod.Wrap(types.ErrTraceNotFound, req.Hash).Error(), ) } diff --git a/modules/tibc/apps/mt_transfer/keeper/keeper.go b/modules/tibc/apps/mt_transfer/keeper/keeper.go index ff3df944..9a6eb3a9 100644 --- a/modules/tibc/apps/mt_transfer/keeper/keeper.go +++ b/modules/tibc/apps/mt_transfer/keeper/keeper.go @@ -1,12 +1,11 @@ package keeper import ( - "github.com/cometbft/cometbft/libs/log" - + "cosmossdk.io/log" + "cosmossdk.io/store/prefix" + storetypes "cosmossdk.io/store/types" tmbytes "github.com/cometbft/cometbft/libs/bytes" "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/store/prefix" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer/types" diff --git a/modules/tibc/apps/mt_transfer/keeper/relay.go b/modules/tibc/apps/mt_transfer/keeper/relay.go index d036562d..57b0ee38 100644 --- a/modules/tibc/apps/mt_transfer/keeper/relay.go +++ b/modules/tibc/apps/mt_transfer/keeper/relay.go @@ -4,11 +4,11 @@ import ( "strconv" "strings" - "github.com/armon/go-metrics" "github.com/cosmos/cosmos-sdk/telemetry" + "github.com/hashicorp/go-metrics" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer/types" packetType "github.com/bianjieai/tibc-go/modules/tibc/core/04-packet/types" @@ -24,6 +24,16 @@ const ( DELIMITER = "/" ) +// SendMtTransfer is a wrapper function for sending a mt transfer packet. +// +// The function determines whether the mt is sent from the source chain or sent back to the source chain from other chains. +// If awayFromOrigin is true, the mt is sent from the source chain to other chains. +// If awayFromOrigin is false, the mt is sent from other chains to the source chain. +// +// The function will lock the mt and send a packet if awayFromOrigin is true. +// If awayFromOrigin is false, the function will burn the mt. +// +// The function will return an error if the mt class is invalid, the mt is invalid, the sender is invalid, or the packet fails to send. func (k Keeper) SendMtTransfer( ctx sdk.Context, class, id string, @@ -36,17 +46,17 @@ func (k Keeper) SendMtTransfer( ) error { _, found := k.mk.GetDenom(ctx, class) if !found { - return sdkerrors.Wrapf(types.ErrInvalidDenom, "class %s not existed ", class) + return errorsmod.Wrapf(types.ErrInvalidDenom, "class %s not existed ", class) } mt, err := k.mk.GetMT(ctx, class, id) if err != nil { - return sdkerrors.Wrapf(types.ErrUnknownNFT, "invalid mt %s from class %s", id, class) + return errorsmod.Wrapf(types.ErrUnknownNFT, "invalid mt %s from class %s", id, class) } sourceChain := k.ck.GetChainName(ctx) if sourceChain == destChain { - return sdkerrors.Wrapf(types.ErrScChainEqualToDestChain, "invalid destChain %s equals to scChain %s", destChain, sourceChain) + return errorsmod.Wrapf(types.ErrScChainEqualToDestChain, "invalid destChain %s equals to scChain %s", destChain, sourceChain) } fullClassPath := class @@ -179,7 +189,7 @@ func (k Keeper) OnRecvPacket(ctx sdk.Context, packet packetType.Packet, data typ labels = append(labels, telemetry.NewLabel(coretypes.LabelSource, "false")) if !strings.HasPrefix(data.Class, CLASSPATHPREFIX) { - return sdkerrors.Wrapf(types.ErrInvalidDenom, "class has no prefix: %s", data.Class) + return errorsmod.Wrapf(types.ErrInvalidDenom, "class has no prefix: %s", data.Class) } newClassPath = k.getBackNewClassPath(data.Class) @@ -337,12 +347,12 @@ func (k Keeper) ClassPathFromHash(ctx sdk.Context, class string) (string, error) hash, err := types.ParseHexHash(hexHash) if err != nil { - return "", sdkerrors.Wrap(types.ErrInvalidDenom, err.Error()) + return "", errorsmod.Wrap(types.ErrInvalidDenom, err.Error()) } denomTrace, found := k.GetClassTrace(ctx, hash) if !found { - return "", sdkerrors.Wrap(types.ErrTraceNotFound, hexHash) + return "", errorsmod.Wrap(types.ErrTraceNotFound, hexHash) } fullDenomPath := denomTrace.GetFullClassPath() diff --git a/modules/tibc/apps/mt_transfer/moudle.go b/modules/tibc/apps/mt_transfer/moudle.go index aa663630..5ea20fbb 100644 --- a/modules/tibc/apps/mt_transfer/moudle.go +++ b/modules/tibc/apps/mt_transfer/moudle.go @@ -3,14 +3,12 @@ package mttransfer import ( "context" "encoding/hex" - "encoding/json" "fmt" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/cometbft/cometbft/abci/types" - + errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -34,23 +32,12 @@ var ( // AppModuleBasic is the TIBC mt Transfer AppModuleBasic type AppModuleBasic struct{} -func (a AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return nil -} - -func (a AppModuleBasic) ValidateGenesis( - jsonCodec codec.JSONCodec, - config client.TxEncodingConfig, - message json.RawMessage, -) error { - return nil -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the tibc-mt-transfer module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { _ = types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) } +// GetTxCmd returns the root tx command for the tibc-mt-transfer module. func (a AppModuleBasic) GetTxCmd() *cobra.Command { return cli.NewTxCmd() } @@ -60,6 +47,7 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command { return cli.GetQueryCmd() } +// Name returns the name of the module. func (a AppModuleBasic) Name() string { return types.ModuleName } @@ -87,20 +75,6 @@ func NewAppModule(k keeper.Keeper) AppModule { } } -func (a AppModule) InitGenesis( - ctx sdk.Context, - cdc codec.JSONCodec, - data json.RawMessage, -) []abci.ValidatorUpdate { - return nil -} - -func (a AppModule) ExportGenesis(context sdk.Context, jsonCodec codec.JSONCodec) json.RawMessage { - return nil -} - -func (a AppModule) RegisterInvariants(registry sdk.InvariantRegistry) {} - // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), am.keeper) @@ -110,22 +84,19 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // ConsensusVersion implements AppModule/ConsensusVersion. func (am AppModule) ConsensusVersion() uint64 { return 1 } -// BeginBlock implements the AppModule interface -func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) {} - -// EndBlock implements the AppModule interface -func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} -func (a AppModule) OnRecvPacket( +// OnRecvPacket implements the TIBCModule interface. +// It processes the incoming packet from counterparty chain using the Keeper.OnRecvPacket method. +// It emits an event with the packet data and acknowledgement status. +// It returns the acknowledgement bytes and error. +func (am AppModule) OnRecvPacket( ctx sdk.Context, packet packettypes.Packet, ) (*sdk.Result, []byte, error) { var data types.MultiTokenPacketData if err := data.Unmarshal(packet.GetData()); err != nil { - return nil, nil, sdkerrors.Wrapf( + return nil, nil, errorsmod.Wrapf( sdkerrors.ErrUnknownRequest, "cannot unmarshal TICS-30 nft-transfer packet data: %s", err.Error(), @@ -134,7 +105,7 @@ func (a AppModule) OnRecvPacket( acknowledgement := packettypes.NewResultAcknowledgement([]byte{byte(1)}) - err := a.keeper.OnRecvPacket(ctx, packet, data) + err := am.keeper.OnRecvPacket(ctx, packet, data) if err != nil { acknowledgement = packettypes.NewErrorAcknowledgement(err.Error()) } @@ -158,14 +129,16 @@ func (a AppModule) OnRecvPacket( }, acknowledgement.GetBytes(), nil } -func (a AppModule) OnAcknowledgementPacket( +// OnAcknowledgementPacket implements the TIBCModule interface. +// It processes the acknowledgement that the counterparty chain sends back in response to a packet that was sent by this chain. +func (am AppModule) OnAcknowledgementPacket( ctx sdk.Context, packet packettypes.Packet, acknowledgement []byte, ) (*sdk.Result, error) { var ack packettypes.Acknowledgement if err := ack.Unmarshal(acknowledgement); err != nil { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( sdkerrors.ErrUnknownRequest, "cannot unmarshal TICS-30 transfer packet acknowledgement: %v", err, @@ -173,14 +146,14 @@ func (a AppModule) OnAcknowledgementPacket( } var data types.MultiTokenPacketData if err := data.Unmarshal(packet.GetData()); err != nil { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( sdkerrors.ErrUnknownRequest, "cannot unmarshal TICS-30 transfer packet data: %s", err.Error(), ) } - if err := a.keeper.OnAcknowledgementPacket(ctx, data, ack); err != nil { + if err := am.keeper.OnAcknowledgementPacket(ctx, data, ack); err != nil { return nil, err } diff --git a/modules/tibc/apps/mt_transfer/transfer_test.go b/modules/tibc/apps/mt_transfer/transfer_test.go index 9bdef728..6e2021c8 100644 --- a/modules/tibc/apps/mt_transfer/transfer_test.go +++ b/modules/tibc/apps/mt_transfer/transfer_test.go @@ -55,7 +55,9 @@ func (suite *TransferTestSuite) TestHandleMsgTransfer() { "mobile-name", "", suite.chainA.SenderAccount.GetAddress().String(), ) - _, _ = suite.chainA.SendMsgs(issueDenomMsg) + res, err := suite.chainA.SendMsgs(issueDenomMsg) + suite.Require().NoError(err, "issue denom failed") + suite.Require().EqualValues(0, res.Code, "issue denom failed") // mint mt mintMtMsg := mttypes.NewMsgMintMT( @@ -63,7 +65,9 @@ func (suite *TransferTestSuite) TestHandleMsgTransfer() { suite.chainA.SenderAccount.GetAddress().String(), suite.chainA.SenderAccount.GetAddress().String(), ) - _, _ = suite.chainA.SendMsgs(mintMtMsg) + res, err = suite.chainA.SendMsgs(mintMtMsg) + suite.Require().NoError(err, "mint mt failed") + suite.Require().EqualValues(0, res.Code, "mint mt failed") dd, has := suite.chainA.App.MtKeeper.GetDenom(suite.chainA.GetContext(), ClassID) suite.Require().Truef(has, "denom %s not found", ClassID) @@ -76,7 +80,7 @@ func (suite *TransferTestSuite) TestHandleMsgTransfer() { suite.chainB.ChainName, "", "0xabcsda", 1, ) - _, err := suite.chainA.SendMsgs(msg) + _, err = suite.chainA.SendMsgs(msg) suite.Require().NoError(err) // message committed //// relay send multiTokenPacketData := types.NewMultiTokenPacketData( diff --git a/modules/tibc/apps/mt_transfer/types/errors.go b/modules/tibc/apps/mt_transfer/types/errors.go index f4e4dfea..250b37ea 100644 --- a/modules/tibc/apps/mt_transfer/types/errors.go +++ b/modules/tibc/apps/mt_transfer/types/errors.go @@ -1,13 +1,13 @@ package types import ( - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + errorsmod "cosmossdk.io/errors" ) var ( - ErrInvalidDenom = sdkerrors.Register(ModuleName, 2, "invalid denom") - ErrUnknownNFT = sdkerrors.Register(ModuleName, 3, "unknown mt") - ErrScChainEqualToDestChain = sdkerrors.Register(ModuleName, 4, "source chain equals to destination chain") - ErrTraceNotFound = sdkerrors.Register(ModuleName, 5, "class trace not found") - ErrInvalidAmount = sdkerrors.Register(ModuleName, 6, "the amount must be greater than 0") + ErrInvalidDenom = errorsmod.Register(ModuleName, 2, "invalid denom") + ErrUnknownNFT = errorsmod.Register(ModuleName, 3, "unknown mt") + ErrScChainEqualToDestChain = errorsmod.Register(ModuleName, 4, "source chain equals to destination chain") + ErrTraceNotFound = errorsmod.Register(ModuleName, 5, "class trace not found") + ErrInvalidAmount = errorsmod.Register(ModuleName, 6, "the amount must be greater than 0") ) diff --git a/modules/tibc/apps/mt_transfer/types/packet.go b/modules/tibc/apps/mt_transfer/types/packet.go index 8bd42caf..84fa2161 100644 --- a/modules/tibc/apps/mt_transfer/types/packet.go +++ b/modules/tibc/apps/mt_transfer/types/packet.go @@ -3,6 +3,7 @@ package types import ( "strings" + errorsmod "cosmossdk.io/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -29,10 +30,10 @@ func NewMultiTokenPacketData( // formats defined by their corresponding chains that are not known to TIBC. func (mtpd MultiTokenPacketData) ValidateBasic() error { if strings.TrimSpace(mtpd.Sender) == "" { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "sender address cannot be blank") + return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "sender address cannot be blank") } if strings.TrimSpace(mtpd.Receiver) == "" { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "receiver address cannot be blank") + return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "receiver address cannot be blank") } if mtpd.Amount <= 0 { return ErrInvalidAmount diff --git a/modules/tibc/apps/mt_transfer/types/tx.pb.go b/modules/tibc/apps/mt_transfer/types/tx.pb.go index c0b9cb4e..1b5045f7 100644 --- a/modules/tibc/apps/mt_transfer/types/tx.pb.go +++ b/modules/tibc/apps/mt_transfer/types/tx.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -28,6 +29,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// MsgMtTransfer defines the Msg/MtTransfer request type. type MsgMtTransfer struct { // the class to which the mt to be transferred belongs Class string `protobuf:"bytes,1,opt,name=class,proto3" json:"class,omitempty"` @@ -125,30 +127,32 @@ func init() { func init() { proto.RegisterFile("tibc/apps/mt_transfer/v1/tx.proto", fileDescriptor_2978e16e5405f501) } var fileDescriptor_2978e16e5405f501 = []byte{ - // 362 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xbd, 0x4e, 0xeb, 0x30, - 0x18, 0x86, 0x93, 0xfe, 0x9d, 0xf6, 0x3b, 0xed, 0x19, 0xac, 0x1e, 0xb0, 0x2a, 0x91, 0xfe, 0x30, - 0xd0, 0x85, 0x58, 0x85, 0x8d, 0x09, 0xc1, 0xdc, 0xa5, 0x62, 0xea, 0x52, 0x39, 0x89, 0x9b, 0x1a, - 0x35, 0x71, 0x64, 0xbb, 0x15, 0xbd, 0x03, 0x46, 0x2e, 0xa1, 0x97, 0xc3, 0xd8, 0x91, 0x11, 0xb5, - 0x0b, 0x33, 0x57, 0x80, 0xe2, 0x04, 0xd4, 0x4a, 0x20, 0xb1, 0xe5, 0x7d, 0xbe, 0x47, 0x6f, 0x92, - 0xcf, 0x86, 0xae, 0xe6, 0x9e, 0x4f, 0x68, 0x92, 0x28, 0x12, 0xe9, 0x89, 0x96, 0x34, 0x56, 0x53, - 0x26, 0xc9, 0x72, 0x40, 0xf4, 0x83, 0x9b, 0x48, 0xa1, 0x05, 0xc2, 0xa9, 0xe2, 0xa6, 0x8a, 0xbb, - 0xa7, 0xb8, 0xcb, 0x41, 0xab, 0x19, 0x8a, 0x50, 0x18, 0x89, 0xa4, 0x4f, 0x99, 0xdf, 0x7b, 0xb7, - 0xa1, 0x31, 0x54, 0xe1, 0x50, 0xdf, 0xe5, 0x2a, 0x6a, 0x42, 0xd9, 0x9f, 0x53, 0xa5, 0xb0, 0xdd, - 0xb1, 0xfb, 0xb5, 0x51, 0x16, 0xd0, 0x3f, 0x28, 0xf0, 0x00, 0x17, 0x0c, 0x2a, 0xf0, 0x00, 0x1d, - 0x41, 0x45, 0xb1, 0x38, 0x60, 0x12, 0x17, 0x0d, 0xcb, 0x13, 0x6a, 0x41, 0x55, 0x32, 0x9f, 0xf1, - 0x25, 0x93, 0xb8, 0x64, 0x26, 0x5f, 0x19, 0x9d, 0x00, 0x04, 0x4c, 0xe9, 0x89, 0x3f, 0xa3, 0x3c, - 0xc6, 0x65, 0x33, 0xad, 0xa5, 0xe4, 0x36, 0x05, 0xa8, 0x0b, 0x75, 0xc9, 0xe8, 0x9c, 0xae, 0x72, - 0xa1, 0x62, 0x84, 0xbf, 0x19, 0xcb, 0x94, 0x53, 0x68, 0x64, 0x0d, 0x22, 0xd6, 0x92, 0xfa, 0x1a, - 0xff, 0x31, 0x4e, 0xdd, 0x94, 0xe4, 0x2c, 0xfd, 0x34, 0x1a, 0x89, 0x45, 0xac, 0x71, 0xb5, 0x63, - 0xf7, 0x4b, 0xa3, 0x3c, 0x5d, 0x55, 0x1f, 0xd7, 0x6d, 0xeb, 0x6d, 0xdd, 0xb6, 0x7a, 0xc7, 0xf0, - 0xff, 0xe0, 0x9f, 0x47, 0x4c, 0x25, 0x22, 0x56, 0xec, 0x22, 0x82, 0xe2, 0x50, 0x85, 0x68, 0x0a, - 0xb0, 0xb7, 0x90, 0x33, 0xf7, 0xa7, 0x9d, 0xba, 0x07, 0x2d, 0x2d, 0xf2, 0x4b, 0xf1, 0xf3, 0x75, - 0x37, 0xe3, 0xe7, 0xad, 0x63, 0x6f, 0xb6, 0x8e, 0xfd, 0xba, 0x75, 0xec, 0xa7, 0x9d, 0x63, 0x6d, - 0x76, 0x8e, 0xf5, 0xb2, 0x73, 0xac, 0xf1, 0x75, 0xc8, 0xf5, 0x6c, 0xe1, 0xb9, 0xbe, 0x88, 0x88, - 0xc7, 0x69, 0x7c, 0xcf, 0x19, 0xe5, 0x24, 0xad, 0x3f, 0x0f, 0x05, 0x89, 0x44, 0xb0, 0x98, 0x33, - 0x45, 0xbe, 0xbf, 0x0e, 0x7a, 0x95, 0x30, 0xe5, 0x55, 0xcc, 0xf9, 0x5e, 0x7e, 0x04, 0x00, 0x00, - 0xff, 0xff, 0x1d, 0x0a, 0xa5, 0x3c, 0x34, 0x02, 0x00, 0x00, + // 395 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xb1, 0x8e, 0x13, 0x31, + 0x10, 0x86, 0xd7, 0xb9, 0x4b, 0xb8, 0x33, 0x77, 0x14, 0xe6, 0xe0, 0xac, 0x95, 0xd8, 0x4b, 0x42, + 0x41, 0x14, 0x89, 0xb5, 0x02, 0x1d, 0x15, 0x82, 0x3a, 0x4d, 0x44, 0x95, 0x26, 0xf2, 0xee, 0x3a, + 0x8e, 0x51, 0x76, 0xbd, 0xf2, 0x38, 0x11, 0xe9, 0x10, 0x15, 0x25, 0x8f, 0x90, 0x47, 0xc8, 0x63, + 0x50, 0xa6, 0xa4, 0x44, 0x49, 0x11, 0x5e, 0x02, 0x09, 0xd9, 0xbb, 0xa0, 0x44, 0x02, 0x89, 0xce, + 0xff, 0x3f, 0x9f, 0xfe, 0x19, 0x8f, 0x8d, 0x3b, 0x56, 0x25, 0x29, 0xe3, 0x65, 0x09, 0x2c, 0xb7, + 0x13, 0x6b, 0x78, 0x01, 0x53, 0x61, 0xd8, 0x72, 0xc0, 0xec, 0x87, 0xb8, 0x34, 0xda, 0x6a, 0x42, + 0x1d, 0x12, 0x3b, 0x24, 0x3e, 0x42, 0xe2, 0xe5, 0x20, 0xbc, 0x91, 0x5a, 0x6a, 0x0f, 0x31, 0x77, + 0xaa, 0xf8, 0xf0, 0x36, 0xd5, 0x90, 0x6b, 0x60, 0x39, 0x48, 0x97, 0x93, 0x83, 0xac, 0x0a, 0xdd, + 0x9f, 0x08, 0x5f, 0x0f, 0x41, 0x0e, 0xed, 0xbb, 0x3a, 0x83, 0xdc, 0xe0, 0x66, 0x3a, 0xe7, 0x00, + 0x14, 0xb5, 0x51, 0xef, 0x72, 0x54, 0x09, 0xf2, 0x00, 0x37, 0x54, 0x46, 0x1b, 0xde, 0x6a, 0xa8, + 0x8c, 0x3c, 0xc6, 0x2d, 0x10, 0x45, 0x26, 0x0c, 0x3d, 0xf3, 0x5e, 0xad, 0x48, 0x88, 0x2f, 0x8c, + 0x48, 0x85, 0x5a, 0x0a, 0x43, 0xcf, 0x7d, 0xe5, 0x8f, 0x26, 0x4f, 0x30, 0xce, 0x04, 0xd8, 0x49, + 0x3a, 0xe3, 0xaa, 0xa0, 0x4d, 0x5f, 0xbd, 0x74, 0xce, 0x5b, 0x67, 0x90, 0x0e, 0xbe, 0x32, 0x82, + 0xcf, 0xf9, 0xaa, 0x06, 0x5a, 0x1e, 0xb8, 0x5f, 0x79, 0x15, 0xf2, 0x14, 0x5f, 0x57, 0x09, 0xba, + 0xb0, 0x86, 0xa7, 0x96, 0xde, 0xf3, 0xcc, 0x95, 0x0f, 0xa9, 0x3d, 0x37, 0x1a, 0xcf, 0xf5, 0xa2, + 0xb0, 0xf4, 0xa2, 0x8d, 0x7a, 0xe7, 0xa3, 0x5a, 0xbd, 0x7a, 0xf8, 0x79, 0x7d, 0x17, 0xfc, 0x58, + 0xdf, 0x05, 0x9f, 0x0e, 0x9b, 0x7e, 0x3d, 0x6f, 0xf7, 0x16, 0x3f, 0x3a, 0xb9, 0xfe, 0x48, 0x40, + 0xa9, 0x0b, 0x10, 0x2f, 0x2c, 0x3e, 0x1b, 0x82, 0x24, 0x53, 0x8c, 0x8f, 0x76, 0xf3, 0x2c, 0xfe, + 0xd7, 0xde, 0xe3, 0x93, 0x94, 0x90, 0xfd, 0x27, 0xf8, 0xbb, 0x5d, 0xd8, 0xfc, 0x78, 0xd8, 0xf4, + 0xd1, 0x9b, 0xf1, 0xd7, 0x5d, 0x84, 0xb6, 0xbb, 0x08, 0x7d, 0xdf, 0x45, 0xe8, 0xcb, 0x3e, 0x0a, + 0xb6, 0xfb, 0x28, 0xf8, 0xb6, 0x8f, 0x82, 0xf1, 0x6b, 0xa9, 0xec, 0x6c, 0x91, 0xc4, 0xa9, 0xce, + 0x59, 0xa2, 0x78, 0xf1, 0x5e, 0x09, 0xae, 0x98, 0xeb, 0xf2, 0x5c, 0x6a, 0x96, 0xeb, 0x6c, 0x31, + 0x17, 0xc0, 0xfe, 0xfe, 0x73, 0xec, 0xaa, 0x14, 0x90, 0xb4, 0xfc, 0x8b, 0xbf, 0xfc, 0x15, 0x00, + 0x00, 0xff, 0xff, 0xd8, 0xba, 0x6c, 0xbc, 0x5f, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/tibc/apps/nft_transfer/depinject.go b/modules/tibc/apps/nft_transfer/depinject.go index e0983dd0..1ba7000e 100644 --- a/modules/tibc/apps/nft_transfer/depinject.go +++ b/modules/tibc/apps/nft_transfer/depinject.go @@ -3,8 +3,8 @@ package nfttransfer import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" + store "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - store "github.com/cosmos/cosmos-sdk/store/types" modulev1 "github.com/bianjieai/tibc-go/api/tibc/apps/nft_transfer/module/v1" "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/keeper" diff --git a/modules/tibc/apps/nft_transfer/handler.go b/modules/tibc/apps/nft_transfer/handler.go deleted file mode 100644 index 7b263ccc..00000000 --- a/modules/tibc/apps/nft_transfer/handler.go +++ /dev/null @@ -1,25 +0,0 @@ -package nfttransfer - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/keeper" - nfttransfertypes "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/types" -) - -// NewHandler defines the TIBC nft transfer handler -func NewHandler(k keeper.Keeper) sdk.Handler { - return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - ctx = ctx.WithEventManager(sdk.NewEventManager()) - - switch msg := msg.(type) { - case *nfttransfertypes.MsgNftTransfer: - res, err := k.NftTransfer(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) - - default: - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized TIBC message type: %T", msg) - } - } -} diff --git a/modules/tibc/apps/nft_transfer/keeper/grpc_query.go b/modules/tibc/apps/nft_transfer/keeper/grpc_query.go index 571272ba..d8625a0b 100644 --- a/modules/tibc/apps/nft_transfer/keeper/grpc_query.go +++ b/modules/tibc/apps/nft_transfer/keeper/grpc_query.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/cosmos/cosmos-sdk/store/prefix" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -32,7 +32,7 @@ func (q Keeper) ClassTrace(c context.Context, req *types.QueryClassTraceRequest) if !found { return nil, status.Error( codes.NotFound, - sdkerrors.Wrap(types.ErrTraceNotFound, req.Hash).Error(), + errorsmod.Wrap(types.ErrTraceNotFound, req.Hash).Error(), ) } diff --git a/modules/tibc/apps/nft_transfer/keeper/keeper.go b/modules/tibc/apps/nft_transfer/keeper/keeper.go index 852948ea..b7fce817 100644 --- a/modules/tibc/apps/nft_transfer/keeper/keeper.go +++ b/modules/tibc/apps/nft_transfer/keeper/keeper.go @@ -1,12 +1,12 @@ package keeper import ( - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" + "cosmossdk.io/store/prefix" + storetypes "cosmossdk.io/store/types" tmbytes "github.com/cometbft/cometbft/libs/bytes" "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/store/prefix" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/types" diff --git a/modules/tibc/apps/nft_transfer/keeper/relay.go b/modules/tibc/apps/nft_transfer/keeper/relay.go index 254fe6b3..765c5bed 100644 --- a/modules/tibc/apps/nft_transfer/keeper/relay.go +++ b/modules/tibc/apps/nft_transfer/keeper/relay.go @@ -4,11 +4,11 @@ import ( "strconv" "strings" - "github.com/armon/go-metrics" "github.com/cosmos/cosmos-sdk/telemetry" + "github.com/hashicorp/go-metrics" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/types" packetType "github.com/bianjieai/tibc-go/modules/tibc/core/04-packet/types" @@ -38,17 +38,17 @@ func (k Keeper) SendNftTransfer( ) error { _, found := k.nk.GetDenom(ctx, class) if !found { - return sdkerrors.Wrapf(types.ErrInvalidDenom, "class %s not existed ", class) + return errorsmod.Wrapf(types.ErrInvalidDenom, "class %s not existed ", class) } nft, err := k.nk.GetNFT(ctx, class, id) if err != nil { - return sdkerrors.Wrapf(types.ErrUnknownNFT, "invalid NFT %s from collection %s", id, class) + return errorsmod.Wrapf(types.ErrUnknownNFT, "invalid NFT %s from collection %s", id, class) } sourceChain := k.ck.GetChainName(ctx) if sourceChain == destChain { - return sdkerrors.Wrapf(types.ErrScChainEqualToDestChain, "invalid destChain %s equals to scChain %s", destChain, sourceChain) + return errorsmod.Wrapf(types.ErrScChainEqualToDestChain, "invalid destChain %s equals to scChain %s", destChain, sourceChain) } fullClassPath := class @@ -184,7 +184,7 @@ func (k Keeper) OnRecvPacket(ctx sdk.Context, packet packetType.Packet, data typ labels = append(labels, telemetry.NewLabel(coretypes.LabelSource, "false")) if !strings.HasPrefix(data.Class, CLASSPATHPREFIX) { - return sdkerrors.Wrapf(types.ErrInvalidDenom, "class has no prefix: %s", data.Class) + return errorsmod.Wrapf(types.ErrInvalidDenom, "class has no prefix: %s", data.Class) } newClassPath = k.getBackNewClassPath(data.Class) @@ -213,6 +213,9 @@ func (k Keeper) OnRecvPacket(ctx sdk.Context, packet packetType.Packet, data typ return nil } +// OnAcknowledgementPacket implements the TIBCModule interface. +// It processes the acknowledgement that the counterparty chain sends back in response to a packet that was sent by this chain. +// If the acknowledgement is an error, it refunds the packet token to the sender. func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, data types.NonFungibleTokenPacketData, ack packetType.Acknowledgement) error { switch ack.Response.(type) { case *packetType.Acknowledgement_Error: @@ -346,12 +349,12 @@ func (k Keeper) ClassPathFromHash(ctx sdk.Context, class string) (string, error) hash, err := types.ParseHexHash(hexHash) if err != nil { - return "", sdkerrors.Wrap(types.ErrInvalidDenom, err.Error()) + return "", errorsmod.Wrap(types.ErrInvalidDenom, err.Error()) } denomTrace, found := k.GetClassTrace(ctx, hash) if !found { - return "", sdkerrors.Wrap(types.ErrTraceNotFound, hexHash) + return "", errorsmod.Wrap(types.ErrTraceNotFound, hexHash) } fullDenomPath := denomTrace.GetFullClassPath() diff --git a/modules/tibc/apps/nft_transfer/moudle.go b/modules/tibc/apps/nft_transfer/moudle.go index 3ad76589..fb7b5bc1 100644 --- a/modules/tibc/apps/nft_transfer/moudle.go +++ b/modules/tibc/apps/nft_transfer/moudle.go @@ -2,14 +2,12 @@ package nfttransfer import ( "context" - "encoding/json" "fmt" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/cometbft/cometbft/abci/types" - + errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -34,23 +32,12 @@ var ( // AppModuleBasic is the TIBC nft Transfer AppModuleBasic type AppModuleBasic struct{} -func (a AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return nil -} - -func (a AppModuleBasic) ValidateGenesis( - jsonCodec codec.JSONCodec, - config client.TxEncodingConfig, - message json.RawMessage, -) error { - return nil -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the tibc-nft-transfer module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { _ = types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) } +// GetTxCmd returns the transaction commands for the tibc-nft-transfer module. func (a AppModuleBasic) GetTxCmd() *cobra.Command { return cli.NewTxCmd() } @@ -60,6 +47,7 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command { return cli.GetQueryCmd() } +// Name returns the name of the module. func (a AppModuleBasic) Name() string { return types.ModuleName } @@ -80,7 +68,8 @@ type AppModule struct { keeper keeper.Keeper } -func (a AppModule) GenerateGenesisState(simState *module.SimulationState) { +// GenerateGenesisState creates a randomized GenState of the tibc-nft-transfer module. +func (am AppModule) GenerateGenesisState(simState *module.SimulationState) { simulation.RandomizedGenState(simState) } @@ -91,20 +80,6 @@ func NewAppModule(k keeper.Keeper) AppModule { } } -func (a AppModule) InitGenesis( - ctx sdk.Context, - cdc codec.JSONCodec, - data json.RawMessage, -) []abci.ValidatorUpdate { - return nil -} - -func (a AppModule) ExportGenesis(context sdk.Context, jsonCodec codec.JSONCodec) json.RawMessage { - return nil -} - -func (a AppModule) RegisterInvariants(registry sdk.InvariantRegistry) {} - // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), am.keeper) @@ -114,23 +89,18 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // ConsensusVersion implements AppModule/ConsensusVersion. func (am AppModule) ConsensusVersion() uint64 { return 1 } -// BeginBlock implements the AppModule interface -func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { -} - -// EndBlock implements the AppModule interface -func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} - -func (a AppModule) OnRecvPacket( +// OnRecvPacket implements the TIBCModule interface. +// It processes the incoming packet from counterparty chain using the Keeper.OnRecvPacket method. +// It emits an event with the packet data and acknowledgement status. +// It returns the acknowledgement bytes and error. +func (am AppModule) OnRecvPacket( ctx sdk.Context, packet packettypes.Packet, ) (*sdk.Result, []byte, error) { var data types.NonFungibleTokenPacketData if err := data.Unmarshal(packet.GetData()); err != nil { - return nil, nil, sdkerrors.Wrapf( + return nil, nil, errorsmod.Wrapf( sdkerrors.ErrUnknownRequest, "cannot unmarshal TICS-30 nft-transfer packet data: %s", err.Error(), @@ -139,7 +109,7 @@ func (a AppModule) OnRecvPacket( acknowledgement := packettypes.NewResultAcknowledgement([]byte{byte(1)}) - err := a.keeper.OnRecvPacket(ctx, packet, data) + err := am.keeper.OnRecvPacket(ctx, packet, data) if err != nil { acknowledgement = packettypes.NewErrorAcknowledgement(err.Error()) } @@ -162,14 +132,18 @@ func (a AppModule) OnRecvPacket( }, acknowledgement.GetBytes(), nil } -func (a AppModule) OnAcknowledgementPacket( +// OnAcknowledgementPacket implements the TIBCModule interface. +// It processes the acknowledgement that the counterparty chain sends back in response to a packet that was sent by this chain. +// It emits an event with the packet data and acknowledgement status. +// It returns the acknowledgement bytes and error. +func (am AppModule) OnAcknowledgementPacket( ctx sdk.Context, packet packettypes.Packet, acknowledgement []byte, ) (*sdk.Result, error) { var ack packettypes.Acknowledgement if err := ack.Unmarshal(acknowledgement); err != nil { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( sdkerrors.ErrUnknownRequest, "cannot unmarshal TICS-30 transfer packet acknowledgement: %v", err, @@ -177,14 +151,14 @@ func (a AppModule) OnAcknowledgementPacket( } var data types.NonFungibleTokenPacketData if err := data.Unmarshal(packet.GetData()); err != nil { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( sdkerrors.ErrUnknownRequest, "cannot unmarshal TICS-30 transfer packet data: %s", err.Error(), ) } - if err := a.keeper.OnAcknowledgementPacket(ctx, data, ack); err != nil { + if err := am.keeper.OnAcknowledgementPacket(ctx, data, ack); err != nil { return nil, err } diff --git a/modules/tibc/apps/nft_transfer/types/errors.go b/modules/tibc/apps/nft_transfer/types/errors.go index fefd6281..cce2e595 100644 --- a/modules/tibc/apps/nft_transfer/types/errors.go +++ b/modules/tibc/apps/nft_transfer/types/errors.go @@ -1,12 +1,12 @@ package types import ( - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + errorsmod "cosmossdk.io/errors" ) var ( - ErrInvalidDenom = sdkerrors.Register(ModuleName, 2, "invalid denom") - ErrUnknownNFT = sdkerrors.Register(ModuleName, 3, "unknown nft") - ErrScChainEqualToDestChain = sdkerrors.Register(ModuleName, 4, "source chain equals to destination chain") - ErrTraceNotFound = sdkerrors.Register(ModuleName, 5, "class trace not found") + ErrInvalidDenom = errorsmod.Register(ModuleName, 2, "invalid denom") + ErrUnknownNFT = errorsmod.Register(ModuleName, 3, "unknown nft") + ErrScChainEqualToDestChain = errorsmod.Register(ModuleName, 4, "source chain equals to destination chain") + ErrTraceNotFound = errorsmod.Register(ModuleName, 5, "class trace not found") ) diff --git a/modules/tibc/apps/nft_transfer/types/packet.go b/modules/tibc/apps/nft_transfer/types/packet.go index 974846f1..f6e489bb 100644 --- a/modules/tibc/apps/nft_transfer/types/packet.go +++ b/modules/tibc/apps/nft_transfer/types/packet.go @@ -3,6 +3,7 @@ package types import ( "strings" + errorsmod "cosmossdk.io/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -26,10 +27,10 @@ func NewNonFungibleTokenPacketData( // formats defined by their corresponding chains that are not known to TIBC. func (nftpd NonFungibleTokenPacketData) ValidateBasic() error { if strings.TrimSpace(nftpd.Sender) == "" { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "sender address cannot be blank") + return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "sender address cannot be blank") } if strings.TrimSpace(nftpd.Receiver) == "" { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "receiver address cannot be blank") + return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "receiver address cannot be blank") } return nil } diff --git a/modules/tibc/apps/nft_transfer/types/tx.pb.go b/modules/tibc/apps/nft_transfer/types/tx.pb.go index c1ca77dc..bb81ed13 100644 --- a/modules/tibc/apps/nft_transfer/types/tx.pb.go +++ b/modules/tibc/apps/nft_transfer/types/tx.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -28,6 +29,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// MsgNftTransfer defines the Msg/NftTransfer request type. type MsgNftTransfer struct { // the class to which the NFT to be transferred belongs Class string `protobuf:"bytes,1,opt,name=class,proto3" json:"class,omitempty"` @@ -125,29 +127,32 @@ func init() { } var fileDescriptor_9963dad398b8a1b5 = []byte{ - // 349 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x31, 0x4f, 0x32, 0x31, - 0x18, 0xc7, 0xef, 0xe0, 0x85, 0x17, 0x0a, 0x32, 0x34, 0x84, 0x54, 0x12, 0x0f, 0xc5, 0x45, 0x07, - 0xdb, 0xa0, 0x9b, 0x9b, 0x3a, 0xe3, 0x40, 0x9c, 0x74, 0x20, 0xbd, 0xbb, 0x72, 0x54, 0xa1, 0xbd, - 0xb4, 0x85, 0xc8, 0x37, 0x70, 0xf4, 0x23, 0xf0, 0x71, 0x1c, 0x19, 0x4d, 0x5c, 0x0c, 0xb7, 0xf8, - 0x31, 0xcc, 0xf5, 0x4e, 0x03, 0x03, 0x89, 0xdb, 0x3d, 0xbf, 0xe7, 0x77, 0xff, 0x27, 0x4f, 0x1f, - 0xd0, 0x35, 0xdc, 0x0f, 0x08, 0x8d, 0x63, 0x4d, 0xc4, 0xc8, 0x0c, 0x8d, 0xa2, 0x42, 0x8f, 0x98, - 0x22, 0xf3, 0x1e, 0x31, 0xcf, 0x38, 0x56, 0xd2, 0x48, 0xb8, 0x9f, 0x3a, 0x38, 0x75, 0xf0, 0xa6, - 0x83, 0xe7, 0xbd, 0x76, 0x33, 0x92, 0x91, 0xb4, 0x16, 0x49, 0xbf, 0xb2, 0x1f, 0xba, 0x1f, 0x2e, - 0x68, 0xf4, 0x75, 0x74, 0x3b, 0x32, 0x77, 0xb9, 0x0b, 0x9b, 0xa0, 0x14, 0x4c, 0xa8, 0xd6, 0xc8, - 0x3d, 0x74, 0x4f, 0xaa, 0x83, 0xac, 0x80, 0x0d, 0x50, 0xe0, 0x21, 0x2a, 0x58, 0x54, 0xe0, 0x21, - 0x6c, 0x81, 0xb2, 0x66, 0x22, 0x64, 0x0a, 0x15, 0x2d, 0xcb, 0x2b, 0xd8, 0x06, 0x15, 0xc5, 0x02, - 0xc6, 0xe7, 0x4c, 0xa1, 0x7f, 0xb6, 0xf3, 0x5b, 0xc3, 0x03, 0x00, 0x42, 0xa6, 0xcd, 0x30, 0x18, - 0x53, 0x2e, 0x50, 0xc9, 0x76, 0xab, 0x29, 0xb9, 0x49, 0x01, 0x3c, 0x02, 0x75, 0xc5, 0xe8, 0x84, - 0x2e, 0x72, 0xa1, 0x6c, 0x85, 0x5a, 0xc6, 0x32, 0xe5, 0x18, 0xec, 0x65, 0x09, 0x52, 0x18, 0x45, - 0x03, 0x83, 0xfe, 0x5b, 0xa7, 0x6e, 0x43, 0x72, 0x76, 0x59, 0x79, 0x59, 0x76, 0x9c, 0xaf, 0x65, - 0xc7, 0xe9, 0x22, 0xd0, 0xda, 0x5e, 0x6e, 0xc0, 0x74, 0x2c, 0x85, 0x66, 0xe7, 0x0a, 0x14, 0xfb, - 0x3a, 0x82, 0x4f, 0xa0, 0xb6, 0xb9, 0xfa, 0x29, 0xde, 0xf9, 0x7e, 0x78, 0x3b, 0xa8, 0xdd, 0xfb, - 0xb3, 0xfa, 0x33, 0xf3, 0xfa, 0xe1, 0x6d, 0xed, 0xb9, 0xab, 0xb5, 0xe7, 0x7e, 0xae, 0x3d, 0xf7, - 0x35, 0xf1, 0x9c, 0x55, 0xe2, 0x39, 0xef, 0x89, 0xe7, 0xdc, 0x5f, 0x45, 0xdc, 0x8c, 0x67, 0x3e, - 0x0e, 0xe4, 0x94, 0xf8, 0x9c, 0x8a, 0x47, 0xce, 0x28, 0x27, 0xe9, 0x80, 0xb3, 0x48, 0x92, 0xa9, - 0x0c, 0x67, 0x13, 0xa6, 0xc9, 0x8e, 0xfb, 0x9b, 0x45, 0xcc, 0xb4, 0x5f, 0xb6, 0xf7, 0xbc, 0xf8, - 0x0e, 0x00, 0x00, 0xff, 0xff, 0xb5, 0xf0, 0x13, 0x54, 0x26, 0x02, 0x00, 0x00, + // 385 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xb1, 0x6e, 0x1a, 0x31, + 0x18, 0xc7, 0xef, 0xa0, 0xd0, 0x62, 0x28, 0x83, 0x8b, 0xe8, 0xf5, 0xa4, 0x1e, 0x2d, 0x5d, 0x5a, + 0xa4, 0x9e, 0x45, 0xbb, 0x75, 0x6b, 0x3b, 0xd3, 0x01, 0x75, 0x6a, 0x07, 0xe4, 0xbb, 0x33, 0xc6, + 0x09, 0x77, 0x3e, 0xf9, 0x33, 0x28, 0x6c, 0x51, 0xa6, 0x8c, 0x79, 0x04, 0x1e, 0x81, 0xc7, 0xc8, + 0xc8, 0x98, 0x31, 0x02, 0x29, 0xe4, 0x31, 0xa2, 0xf3, 0x5d, 0x22, 0x18, 0x90, 0xb2, 0xf9, 0xfb, + 0xff, 0x7f, 0xfe, 0x7f, 0xf6, 0x67, 0xa3, 0xae, 0x16, 0x41, 0x48, 0x68, 0x9a, 0x02, 0x49, 0xc6, + 0x7a, 0xa4, 0x15, 0x4d, 0x60, 0xcc, 0x14, 0x99, 0xf7, 0x89, 0x3e, 0xf3, 0x53, 0x25, 0xb5, 0xc4, + 0xef, 0x32, 0xc6, 0xcf, 0x18, 0x7f, 0x9f, 0xf1, 0xe7, 0x7d, 0xb7, 0xc5, 0x25, 0x97, 0x86, 0x22, + 0xd9, 0x2a, 0xdf, 0xe0, 0xbe, 0x0d, 0x25, 0xc4, 0x12, 0x48, 0x0c, 0x3c, 0x0b, 0x8a, 0x81, 0xe7, + 0x46, 0xf7, 0xce, 0x46, 0xcd, 0x01, 0xf0, 0x3f, 0x63, 0xfd, 0xb7, 0x08, 0xc1, 0x2d, 0x54, 0x09, + 0xa7, 0x14, 0xc0, 0xb1, 0x3f, 0xd8, 0x9f, 0x6b, 0xc3, 0xbc, 0xc0, 0x4d, 0x54, 0x12, 0x91, 0x53, + 0x32, 0x52, 0x49, 0x44, 0xb8, 0x8d, 0xaa, 0xc0, 0x92, 0x88, 0x29, 0xa7, 0x6c, 0xb4, 0xa2, 0xc2, + 0x2e, 0x7a, 0xa5, 0x58, 0xc8, 0xc4, 0x9c, 0x29, 0xe7, 0x85, 0x71, 0x9e, 0x6a, 0xfc, 0x1e, 0xa1, + 0x88, 0x81, 0x1e, 0x85, 0x13, 0x2a, 0x12, 0xa7, 0x62, 0xdc, 0x5a, 0xa6, 0xfc, 0xce, 0x04, 0xfc, + 0x11, 0x35, 0x14, 0xa3, 0x53, 0xba, 0x28, 0x80, 0xaa, 0x01, 0xea, 0xb9, 0x96, 0x23, 0x9f, 0xd0, + 0xeb, 0x3c, 0x41, 0x26, 0x5a, 0xd1, 0x50, 0x3b, 0x2f, 0x0d, 0xd3, 0x30, 0x21, 0x85, 0xf6, 0xe3, + 0xcd, 0xe5, 0xb2, 0x63, 0xdd, 0x2f, 0x3b, 0xd6, 0xc5, 0x6e, 0xd5, 0x2b, 0xce, 0xd5, 0x75, 0x50, + 0xfb, 0xf0, 0x9e, 0x43, 0x06, 0xa9, 0x4c, 0x80, 0x7d, 0x5b, 0xa0, 0xf2, 0x00, 0x38, 0x3e, 0x45, + 0xf5, 0xfd, 0x29, 0x7c, 0xf1, 0x8f, 0xce, 0xd8, 0x3f, 0x0c, 0x72, 0xfb, 0xcf, 0x46, 0x1f, 0x7b, + 0xba, 0x95, 0xf3, 0xdd, 0xaa, 0x67, 0xff, 0xfa, 0x7f, 0xbd, 0xf1, 0xec, 0xf5, 0xc6, 0xb3, 0x6f, + 0x37, 0x9e, 0x7d, 0xb5, 0xf5, 0xac, 0xf5, 0xd6, 0xb3, 0x6e, 0xb6, 0x9e, 0xf5, 0xef, 0x27, 0x17, + 0x7a, 0x32, 0x0b, 0xfc, 0x50, 0xc6, 0x24, 0x10, 0x34, 0x39, 0x11, 0x8c, 0x0a, 0x92, 0xf5, 0xf9, + 0xca, 0x25, 0x89, 0x65, 0x34, 0x9b, 0x32, 0x20, 0x47, 0xbe, 0x8a, 0x5e, 0xa4, 0x0c, 0x82, 0xaa, + 0x79, 0xe1, 0xef, 0x0f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x29, 0xf5, 0xfb, 0x51, 0x02, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/tibc/core/02-client/client/cli/tx.go b/modules/tibc/core/02-client/client/cli/tx.go index be757252..b72e8aae 100644 --- a/modules/tibc/core/02-client/client/cli/tx.go +++ b/modules/tibc/core/02-client/client/cli/tx.go @@ -89,10 +89,6 @@ func NewCreateClientProposalCmd() *cobra.Command { return err } - if err = msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } @@ -215,10 +211,6 @@ func NewUpgradeClientProposalCmd() *cobra.Command { return err } - if err = msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } @@ -270,10 +262,6 @@ func NewRegisterRelayerProposalCmd() *cobra.Command { return err } - if err = msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/modules/tibc/core/02-client/client/utils/utils.go b/modules/tibc/core/02-client/client/utils/utils.go index 4e1bd4e7..e97efb57 100644 --- a/modules/tibc/core/02-client/client/utils/utils.go +++ b/modules/tibc/core/02-client/client/utils/utils.go @@ -5,9 +5,9 @@ import ( tmtypes "github.com/cometbft/cometbft/types" + errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" commitmenttypes "github.com/bianjieai/tibc-go/modules/tibc/core/23-commitment/types" @@ -47,7 +47,7 @@ func QueryClientStateABCI( // check if client exists if len(value) == 0 { - return nil, sdkerrors.Wrap(types.ErrClientNotFound, chainName) + return nil, errorsmod.Wrap(types.ErrClientNotFound, chainName) } cdc := codec.NewProtoCodec(clientCtx.InterfaceRegistry) @@ -113,7 +113,7 @@ func QueryConsensusStateABCI( // check if consensus state exists if len(value) == 0 { - return nil, sdkerrors.Wrap(types.ErrConsensusStateNotFound, chainName) + return nil, errorsmod.Wrap(types.ErrConsensusStateNotFound, chainName) } cs, err := types.UnmarshalConsensusState(cdc, value) diff --git a/modules/tibc/core/02-client/keeper/client.go b/modules/tibc/core/02-client/keeper/client.go index c993c435..b25b6ea1 100644 --- a/modules/tibc/core/02-client/keeper/client.go +++ b/modules/tibc/core/02-client/keeper/client.go @@ -3,11 +3,11 @@ package keeper import ( "encoding/hex" - "github.com/armon/go-metrics" + "github.com/hashicorp/go-metrics" + errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" "github.com/bianjieai/tibc-go/modules/tibc/core/exported" @@ -44,19 +44,19 @@ func (k Keeper) CreateClient( func (k Keeper) UpdateClient(ctx sdk.Context, chainName string, header exported.Header) error { clientState, found := k.GetClientState(ctx, chainName) if !found { - return sdkerrors.Wrapf(types.ErrClientNotFound, "cannot update client %s", chainName) + return errorsmod.Wrapf(types.ErrClientNotFound, "cannot update client %s", chainName) } clientStore := k.ClientStore(ctx, chainName) if status := clientState.Status(ctx, clientStore, k.cdc); status != exported.Active { - return sdkerrors.Wrapf(types.ErrClientNotActive, "cannot update client (%s) with status %s", chainName, status) + return errorsmod.Wrapf(types.ErrClientNotActive, "cannot update client (%s) with status %s", chainName, status) } // Any writes made in CheckHeaderAndUpdateState are persisted on both valid updates // Light client implementations are responsible for writing the correct metadata (if any) in either case. newClientState, newConsensusState, err := clientState.CheckHeaderAndUpdateState(ctx, k.cdc, k.ClientStore(ctx, chainName), header) if err != nil { - return sdkerrors.Wrapf(err, "cannot update client %s", chainName) + return errorsmod.Wrapf(err, "cannot update client %s", chainName) } // set new client state regardless of if update is valid update @@ -105,11 +105,11 @@ func (k Keeper) UpdateClient(ctx sdk.Context, chainName string, header exported. func (k Keeper) UpgradeClient(ctx sdk.Context, chainName string, upgradedClientState exported.ClientState, upgradedConsState exported.ConsensusState) error { clientState, found := k.GetClientState(ctx, chainName) if !found { - return sdkerrors.Wrapf(types.ErrClientNotFound, "cannot update client %s", chainName) + return errorsmod.Wrapf(types.ErrClientNotFound, "cannot update client %s", chainName) } if clientState.ClientType() != upgradedClientState.ClientType() { - return sdkerrors.Wrapf(types.ErrInvalidClientType, "cannot update client %s, client-type not match", chainName) + return errorsmod.Wrapf(types.ErrInvalidClientType, "cannot update client %s, client-type not match", chainName) } k.SetClientState(ctx, chainName, upgradedClientState) diff --git a/modules/tibc/core/02-client/keeper/grpc_query.go b/modules/tibc/core/02-client/keeper/grpc_query.go index 0076c6b3..1cda7d09 100644 --- a/modules/tibc/core/02-client/keeper/grpc_query.go +++ b/modules/tibc/core/02-client/keeper/grpc_query.go @@ -9,9 +9,9 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/cosmos/cosmos-sdk/store/prefix" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" @@ -36,7 +36,7 @@ func (q Keeper) ClientState(c context.Context, req *types.QueryClientStateReques if !found { return nil, status.Error( codes.NotFound, - sdkerrors.Wrap(types.ErrClientNotFound, req.ChainName).Error(), + errorsmod.Wrap(types.ErrClientNotFound, req.ChainName).Error(), ) } @@ -127,7 +127,7 @@ func (q Keeper) ConsensusState(c context.Context, req *types.QueryConsensusState if !found { return nil, status.Error( codes.NotFound, - sdkerrors.Wrapf(types.ErrConsensusStateNotFound, "chain-name: %s, height: %s", req.ChainName, height).Error(), + errorsmod.Wrapf(types.ErrConsensusStateNotFound, "chain-name: %s, height: %s", req.ChainName, height).Error(), ) } diff --git a/modules/tibc/core/02-client/keeper/keeper.go b/modules/tibc/core/02-client/keeper/keeper.go index a8c9f984..e9fbb7cc 100644 --- a/modules/tibc/core/02-client/keeper/keeper.go +++ b/modules/tibc/core/02-client/keeper/keeper.go @@ -5,13 +5,12 @@ import ( "fmt" "strings" - "github.com/cometbft/cometbft/libs/log" - + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/log" + "cosmossdk.io/store/prefix" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/store/prefix" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" host "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" @@ -115,7 +114,7 @@ func (k Keeper) IterateConsensusStates( cb func(chainName string, cs types.ConsensusStateWithHeight) bool, ) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, host.KeyClientStorePrefix) + iterator := storetypes.KVStorePrefixIterator(store, host.KeyClientStorePrefix) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { @@ -175,7 +174,7 @@ func (k Keeper) GetAllClientMetadata( for i, metadata := range gms { cmd, ok := metadata.(types.GenesisMetadata) if !ok { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( types.ErrInvalidClientMetadata, "expected metadata type: %T, got: %T", types.GenesisMetadata{}, @@ -266,7 +265,7 @@ func (k Keeper) IterateClients( cb func(chainName string, cs exported.ClientState) bool, ) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, host.KeyClientStorePrefix) + iterator := storetypes.KVStorePrefixIterator(store, host.KeyClientStorePrefix) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { @@ -295,13 +294,13 @@ func (k Keeper) GetAllClients(ctx sdk.Context) (states []exported.ClientState) { // ClientStore returns isolated prefix store for each client so they can read/write in separate // namespace without being able to read/write other client's data -func (k Keeper) ClientStore(ctx sdk.Context, chainName string) sdk.KVStore { +func (k Keeper) ClientStore(ctx sdk.Context, chainName string) storetypes.KVStore { clientPrefix := []byte(fmt.Sprintf("%s/%s/", host.KeyClientStorePrefix, chainName)) return prefix.NewStore(ctx.KVStore(k.storeKey), clientPrefix) } // RelayerStore returns isolated prefix store for each client so they can read/write in separate // namespace without being able to read/write other relayer's data -func (k Keeper) RelayerStore(ctx sdk.Context) sdk.KVStore { +func (k Keeper) RelayerStore(ctx sdk.Context) storetypes.KVStore { return prefix.NewStore(ctx.KVStore(k.storeKey), []byte(types.KeyRelayers)) } diff --git a/modules/tibc/core/02-client/keeper/keeper_test.go b/modules/tibc/core/02-client/keeper/keeper_test.go index a3be766b..bda9429e 100644 --- a/modules/tibc/core/02-client/keeper/keeper_test.go +++ b/modules/tibc/core/02-client/keeper/keeper_test.go @@ -5,6 +5,7 @@ import ( "testing" "time" + "cosmossdk.io/math" "github.com/stretchr/testify/suite" tmbytes "github.com/cometbft/cometbft/libs/bytes" @@ -40,9 +41,7 @@ const ( maxClockDrift time.Duration = time.Second * 10 ) -var ( - testClientHeight = types.NewHeight(0, 5) -) +var testClientHeight = types.NewHeight(0, 5) type KeeperTestSuite struct { suite.Suite @@ -77,10 +76,10 @@ func (suite *KeeperTestSuite) SetupTest() { suite.now = time.Date(2020, 1, 2, 0, 0, 0, 0, time.UTC) suite.past = time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC) now2 := suite.now.Add(time.Hour) - app := simapp.Setup(isCheckTx) + app := simapp.Setup(suite.T()) suite.cdc = app.AppCodec() - suite.ctx = app.BaseApp.NewContext( + suite.ctx = app.BaseApp.NewContextLegacy( isCheckTx, tmproto.Header{Height: height, ChainID: testChainName, Time: now2}, ) @@ -115,7 +114,7 @@ func (suite *KeeperTestSuite) SetupTest() { suite.valSetHash, ) - var validators stakingtypes.Validators + var validators []stakingtypes.Validator for i := 1; i < 11; i++ { privVal := ibctestingmock.NewPV() tmPk, err := privVal.GetPubKey() @@ -123,23 +122,27 @@ func (suite *KeeperTestSuite) SetupTest() { pk, err := cryptocodec.FromTmPubKeyInterface(tmPk) suite.Require().NoError(err) val, err := stakingtypes.NewValidator( - sdk.ValAddress(pk.Address()), + sdk.ValAddress(pk.Address()).String(), pk, stakingtypes.Description{}, ) suite.Require().NoError(err) val.Status = stakingtypes.Bonded - val.Tokens = sdk.NewInt(rand.Int63()) + val.Tokens = math.NewInt(rand.Int63()) validators = append(validators, val) - hi := stakingtypes.NewHistoricalInfo( - suite.ctx.BlockHeader(), - validators, - sdk.DefaultPowerReduction, - ) - app.StakingKeeper.SetHistoricalInfo(suite.ctx, int64(i), &hi) } + hi := stakingtypes.NewHistoricalInfo( + suite.ctx.BlockHeader(), + stakingtypes.Validators{ + Validators: validators, + ValidatorCodec: app.StakingKeeper.ValidatorAddressCodec(), + }, + sdk.DefaultPowerReduction, + ) + err = app.StakingKeeper.SetHistoricalInfo(suite.ctx, suite.ctx.BlockHeader().Height, &hi) + suite.Require().NoError(err) queryHelper := baseapp.NewQueryServerTestHelper(suite.ctx, app.InterfaceRegistry()) types.RegisterQueryServer(queryHelper, app.TIBCKeeper.ClientKeeper) diff --git a/modules/tibc/core/02-client/keeper/proposal.go b/modules/tibc/core/02-client/keeper/proposal.go index cc9e720d..74d60f72 100644 --- a/modules/tibc/core/02-client/keeper/proposal.go +++ b/modules/tibc/core/02-client/keeper/proposal.go @@ -1,11 +1,11 @@ package keeper import ( - "github.com/armon/go-metrics" + "github.com/hashicorp/go-metrics" + errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" ) @@ -14,7 +14,7 @@ import ( func (k Keeper) HandleCreateClientProposal(ctx sdk.Context, p *types.CreateClientProposal) error { _, has := k.GetClientState(ctx, p.ChainName) if has { - return sdkerrors.Wrapf(types.ErrClientExists, "chain-name: %s", p.ChainName) + return errorsmod.Wrapf(types.ErrClientExists, "chain-name: %s", p.ChainName) } clientState, err := types.UnpackClientState(p.ClientState) diff --git a/modules/tibc/core/02-client/keeper/proposal_test.go b/modules/tibc/core/02-client/keeper/proposal_test.go index a7762b23..d83d1a98 100644 --- a/modules/tibc/core/02-client/keeper/proposal_test.go +++ b/modules/tibc/core/02-client/keeper/proposal_test.go @@ -11,9 +11,9 @@ import ( func (suite KeeperTestSuite) TestHandleCreateClientProposal() { header := suite.chainA.CreateTMClientHeader( - suite.chainA.ChainID, suite.chainA.CurrentHeader.Height, - types.NewHeight(0, uint64(suite.chainA.CurrentHeader.Height-1)), - suite.chainA.CurrentHeader.Time, suite.chainA.Vals, + suite.chainA.ChainID, suite.chainA.ProposedHeader.Height, + types.NewHeight(0, uint64(suite.chainA.ProposedHeader.Height-1)), + suite.chainA.ProposedHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers, ) testCases := []struct { @@ -84,9 +84,9 @@ func (suite KeeperTestSuite) TestHandleCreateClientProposal() { func (suite KeeperTestSuite) TestHandleUpgradeClientProposal() { header := suite.chainA.CreateTMClientHeader( - suite.chainA.ChainID, suite.chainA.CurrentHeader.Height, - types.NewHeight(0, uint64(suite.chainA.CurrentHeader.Height-1)), - suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, + suite.chainA.ChainID, suite.chainA.ProposedHeader.Height, + types.NewHeight(0, uint64(suite.chainA.ProposedHeader.Height-1)), + suite.chainA.ProposedHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers, ) testCases := []struct { @@ -153,9 +153,9 @@ func (suite KeeperTestSuite) TestHandleUpgradeClientProposal() { func (suite KeeperTestSuite) TestHandleRegisterRelayerProposal() { header := suite.chainA.CreateTMClientHeader( - suite.chainA.ChainID, suite.chainA.CurrentHeader.Height, - types.NewHeight(0, uint64(suite.chainA.CurrentHeader.Height-1)), - suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, + suite.chainA.ChainID, suite.chainA.ProposedHeader.Height, + types.NewHeight(0, uint64(suite.chainA.ProposedHeader.Height-1)), + suite.chainA.ProposedHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers, ) testCases := []struct { diff --git a/modules/tibc/core/02-client/keeper/relayer.go b/modules/tibc/core/02-client/keeper/relayer.go index d561b7ee..f8ea1393 100644 --- a/modules/tibc/core/02-client/keeper/relayer.go +++ b/modules/tibc/core/02-client/keeper/relayer.go @@ -1,6 +1,7 @@ package keeper import ( + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" @@ -40,7 +41,7 @@ func (k Keeper) GetRelayers(ctx sdk.Context, chainName string) (relayers []strin // GetAllRelayers returns all registered relayer addresses func (k Keeper) GetAllRelayers(ctx sdk.Context) (relayers []types.IdentifiedRelayers) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(types.KeyRelayers)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(types.KeyRelayers)) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { diff --git a/modules/tibc/core/02-client/simulation/decoder_test.go b/modules/tibc/core/02-client/simulation/decoder_test.go index 4161ce7d..14299d17 100644 --- a/modules/tibc/core/02-client/simulation/decoder_test.go +++ b/modules/tibc/core/02-client/simulation/decoder_test.go @@ -17,7 +17,7 @@ import ( ) func TestDecodeStore(t *testing.T) { - app := simapp.Setup(false) + app := simapp.Setup(t) chainName := "clientidone" height := types.NewHeight(0, 10) diff --git a/modules/tibc/core/02-client/types/client.go b/modules/tibc/core/02-client/types/client.go index ea0d418f..0d42ed47 100644 --- a/modules/tibc/core/02-client/types/client.go +++ b/modules/tibc/core/02-client/types/client.go @@ -7,8 +7,8 @@ import ( proto "github.com/cosmos/gogoproto/proto" + errorsmod "cosmossdk.io/errors" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" host "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" "github.com/bianjieai/tibc-go/modules/tibc/core/exported" @@ -95,11 +95,11 @@ func (cswh ConsensusStateWithHeight) UnpackInterfaces(unpacker codectypes.AnyUnp // client identifier when used with '0' or the maximum uint64 as the sequence. func ValidateClientType(clientType string) error { if strings.TrimSpace(clientType) == "" { - return sdkerrors.Wrap(ErrInvalidClientType, "client type cannot be blank") + return errorsmod.Wrap(ErrInvalidClientType, "client type cannot be blank") } if err := host.ClientIdentifierValidator(clientType); err != nil { - return sdkerrors.Wrap(err, "client type being invalid") + return errorsmod.Wrap(err, "client type being invalid") } return nil } diff --git a/modules/tibc/core/02-client/types/codec.go b/modules/tibc/core/02-client/types/codec.go index 9904c027..ee002392 100644 --- a/modules/tibc/core/02-client/types/codec.go +++ b/modules/tibc/core/02-client/types/codec.go @@ -3,6 +3,7 @@ package types import ( "github.com/cosmos/gogoproto/proto" + errorsmod "cosmossdk.io/errors" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -54,12 +55,12 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { func PackClientState(clientState exported.ClientState) (*codectypes.Any, error) { msg, ok := clientState.(proto.Message) if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", clientState) + return nil, errorsmod.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", clientState) } anyClientState, err := codectypes.NewAnyWithValue(msg) if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrPackAny, err.Error()) + return nil, errorsmod.Wrap(sdkerrors.ErrPackAny, err.Error()) } return anyClientState, nil @@ -69,12 +70,12 @@ func PackClientState(clientState exported.ClientState) (*codectypes.Any, error) // client state can't be unpacked into a ClientState. func UnpackClientState(any *codectypes.Any) (exported.ClientState, error) { if any == nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrUnpackAny, "protobuf Any message cannot be nil") + return nil, errorsmod.Wrap(sdkerrors.ErrUnpackAny, "protobuf Any message cannot be nil") } clientState, ok := any.GetCachedValue().(exported.ClientState) if !ok { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( sdkerrors.ErrUnpackAny, "cannot unpack Any into ClientState %T", any, @@ -90,12 +91,12 @@ func UnpackClientState(any *codectypes.Any) (exported.ClientState, error) { func PackConsensusState(consensusState exported.ConsensusState) (*codectypes.Any, error) { msg, ok := consensusState.(proto.Message) if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", consensusState) + return nil, errorsmod.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", consensusState) } anyConsensusState, err := codectypes.NewAnyWithValue(msg) if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrPackAny, err.Error()) + return nil, errorsmod.Wrap(sdkerrors.ErrPackAny, err.Error()) } return anyConsensusState, nil @@ -115,12 +116,12 @@ func MustPackConsensusState(consensusState exported.ConsensusState) *codectypes. // consensus state can't be unpacked into a ConsensusState. func UnpackConsensusState(any *codectypes.Any) (exported.ConsensusState, error) { if any == nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrUnpackAny, "protobuf Any message cannot be nil") + return nil, errorsmod.Wrap(sdkerrors.ErrUnpackAny, "protobuf Any message cannot be nil") } consensusState, ok := any.GetCachedValue().(exported.ConsensusState) if !ok { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( sdkerrors.ErrUnpackAny, "cannot unpack Any into ConsensusState %T", any, @@ -136,12 +137,12 @@ func UnpackConsensusState(any *codectypes.Any) (exported.ConsensusState, error) func PackHeader(header exported.Header) (*codectypes.Any, error) { msg, ok := header.(proto.Message) if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", header) + return nil, errorsmod.Wrapf(sdkerrors.ErrPackAny, "cannot proto marshal %T", header) } anyHeader, err := codectypes.NewAnyWithValue(msg) if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrPackAny, err.Error()) + return nil, errorsmod.Wrap(sdkerrors.ErrPackAny, err.Error()) } return anyHeader, nil @@ -151,12 +152,12 @@ func PackHeader(header exported.Header) (*codectypes.Any, error) { // consensus state can't be unpacked into a Header. func UnpackHeader(any *codectypes.Any) (exported.Header, error) { if any == nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrUnpackAny, "protobuf Any message cannot be nil") + return nil, errorsmod.Wrap(sdkerrors.ErrUnpackAny, "protobuf Any message cannot be nil") } header, ok := any.GetCachedValue().(exported.Header) if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnpackAny, "cannot unpack Any into Header %T", any) + return nil, errorsmod.Wrapf(sdkerrors.ErrUnpackAny, "cannot unpack Any into Header %T", any) } return header, nil diff --git a/modules/tibc/core/02-client/types/errors.go b/modules/tibc/core/02-client/types/errors.go index 2800d2e7..cdc672db 100644 --- a/modules/tibc/core/02-client/types/errors.go +++ b/modules/tibc/core/02-client/types/errors.go @@ -1,8 +1,7 @@ package types import ( - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - + errorsmod "cosmossdk.io/errors" host "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" ) @@ -10,30 +9,30 @@ const moduleName = host.ModuleName + "-" + SubModuleName // TIBC client sentinel errors var ( - ErrClientExists = sdkerrors.Register(moduleName, 2, "light client already exists") - ErrInvalidClient = sdkerrors.Register(moduleName, 3, "light client is invalid") - ErrClientNotFound = sdkerrors.Register(moduleName, 4, "light client not found") - ErrClientFrozen = sdkerrors.Register(moduleName, 5, "light client is frozen due to misbehaviour") - ErrInvalidClientMetadata = sdkerrors.Register(moduleName, 6, "invalid client metadata") - ErrConsensusStateNotFound = sdkerrors.Register(moduleName, 7, "consensus state not found") - ErrInvalidConsensus = sdkerrors.Register(moduleName, 8, "invalid consensus state") - ErrClientTypeNotFound = sdkerrors.Register(moduleName, 9, "client type not found") - ErrInvalidClientType = sdkerrors.Register(moduleName, 10, "invalid client type") - ErrRootNotFound = sdkerrors.Register(moduleName, 11, "commitment root not found") - ErrInvalidHeader = sdkerrors.Register(moduleName, 12, "invalid client header") - ErrInvalidMisbehaviour = sdkerrors.Register(moduleName, 13, "invalid light client misbehaviour") - ErrFailedClientStateVerification = sdkerrors.Register(moduleName, 14, "client state verification failed") - ErrFailedClientConsensusStateVerification = sdkerrors.Register(moduleName, 15, "client consensus state verification failed") - ErrFailedConnectionStateVerification = sdkerrors.Register(moduleName, 16, "connection state verification failed") - ErrFailedChannelStateVerification = sdkerrors.Register(moduleName, 17, "channel state verification failed") - ErrFailedPacketCommitmentVerification = sdkerrors.Register(moduleName, 18, "packet commitment verification failed") - ErrFailedPacketAckVerification = sdkerrors.Register(moduleName, 19, "packet acknowledgement verification failed") - ErrFailedPacketReceiptVerification = sdkerrors.Register(moduleName, 20, "packet receipt verification failed") - ErrFailedNextSeqRecvVerification = sdkerrors.Register(moduleName, 21, "next sequence receive verification failed") - ErrSelfConsensusStateNotFound = sdkerrors.Register(moduleName, 22, "self consensus state not found") - ErrUpdateClientFailed = sdkerrors.Register(moduleName, 23, "unable to update light client") - ErrInvalidUpdateClientProposal = sdkerrors.Register(moduleName, 24, "invalid update client proposal") - ErrInvalidUpgradeClient = sdkerrors.Register(moduleName, 25, "invalid client upgrade") - ErrRelayerExists = sdkerrors.Register(moduleName, 26, "relayer already exists") - ErrClientNotActive = sdkerrors.Register(moduleName, 27, "client is not active") + ErrClientExists = errorsmod.Register(moduleName, 2, "light client already exists") + ErrInvalidClient = errorsmod.Register(moduleName, 3, "light client is invalid") + ErrClientNotFound = errorsmod.Register(moduleName, 4, "light client not found") + ErrClientFrozen = errorsmod.Register(moduleName, 5, "light client is frozen due to misbehaviour") + ErrInvalidClientMetadata = errorsmod.Register(moduleName, 6, "invalid client metadata") + ErrConsensusStateNotFound = errorsmod.Register(moduleName, 7, "consensus state not found") + ErrInvalidConsensus = errorsmod.Register(moduleName, 8, "invalid consensus state") + ErrClientTypeNotFound = errorsmod.Register(moduleName, 9, "client type not found") + ErrInvalidClientType = errorsmod.Register(moduleName, 10, "invalid client type") + ErrRootNotFound = errorsmod.Register(moduleName, 11, "commitment root not found") + ErrInvalidHeader = errorsmod.Register(moduleName, 12, "invalid client header") + ErrInvalidMisbehaviour = errorsmod.Register(moduleName, 13, "invalid light client misbehaviour") + ErrFailedClientStateVerification = errorsmod.Register(moduleName, 14, "client state verification failed") + ErrFailedClientConsensusStateVerification = errorsmod.Register(moduleName, 15, "client consensus state verification failed") + ErrFailedConnectionStateVerification = errorsmod.Register(moduleName, 16, "connection state verification failed") + ErrFailedChannelStateVerification = errorsmod.Register(moduleName, 17, "channel state verification failed") + ErrFailedPacketCommitmentVerification = errorsmod.Register(moduleName, 18, "packet commitment verification failed") + ErrFailedPacketAckVerification = errorsmod.Register(moduleName, 19, "packet acknowledgement verification failed") + ErrFailedPacketReceiptVerification = errorsmod.Register(moduleName, 20, "packet receipt verification failed") + ErrFailedNextSeqRecvVerification = errorsmod.Register(moduleName, 21, "next sequence receive verification failed") + ErrSelfConsensusStateNotFound = errorsmod.Register(moduleName, 22, "self consensus state not found") + ErrUpdateClientFailed = errorsmod.Register(moduleName, 23, "unable to update light client") + ErrInvalidUpdateClientProposal = errorsmod.Register(moduleName, 24, "invalid update client proposal") + ErrInvalidUpgradeClient = errorsmod.Register(moduleName, 25, "invalid client upgrade") + ErrRelayerExists = errorsmod.Register(moduleName, 26, "relayer already exists") + ErrClientNotActive = errorsmod.Register(moduleName, 27, "client is not active") ) diff --git a/modules/tibc/core/02-client/types/expected_keepers.go b/modules/tibc/core/02-client/types/expected_keepers.go index defc8150..2d7f72b4 100644 --- a/modules/tibc/core/02-client/types/expected_keepers.go +++ b/modules/tibc/core/02-client/types/expected_keepers.go @@ -1,14 +1,14 @@ package types import ( + context "context" "time" - sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) // StakingKeeper expected staking keeper type StakingKeeper interface { - GetHistoricalInfo(ctx sdk.Context, height int64) (stakingtypes.HistoricalInfo, bool) - UnbondingTime(ctx sdk.Context) time.Duration + GetHistoricalInfo(ctx context.Context, height int64) (stakingtypes.HistoricalInfo, error) + UnbondingTime(ctx context.Context) (time.Duration,error) } diff --git a/modules/tibc/core/02-client/types/height.go b/modules/tibc/core/02-client/types/height.go index ec111aa1..b9c79fd0 100644 --- a/modules/tibc/core/02-client/types/height.go +++ b/modules/tibc/core/02-client/types/height.go @@ -7,6 +7,7 @@ import ( "strconv" "strings" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -135,15 +136,15 @@ func MustParseHeight(heightStr string) Height { func ParseHeight(heightStr string) (Height, error) { splitStr := strings.Split(heightStr, "-") if len(splitStr) != 2 { - return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "expected height string format: {revision}-{height}. Got: %s", heightStr) + return Height{}, errorsmod.Wrapf(sdkerrors.ErrInvalidHeight, "expected height string format: {revision}-{height}. Got: %s", heightStr) } revisionNumber, err := strconv.ParseUint(splitStr[0], 10, 64) if err != nil { - return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid revision number. parse err: %s", err) + return Height{}, errorsmod.Wrapf(sdkerrors.ErrInvalidHeight, "invalid revision number. parse err: %s", err) } revisionHeight, err := strconv.ParseUint(splitStr[1], 10, 64) if err != nil { - return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid revision height. parse err: %s", err) + return Height{}, errorsmod.Wrapf(sdkerrors.ErrInvalidHeight, "invalid revision height. parse err: %s", err) } return NewHeight(revisionNumber, revisionHeight), nil } @@ -152,7 +153,7 @@ func ParseHeight(heightStr string) (Height, error) { // in the chainID with the given revision number. func SetRevisionNumber(chainID string, revision uint64) (string, error) { if !IsRevisionFormat(chainID) { - return "", sdkerrors.Wrapf( + return "", errorsmod.Wrapf( sdkerrors.ErrInvalidChainID, "chainID is not in revision format: %s", chainID, ) } diff --git a/modules/tibc/core/02-client/types/msgs.go b/modules/tibc/core/02-client/types/msgs.go index 2bfeb81a..4943083c 100644 --- a/modules/tibc/core/02-client/types/msgs.go +++ b/modules/tibc/core/02-client/types/msgs.go @@ -1,6 +1,7 @@ package types import ( + errorsmod "cosmossdk.io/errors" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -49,7 +50,7 @@ func NewMsgUpdateClient( func (msg MsgUpdateClient) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err, @@ -84,7 +85,7 @@ func (msg MsgUpdateClient) UnpackInterfaces(unpacker codectypes.AnyUnpacker) err func (msg MsgCreateClient) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Authority) if err != nil { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err, @@ -100,6 +101,30 @@ func (msg MsgCreateClient) ValidateBasic() error { return context.ValidateBasic() } +// NewMsgCreateClient creates a new MsgCreateClient instance +func NewMsgCreateClient( + chainName string, + clientState exported.ClientState, + consensusState exported.ConsensusState, + authority string, +) (*MsgCreateClient, error) { + anyClientState, err := PackClientState(clientState) + if err != nil { + return nil, err + } + + anyConsensusState, err := PackConsensusState(consensusState) + if err != nil { + return nil, err + } + + return &MsgCreateClient{ + ClientState: anyClientState, + ConsensusState: anyConsensusState, + Authority: authority, + }, nil +} + // GetSigners implements sdk.Msg func (msg MsgCreateClient) GetSigners() []sdk.AccAddress { accAddr, err := sdk.AccAddressFromBech32(msg.Authority) @@ -125,7 +150,7 @@ func (msg MsgCreateClient) UnpackInterfaces(unpacker codectypes.AnyUnpacker) err func (msg MsgUpgradeClient) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Authority) if err != nil { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err, @@ -166,7 +191,7 @@ func (msg MsgUpgradeClient) UnpackInterfaces(unpacker codectypes.AnyUnpacker) er func (msg MsgRegisterRelayer) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Authority) if err != nil { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err, diff --git a/modules/tibc/core/02-client/types/proposal.go b/modules/tibc/core/02-client/types/proposal.go index cde723a3..e8547740 100644 --- a/modules/tibc/core/02-client/types/proposal.go +++ b/modules/tibc/core/02-client/types/proposal.go @@ -1,6 +1,7 @@ package types import ( + errorsmod "cosmossdk.io/errors" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -201,7 +202,7 @@ func (rrp *RegisterRelayerProposal) ValidateBasic() error { for _, relayer := range rrp.Relayers { if _, err := sdk.AccAddressFromBech32(relayer); err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } } return nil diff --git a/modules/tibc/core/02-client/types/tx.pb.go b/modules/tibc/core/02-client/types/tx.pb.go index 8ff574df..8cd179c9 100644 --- a/modules/tibc/core/02-client/types/tx.pb.go +++ b/modules/tibc/core/02-client/types/tx.pb.go @@ -388,46 +388,46 @@ func init() { func init() { proto.RegisterFile("tibc/core/client/v1/tx.proto", fileDescriptor_d101b27e3bfc60c8) } var fileDescriptor_d101b27e3bfc60c8 = []byte{ - // 613 bytes of a gzipped FileDescriptorProto + // 622 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0x4f, 0x6f, 0xd3, 0x4e, - 0x10, 0x8d, 0x93, 0x26, 0xfa, 0x65, 0xd3, 0x1f, 0x41, 0x6e, 0x44, 0x5d, 0xab, 0xb8, 0x51, 0x04, - 0x22, 0x42, 0x8d, 0x97, 0x06, 0x09, 0xa4, 0x4a, 0x20, 0xb5, 0x3d, 0x87, 0x83, 0x2b, 0x24, 0xc4, - 0x25, 0x5a, 0xdb, 0xcb, 0x66, 0x21, 0xf6, 0x46, 0xbb, 0x9b, 0x8a, 0x5c, 0x39, 0x55, 0xe2, 0xc2, - 0x47, 0x28, 0x77, 0x90, 0x38, 0xf0, 0x21, 0x38, 0x56, 0x70, 0xe1, 0x88, 0x92, 0x03, 0x7c, 0x0c, - 0x64, 0xaf, 0x9d, 0x3f, 0xa6, 0x29, 0x91, 0x10, 0x37, 0x6e, 0x9e, 0x99, 0x37, 0xf3, 0xde, 0x3c, - 0x7b, 0xd7, 0x60, 0x5b, 0x52, 0xd7, 0x83, 0x1e, 0xe3, 0x18, 0x7a, 0x7d, 0x8a, 0x43, 0x09, 0x4f, - 0xf6, 0xa0, 0x7c, 0x69, 0x0f, 0x38, 0x93, 0x4c, 0xdf, 0x88, 0xaa, 0x76, 0x54, 0xb5, 0x55, 0xd5, - 0x3e, 0xd9, 0x33, 0x6b, 0x84, 0x11, 0x16, 0xd7, 0x61, 0xf4, 0xa4, 0xa0, 0xe6, 0x16, 0x61, 0x8c, - 0xf4, 0x31, 0x8c, 0x23, 0x77, 0xf8, 0x0c, 0xa2, 0x70, 0x94, 0x94, 0x36, 0x3d, 0x26, 0x02, 0x26, - 0x60, 0x20, 0x48, 0x34, 0x3d, 0x10, 0x24, 0xed, 0x51, 0x85, 0xae, 0x1a, 0xa6, 0x02, 0x55, 0x6a, - 0xbc, 0xd6, 0x40, 0xb5, 0x23, 0xc8, 0xe3, 0x81, 0x8f, 0x24, 0x3e, 0x8a, 0xb9, 0xf5, 0xeb, 0x00, - 0x78, 0x3d, 0x44, 0xc3, 0x6e, 0x88, 0x02, 0x6c, 0x68, 0x75, 0xad, 0x59, 0x76, 0xca, 0x71, 0xe6, - 0x11, 0x0a, 0xb0, 0xbe, 0x0b, 0x4a, 0x3d, 0x8c, 0x7c, 0xcc, 0x8d, 0x7c, 0x5d, 0x6b, 0x56, 0xda, - 0x35, 0x5b, 0x49, 0xb2, 0x53, 0x49, 0xf6, 0x41, 0x38, 0x72, 0x12, 0x8c, 0x7e, 0x0d, 0x94, 0x04, - 0x25, 0x21, 0xe6, 0x46, 0x21, 0x1e, 0x94, 0x44, 0xfb, 0x1b, 0xa7, 0x67, 0x3b, 0xb9, 0x1f, 0x67, - 0x3b, 0xb9, 0x57, 0xdf, 0x3f, 0xdc, 0x4e, 0x92, 0x8d, 0x2d, 0xb0, 0x99, 0x11, 0xe3, 0x60, 0x31, - 0x60, 0xa1, 0xc0, 0x8d, 0x77, 0xf9, 0x58, 0xe8, 0x11, 0xc7, 0x33, 0xa1, 0x35, 0x50, 0x94, 0x54, - 0xf6, 0x53, 0x8d, 0x2a, 0xd0, 0xeb, 0xa0, 0xe2, 0x63, 0xe1, 0x71, 0x3a, 0x90, 0x94, 0x85, 0xb1, - 0xc8, 0xb2, 0x33, 0x9f, 0xca, 0x2c, 0x58, 0xc8, 0x2e, 0x78, 0x1f, 0xac, 0xab, 0xb7, 0xd0, 0x15, - 0x12, 0x49, 0x6c, 0xac, 0x5d, 0xb2, 0x66, 0x45, 0x21, 0x8f, 0x23, 0xa0, 0xfe, 0x00, 0x54, 0xbd, - 0x48, 0x6c, 0x28, 0x86, 0x22, 0xe9, 0x2d, 0x5e, 0xd2, 0x7b, 0x65, 0x0a, 0x56, 0xed, 0xf7, 0x40, - 0x19, 0x0d, 0x65, 0x8f, 0x71, 0x2a, 0x47, 0x46, 0x29, 0x52, 0x75, 0x68, 0x7c, 0xfe, 0xd8, 0xaa, - 0x25, 0x2f, 0xec, 0xc0, 0xf7, 0x39, 0x16, 0xe2, 0x58, 0x72, 0x1a, 0x12, 0x67, 0x06, 0xdd, 0xd7, - 0x4f, 0x13, 0x1b, 0x67, 0xb9, 0xc4, 0xc9, 0x79, 0xb7, 0xa6, 0x4e, 0xbe, 0xcf, 0x83, 0xab, 0xb1, - 0xcb, 0x84, 0x23, 0xff, 0x9f, 0x95, 0xbf, 0xb5, 0xd2, 0x04, 0x46, 0xd6, 0xae, 0xa9, 0x97, 0x5f, - 0x34, 0xa0, 0x77, 0x04, 0x71, 0x30, 0xa1, 0x42, 0x62, 0xee, 0xe0, 0x3e, 0x1a, 0x61, 0xfe, 0xb7, - 0xdc, 0x34, 0xc1, 0x7f, 0x5c, 0x31, 0x08, 0x63, 0xad, 0x5e, 0x68, 0x96, 0x9d, 0x69, 0xbc, 0xb8, - 0x71, 0xf1, 0xcf, 0x36, 0xde, 0x06, 0xe6, 0xaf, 0x4b, 0xa5, 0x3b, 0xb7, 0xdf, 0x16, 0x40, 0xa1, - 0x23, 0x88, 0xee, 0x82, 0xf5, 0x85, 0xd3, 0x78, 0xc3, 0xbe, 0xe0, 0x16, 0xb3, 0x33, 0x5f, 0xa1, - 0xb9, 0xbb, 0x0a, 0x2a, 0xe5, 0x8a, 0x38, 0x16, 0xae, 0xa6, 0xa5, 0x1c, 0xf3, 0xa8, 0xe5, 0x1c, - 0x17, 0xdd, 0x2c, 0x3a, 0x06, 0xff, 0x2f, 0x9e, 0x85, 0x9b, 0xcb, 0xdb, 0xe7, 0x60, 0x66, 0x6b, - 0x25, 0xd8, 0x94, 0xe6, 0x05, 0xa8, 0x66, 0x3f, 0x93, 0x5b, 0xcb, 0x26, 0x64, 0x80, 0x26, 0x5c, - 0x11, 0x98, 0x92, 0x1d, 0x3e, 0xf9, 0x34, 0xb6, 0xb4, 0xf3, 0xb1, 0xa5, 0x7d, 0x1b, 0x5b, 0xda, - 0x9b, 0x89, 0x95, 0x3b, 0x9f, 0x58, 0xb9, 0xaf, 0x13, 0x2b, 0xf7, 0xf4, 0x21, 0xa1, 0xb2, 0x37, - 0x74, 0x6d, 0x8f, 0x05, 0xd0, 0xa5, 0x28, 0x7c, 0x4e, 0x31, 0xa2, 0x30, 0x1a, 0xdf, 0x22, 0x0c, - 0x06, 0xcc, 0x1f, 0xf6, 0xb1, 0x80, 0xb3, 0xbf, 0xd5, 0x9d, 0x76, 0x2b, 0xf9, 0x61, 0xc9, 0xd1, - 0x00, 0x0b, 0xb7, 0x14, 0x9f, 0xbb, 0xbb, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x84, 0x02, 0x00, - 0x1d, 0xd1, 0x06, 0x00, 0x00, + 0x10, 0x8d, 0x9b, 0x26, 0xfa, 0x65, 0xdb, 0x1f, 0x41, 0x6e, 0x44, 0x5d, 0xab, 0xb8, 0x51, 0x04, + 0x22, 0xaa, 0x1a, 0x2f, 0x0d, 0x12, 0x48, 0x95, 0x40, 0x6a, 0x7b, 0x0e, 0x07, 0x57, 0x48, 0x88, + 0x4b, 0xb4, 0xb6, 0x97, 0xcd, 0x42, 0xec, 0x8d, 0x76, 0x37, 0x15, 0xb9, 0x21, 0x4e, 0x95, 0xb8, + 0xf0, 0x11, 0x7a, 0xe4, 0x00, 0x52, 0x0f, 0x7c, 0x08, 0x8e, 0x15, 0x5c, 0x38, 0xa2, 0xe4, 0x50, + 0x3e, 0x06, 0xb2, 0xd7, 0xce, 0x1f, 0xd3, 0x94, 0x48, 0x88, 0x1b, 0x37, 0xcf, 0xcc, 0x9b, 0x79, + 0x6f, 0x9e, 0xbd, 0x6b, 0xb0, 0x29, 0xa9, 0xeb, 0x41, 0x8f, 0x71, 0x0c, 0xbd, 0x2e, 0xc5, 0xa1, + 0x84, 0xc7, 0xbb, 0x50, 0xbe, 0xb2, 0x7b, 0x9c, 0x49, 0xa6, 0xaf, 0x45, 0x55, 0x3b, 0xaa, 0xda, + 0xaa, 0x6a, 0x1f, 0xef, 0x9a, 0x15, 0xc2, 0x08, 0x8b, 0xeb, 0x30, 0x7a, 0x52, 0x50, 0x73, 0x83, + 0x30, 0x46, 0xba, 0x18, 0xc6, 0x91, 0xdb, 0x7f, 0x0e, 0x51, 0x38, 0x48, 0x4a, 0xeb, 0x1e, 0x13, + 0x01, 0x13, 0x30, 0x10, 0x24, 0x9a, 0x1e, 0x08, 0x92, 0xf6, 0xa8, 0x42, 0x5b, 0x0d, 0x53, 0x81, + 0x2a, 0xd5, 0xde, 0x6a, 0xa0, 0xdc, 0x12, 0xe4, 0x49, 0xcf, 0x47, 0x12, 0x1f, 0xc6, 0xdc, 0xfa, + 0x4d, 0x00, 0xbc, 0x0e, 0xa2, 0x61, 0x3b, 0x44, 0x01, 0x36, 0xb4, 0xaa, 0x56, 0x2f, 0x39, 0xa5, + 0x38, 0xf3, 0x18, 0x05, 0x58, 0xdf, 0x01, 0xc5, 0x0e, 0x46, 0x3e, 0xe6, 0xc6, 0x52, 0x55, 0xab, + 0xaf, 0x34, 0x2b, 0xb6, 0x92, 0x64, 0xa7, 0x92, 0xec, 0xfd, 0x70, 0xe0, 0x24, 0x18, 0xfd, 0x06, + 0x28, 0x0a, 0x4a, 0x42, 0xcc, 0x8d, 0x7c, 0x3c, 0x28, 0x89, 0xf6, 0xd6, 0x4e, 0x4e, 0xb7, 0x72, + 0x3f, 0x4e, 0xb7, 0x72, 0x6f, 0x2e, 0xce, 0xb6, 0x93, 0x64, 0x6d, 0x03, 0xac, 0x67, 0xc4, 0x38, + 0x58, 0xf4, 0x58, 0x28, 0x70, 0xed, 0xc3, 0x52, 0x2c, 0xf4, 0x90, 0xe3, 0x89, 0xd0, 0x0a, 0x28, + 0x48, 0x2a, 0xbb, 0xa9, 0x46, 0x15, 0xe8, 0x55, 0xb0, 0xe2, 0x63, 0xe1, 0x71, 0xda, 0x93, 0x94, + 0x85, 0xb1, 0xc8, 0x92, 0x33, 0x9d, 0xca, 0x2c, 0x98, 0xcf, 0x2e, 0xf8, 0x00, 0xac, 0xaa, 0xb7, + 0xd0, 0x16, 0x12, 0x49, 0x6c, 0x2c, 0x5f, 0xb1, 0xe6, 0x8a, 0x42, 0x1e, 0x45, 0x40, 0xfd, 0x21, + 0x28, 0x7b, 0x91, 0xd8, 0x50, 0xf4, 0x45, 0xd2, 0x5b, 0xb8, 0xa2, 0xf7, 0xda, 0x18, 0xac, 0xda, + 0xef, 0x83, 0x12, 0xea, 0xcb, 0x0e, 0xe3, 0x54, 0x0e, 0x8c, 0x62, 0xa4, 0xea, 0xc0, 0xf8, 0xf2, + 0xa9, 0x51, 0x49, 0x5e, 0xd8, 0xbe, 0xef, 0x73, 0x2c, 0xc4, 0x91, 0xe4, 0x34, 0x24, 0xce, 0x04, + 0xba, 0xa7, 0x9f, 0x24, 0x36, 0x4e, 0x72, 0x89, 0x93, 0xd3, 0x6e, 0x8d, 0x9d, 0xfc, 0xb8, 0x04, + 0xae, 0xc7, 0x2e, 0x13, 0x8e, 0xfc, 0x7f, 0x56, 0xfe, 0xd6, 0x4a, 0x13, 0x18, 0x59, 0xbb, 0xc6, + 0x5e, 0x7e, 0xd5, 0x80, 0xde, 0x12, 0xc4, 0xc1, 0x84, 0x0a, 0x89, 0xb9, 0x83, 0xbb, 0x68, 0x80, + 0xf9, 0xdf, 0x72, 0xd3, 0x04, 0xff, 0x71, 0xc5, 0x20, 0x8c, 0xe5, 0x6a, 0xbe, 0x5e, 0x72, 0xc6, + 0xf1, 0xec, 0xc6, 0x85, 0x3f, 0xdb, 0x78, 0x13, 0x98, 0xbf, 0x2e, 0x95, 0xee, 0xdc, 0x7c, 0x9f, + 0x07, 0xf9, 0x96, 0x20, 0xba, 0x0b, 0x56, 0x67, 0x4e, 0xe3, 0x2d, 0xfb, 0x92, 0x5b, 0xcc, 0xce, + 0x7c, 0x85, 0xe6, 0xce, 0x22, 0xa8, 0x94, 0x2b, 0xe2, 0x98, 0xb9, 0x9a, 0xe6, 0x72, 0x4c, 0xa3, + 0xe6, 0x73, 0x5c, 0x76, 0xb3, 0xe8, 0x18, 0xfc, 0x3f, 0x7b, 0x16, 0x6e, 0xcf, 0x6f, 0x9f, 0x82, + 0x99, 0x8d, 0x85, 0x60, 0x63, 0x9a, 0x97, 0xa0, 0x9c, 0xfd, 0x4c, 0xee, 0xcc, 0x9b, 0x90, 0x01, + 0x9a, 0x70, 0x41, 0x60, 0x4a, 0x66, 0x16, 0x5e, 0x5f, 0x9c, 0x6d, 0x6b, 0x07, 0x4f, 0x3f, 0x0f, + 0x2d, 0xed, 0x7c, 0x68, 0x69, 0xdf, 0x87, 0x96, 0xf6, 0x6e, 0x64, 0xe5, 0xce, 0x47, 0x56, 0xee, + 0xdb, 0xc8, 0xca, 0x3d, 0x7b, 0x44, 0xa8, 0xec, 0xf4, 0x5d, 0xdb, 0x63, 0x01, 0x74, 0x29, 0x0a, + 0x5f, 0x50, 0x8c, 0x28, 0x8c, 0x58, 0x1a, 0x84, 0xc1, 0x80, 0xf9, 0xfd, 0x2e, 0x16, 0x70, 0xf2, + 0xd3, 0xba, 0xdb, 0x6c, 0x24, 0xff, 0x2d, 0x39, 0xe8, 0x61, 0xe1, 0x16, 0xe3, 0xe3, 0x77, 0xef, + 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x9b, 0x72, 0xb5, 0xd8, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/tibc/core/04-packet/client/utils/utils.go b/modules/tibc/core/04-packet/client/utils/utils.go index 5da44a29..69005a27 100644 --- a/modules/tibc/core/04-packet/client/utils/utils.go +++ b/modules/tibc/core/04-packet/client/utils/utils.go @@ -3,8 +3,8 @@ package utils import ( "context" + errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/client" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/bianjieai/tibc-go/modules/tibc/core/04-packet/types" host "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" @@ -44,7 +44,7 @@ func queryPacketCommitmentABCI( // check if packet commitment exists if len(value) == 0 { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( types.ErrPacketCommitmentNotFound, "source chain name (%s), dest chain name (%s), sequence (%d)", sourceChain, destChain, sequence, @@ -123,7 +123,7 @@ func queryPacketAcknowledgementABCI( } if len(value) == 0 { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( types.ErrInvalidAcknowledgement, "source chain name (%s), dest chain name (%s), sequence (%d)", sourceChain, destChain, sequence, @@ -168,7 +168,7 @@ func queryCleanPacketCommitmentABCI( // check if packet commitment exists if len(value) == 0 { - return nil, sdkerrors.Wrapf(types.ErrPacketCommitmentNotFound, "source chain name (%s), dest chain name (%s)", sourceChain, destChain) + return nil, errorsmod.Wrapf(types.ErrPacketCommitmentNotFound, "source chain name (%s), dest chain name (%s)", sourceChain, destChain) } return types.NewQueryCleanPacketCommitmentResponse(value, proofBz, proofHeight), nil diff --git a/modules/tibc/core/04-packet/keeper/grpc_query.go b/modules/tibc/core/04-packet/keeper/grpc_query.go index 8429f55d..8f655508 100644 --- a/modules/tibc/core/04-packet/keeper/grpc_query.go +++ b/modules/tibc/core/04-packet/keeper/grpc_query.go @@ -8,7 +8,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/cosmos/cosmos-sdk/store/prefix" + "cosmossdk.io/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" diff --git a/modules/tibc/core/04-packet/keeper/keeper.go b/modules/tibc/core/04-packet/keeper/keeper.go index f0b4b36f..3748ffab 100644 --- a/modules/tibc/core/04-packet/keeper/keeper.go +++ b/modules/tibc/core/04-packet/keeper/keeper.go @@ -5,12 +5,12 @@ import ( "strings" db "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/bianjieai/tibc-go/modules/tibc/core/04-packet/types" host "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" @@ -254,7 +254,7 @@ func (k Keeper) IteratePacketSequence( // GetAllPacketSendSeqs returns all stored next send sequences. func (k Keeper) GetAllPacketSendSeqs(ctx sdk.Context) (seqs []types.PacketSequence) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyNextSeqSendPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyNextSeqSendPrefix)) k.IteratePacketSequence( ctx, iterator, @@ -270,7 +270,7 @@ func (k Keeper) GetAllPacketSendSeqs(ctx sdk.Context) (seqs []types.PacketSequen // GetAllPacketRecvSeqs returns all stored next recv sequences. func (k Keeper) GetAllPacketRecvSeqs(ctx sdk.Context) (seqs []types.PacketSequence) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyNextSeqRecvPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyNextSeqRecvPrefix)) k.IteratePacketSequence( ctx, iterator, @@ -286,7 +286,7 @@ func (k Keeper) GetAllPacketRecvSeqs(ctx sdk.Context) (seqs []types.PacketSequen // GetAllPacketAckSeqs returns all stored next acknowledgements sequences. func (k Keeper) GetAllPacketAckSeqs(ctx sdk.Context) (seqs []types.PacketSequence) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyNextSeqAckPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyNextSeqAckPrefix)) k.IteratePacketSequence( ctx, iterator, @@ -307,7 +307,7 @@ func (k Keeper) IteratePacketCommitment( cb func(sourceChain, destChain string, sequence uint64, hash []byte) bool, ) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyPacketCommitmentPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyPacketCommitmentPrefix)) k.iterateHashes(ctx, iterator, cb) } @@ -333,7 +333,7 @@ func (k Keeper) IteratePacketCommitmentAtChannel( cb func(_, _ string, sequence uint64, hash []byte) bool, ) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator( + iterator := storetypes.KVStorePrefixIterator( store, []byte(host.PacketCommitmentPrefixPath(sourceChain, destChain)), ) @@ -367,7 +367,7 @@ func (k Keeper) IteratePacketReceipt( cb func(sourceChain, destChain string, sequence uint64, receipt []byte) bool, ) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyPacketReceiptPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyPacketReceiptPrefix)) k.iterateHashes(ctx, iterator, cb) } @@ -392,7 +392,7 @@ func (k Keeper) IteratePacketAcknowledgement( cb func(sourceChain, destChain string, sequence uint64, hash []byte) bool, ) { store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyPacketAckPrefix)) + iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyPacketAckPrefix)) k.iterateHashes(ctx, iterator, cb) } @@ -441,13 +441,13 @@ func (k Keeper) ValidatePacket(ctx sdk.Context, packet exported.PacketI) error { chainName := k.clientKeeper.GetChainName(ctx) if packet.GetRelayChain() != chainName && packet.GetDestChain() != chainName && packet.GetSourceChain() != chainName { - return sdkerrors.Wrap(types.ErrInvalidPacket, "packet/ack illegal!") + return errorsmod.Wrap(types.ErrInvalidPacket, "packet/ack illegal!") } currentCleanSeq := sdk.BigEndianToUint64( k.GetCleanPacketCommitment(ctx, packet.GetSourceChain(), packet.GetDestChain()), ) if packet.GetSequence() <= currentCleanSeq { - return sdkerrors.Wrap(types.ErrInvalidPacket, "sequence illegal!") + return errorsmod.Wrap(types.ErrInvalidPacket, "sequence illegal!") } return nil } @@ -462,11 +462,11 @@ func (k Keeper) ValidateCleanPacket(ctx sdk.Context, cleanPacket exported.CleanP ) currentMaxAckSeq := k.GetMaxAckSequence(ctx, sourceChain, destChain) if packetSeq <= currentCleanSeq || packetSeq > currentMaxAckSeq { - return sdkerrors.Wrap(types.ErrInvalidCleanPacket, "sequence illegal!") + return errorsmod.Wrap(types.ErrInvalidCleanPacket, "sequence illegal!") } for seq := currentCleanSeq; seq <= packetSeq; seq++ { if k.HasPacketCommitment(ctx, sourceChain, destChain, seq) { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( types.ErrInvalidCleanPacket, "packet with sequence %d has not been ack", seq, diff --git a/modules/tibc/core/04-packet/keeper/packet.go b/modules/tibc/core/04-packet/keeper/packet.go index ebcc5b24..17fe9fe4 100644 --- a/modules/tibc/core/04-packet/keeper/packet.go +++ b/modules/tibc/core/04-packet/keeper/packet.go @@ -4,6 +4,7 @@ import ( "bytes" "fmt" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -16,10 +17,10 @@ import ( // by the calling module to the corresponding module on the counterparty chain. func (k Keeper) SendPacket(ctx sdk.Context, packet exported.PacketI) error { if err := packet.ValidateBasic(); err != nil { - return sdkerrors.Wrap(err, "packet failed basic validation") + return errorsmod.Wrap(err, "packet failed basic validation") } if packet.GetSourceChain() != k.clientKeeper.GetChainName(ctx) { - return sdkerrors.Wrap(types.ErrInvalidPacket, "source chain of packet is not this chain") + return errorsmod.Wrap(types.ErrInvalidPacket, "source chain of packet is not this chain") } targetChain := packet.GetDestChain() @@ -35,7 +36,7 @@ func (k Keeper) SendPacket(ctx sdk.Context, packet exported.PacketI) error { nextSequenceSend := k.GetNextSequenceSend(ctx, packet.GetSourceChain(), packet.GetDestChain()) if packet.GetSequence() != nextSequenceSend { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( types.ErrInvalidPacket, "packet sequence ≠ next send sequence (%d ≠ %d)", packet.GetSequence(), nextSequenceSend, ) @@ -80,12 +81,12 @@ func (k Keeper) RecvPacket( proofHeight exported.Height, ) error { if err := k.ValidatePacket(ctx, packet); err != nil { - return sdkerrors.Wrap(err, "packet failed basic validation") + return errorsmod.Wrap(err, "packet failed basic validation") } // check if the packet receipt has been received already for unordered channels _, found := k.GetPacketReceipt(ctx, packet.GetSourceChain(), packet.GetDestChain(), packet.GetSequence()) if found { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( types.ErrInvalidPacket, "packet sequence (%d) already has been received", packet.GetSequence(), ) @@ -98,7 +99,7 @@ func (k Keeper) RecvPacket( targetClient, found := k.clientKeeper.GetClientState(ctx, fromChain) if !found { - return sdkerrors.Wrap(clienttypes.ErrClientNotFound, fromChain) + return errorsmod.Wrap(clienttypes.ErrClientNotFound, fromChain) } commitment := types.CommitPacket(packet) @@ -108,7 +109,7 @@ func (k Keeper) RecvPacket( proof, packet.GetSourceChain(), packet.GetDestChain(), packet.GetSequence(), commitment, ); err != nil { - return sdkerrors.Wrapf(err, "failed packet commitment verification for client (%s)", fromChain) + return errorsmod.Wrapf(err, "failed packet commitment verification for client (%s)", fromChain) } // All verification complete, update state @@ -143,7 +144,7 @@ func (k Keeper) RecvPacket( } if _, found = k.clientKeeper.GetClientState(ctx, packet.GetDestChain()); !found { - return sdkerrors.Wrap(clienttypes.ErrClientNotFound, fromChain) + return errorsmod.Wrap(clienttypes.ErrClientNotFound, fromChain) } k.SetPacketCommitment(ctx, packet.GetSourceChain(), packet.GetDestChain(), packet.GetSequence(), commitment) @@ -188,7 +189,7 @@ func (k Keeper) WriteAcknowledgement( acknowledgement []byte, ) error { if len(acknowledgement) == 0 { - return sdkerrors.Wrap(types.ErrInvalidAcknowledgement, "acknowledgement cannot be empty") + return errorsmod.Wrap(types.ErrInvalidAcknowledgement, "acknowledgement cannot be empty") } // NOTE: TIBC app modules might have written the acknowledgement synchronously on @@ -252,7 +253,7 @@ func (k Keeper) AcknowledgePacket( proofHeight exported.Height, ) error { if err := k.ValidatePacket(ctx, packet); err != nil { - return sdkerrors.Wrap(err, "AcknowledgePacket failed basic validation") + return errorsmod.Wrap(err, "AcknowledgePacket failed basic validation") } commitment := k.GetPacketCommitment(ctx, packet.GetSourceChain(), packet.GetDestChain(), packet.GetSequence()) @@ -260,7 +261,7 @@ func (k Keeper) AcknowledgePacket( // verify we sent the packet and haven't cleared it out yet if !bytes.Equal(commitment, packetCommitment) { - return sdkerrors.Wrapf(types.ErrInvalidPacket, "commitment bytes are not equal: got (%v), expected (%v)", packetCommitment, commitment) + return errorsmod.Wrapf(types.ErrInvalidPacket, "commitment bytes are not equal: got (%v), expected (%v)", packetCommitment, commitment) } chainName := k.clientKeeper.GetChainName(ctx) @@ -271,7 +272,7 @@ func (k Keeper) AcknowledgePacket( clientState, found := k.clientKeeper.GetClientState(ctx, fromChain) if !found { - return sdkerrors.Wrap(clienttypes.ErrClientNotFound, fromChain) + return errorsmod.Wrap(clienttypes.ErrClientNotFound, fromChain) } ackCommitment := types.CommitAcknowledgement(acknowledgement) @@ -280,7 +281,7 @@ func (k Keeper) AcknowledgePacket( proof, packet.GetSourceChain(), packet.GetDestChain(), packet.GetSequence(), ackCommitment, ); err != nil { - return sdkerrors.Wrapf(err, "failed packet acknowledgement verification for client (%s)", fromChain) + return errorsmod.Wrapf(err, "failed packet acknowledgement verification for client (%s)", fromChain) } // Delete packet commitment, since the packet has been acknowledged, the commitement is no longer necessary @@ -310,7 +311,7 @@ func (k Keeper) AcknowledgePacket( if packet.GetRelayChain() == chainName { if _, found = k.clientKeeper.GetClientState(ctx, packet.GetSourceChain()); !found { - return sdkerrors.Wrap(clienttypes.ErrClientNotFound, fromChain) + return errorsmod.Wrap(clienttypes.ErrClientNotFound, fromChain) } // set the acknowledgement so that it can be verified on the other side k.SetPacketAcknowledgement( @@ -343,7 +344,7 @@ func (k Keeper) AcknowledgePacket( func (k Keeper) CleanPacket(ctx sdk.Context, cleanPacket exported.CleanPacketI) error { sourceChain := k.clientKeeper.GetChainName(ctx) if err := cleanPacket.ValidateBasic(); err != nil { - return sdkerrors.Wrap(err, "packet failed basic validation") + return errorsmod.Wrap(err, "packet failed basic validation") } if err := k.ValidateCleanPacket(ctx, types.CleanPacket{ Sequence: cleanPacket.GetSequence(), @@ -351,7 +352,7 @@ func (k Keeper) CleanPacket(ctx sdk.Context, cleanPacket exported.CleanPacketI) DestinationChain: cleanPacket.GetDestChain(), RelayChain: cleanPacket.GetRelayChain(), }); err != nil { - return sdkerrors.Wrap(err, "packet failed basic validation") + return errorsmod.Wrap(err, "packet failed basic validation") } targetChain := cleanPacket.GetDestChain() @@ -397,7 +398,7 @@ func (k Keeper) RecvCleanPacket( proofHeight exported.Height, ) error { if err := k.ValidateCleanPacket(ctx, cleanPacket); err != nil { - return sdkerrors.Wrap(err, "packet failed basic validation") + return errorsmod.Wrap(err, "packet failed basic validation") } chainName := k.clientKeeper.GetChainName(ctx) fromChain := cleanPacket.GetSourceChain() @@ -407,7 +408,7 @@ func (k Keeper) RecvCleanPacket( targetClient, found := k.clientKeeper.GetClientState(ctx, fromChain) if !found { - return sdkerrors.Wrap(clienttypes.ErrClientNotFound, fromChain) + return errorsmod.Wrap(clienttypes.ErrClientNotFound, fromChain) } if err := targetClient.VerifyPacketCleanCommitment(ctx, @@ -415,7 +416,7 @@ func (k Keeper) RecvCleanPacket( proof, cleanPacket.GetSourceChain(), cleanPacket.GetDestChain(), cleanPacket.GetSequence(), ); err != nil { - return sdkerrors.Wrapf(err, "failed packet commitment verification for client (%s)", fromChain) + return errorsmod.Wrapf(err, "failed packet commitment verification for client (%s)", fromChain) } k.cleanAcknowledgementBySeq(ctx, cleanPacket.GetSourceChain(), cleanPacket.GetDestChain(), cleanPacket.GetSequence()) @@ -439,7 +440,7 @@ func (k Keeper) RecvCleanPacket( if cleanPacket.GetRelayChain() == chainName { if _, found = k.clientKeeper.GetClientState(ctx, cleanPacket.GetDestChain()); !found { - return sdkerrors.Wrap(clienttypes.ErrClientNotFound, fromChain) + return errorsmod.Wrap(clienttypes.ErrClientNotFound, fromChain) } // Emit Event with Packet data along with other packet information for relayer to pick up // and relay to other chain diff --git a/modules/tibc/core/04-packet/simulation/decoder_test.go b/modules/tibc/core/04-packet/simulation/decoder_test.go index 48d512d9..7da11b32 100644 --- a/modules/tibc/core/04-packet/simulation/decoder_test.go +++ b/modules/tibc/core/04-packet/simulation/decoder_test.go @@ -15,7 +15,7 @@ import ( ) func TestDecodeStore(t *testing.T) { - app := simapp.Setup(false) + app := simapp.Setup(t) cdc := app.AppCodec() channelID := "channelidone" diff --git a/modules/tibc/core/04-packet/types/errors.go b/modules/tibc/core/04-packet/types/errors.go index 43891ad0..81b71cad 100644 --- a/modules/tibc/core/04-packet/types/errors.go +++ b/modules/tibc/core/04-packet/types/errors.go @@ -1,8 +1,7 @@ package types import ( - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - + errorsmod "cosmossdk.io/errors" host "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" ) @@ -10,13 +9,13 @@ const moduleName = host.ModuleName + "-" + SubModuleName // TIBC packet sentinel errors var ( - ErrSequenceSendNotFound = sdkerrors.Register(moduleName, 2, "sequence send not found") - ErrSequenceReceiveNotFound = sdkerrors.Register(moduleName, 3, "sequence receive not found") - ErrSequenceAckNotFound = sdkerrors.Register(moduleName, 4, "sequence acknowledgement not found") - ErrInvalidPacket = sdkerrors.Register(moduleName, 5, "invalid packet") - ErrInvalidAcknowledgement = sdkerrors.Register(moduleName, 6, "invalid acknowledgement") - ErrPacketCommitmentNotFound = sdkerrors.Register(moduleName, 7, "packet commitment not found") - ErrPacketReceived = sdkerrors.Register(moduleName, 8, "packet already received") - ErrAcknowledgementExists = sdkerrors.Register(moduleName, 9, "acknowledgement for packet already exists") - ErrInvalidCleanPacket = sdkerrors.Register(moduleName, 10, "invalid clean packet") + ErrSequenceSendNotFound = errorsmod.Register(moduleName, 2, "sequence send not found") + ErrSequenceReceiveNotFound = errorsmod.Register(moduleName, 3, "sequence receive not found") + ErrSequenceAckNotFound = errorsmod.Register(moduleName, 4, "sequence acknowledgement not found") + ErrInvalidPacket = errorsmod.Register(moduleName, 5, "invalid packet") + ErrInvalidAcknowledgement = errorsmod.Register(moduleName, 6, "invalid acknowledgement") + ErrPacketCommitmentNotFound = errorsmod.Register(moduleName, 7, "packet commitment not found") + ErrPacketReceived = errorsmod.Register(moduleName, 8, "packet already received") + ErrAcknowledgementExists = errorsmod.Register(moduleName, 9, "acknowledgement for packet already exists") + ErrInvalidCleanPacket = errorsmod.Register(moduleName, 10, "invalid clean packet") ) diff --git a/modules/tibc/core/04-packet/types/expected_keepers.go b/modules/tibc/core/04-packet/types/expected_keepers.go index fcdb18ff..03deebd5 100644 --- a/modules/tibc/core/04-packet/types/expected_keepers.go +++ b/modules/tibc/core/04-packet/types/expected_keepers.go @@ -1,6 +1,7 @@ package types import ( + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/bianjieai/tibc-go/modules/tibc/core/exported" @@ -10,7 +11,7 @@ import ( type ClientKeeper interface { GetClientState(ctx sdk.Context, chainName string) (exported.ClientState, bool) GetClientConsensusState(ctx sdk.Context, chainName string, height exported.Height) (exported.ConsensusState, bool) - ClientStore(ctx sdk.Context, chainName string) sdk.KVStore + ClientStore(ctx sdk.Context, chainName string) storetypes.KVStore GetChainName(ctx sdk.Context) string } diff --git a/modules/tibc/core/04-packet/types/msgs.go b/modules/tibc/core/04-packet/types/msgs.go index b86d5450..97c90257 100644 --- a/modules/tibc/core/04-packet/types/msgs.go +++ b/modules/tibc/core/04-packet/types/msgs.go @@ -3,6 +3,7 @@ package types import ( "encoding/base64" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -30,14 +31,14 @@ func NewMsgRecvPacket( // ValidateBasic implements sdk.Msg func (msg MsgRecvPacket) ValidateBasic() error { if len(msg.ProofCommitment) == 0 { - return sdkerrors.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty proof") + return errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty proof") } if msg.ProofHeight.IsZero() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") + return errorsmod.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } _, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } return msg.Packet.ValidateBasic() } @@ -78,17 +79,17 @@ func NewMsgAcknowledgement( // ValidateBasic implements sdk.Msg func (msg MsgAcknowledgement) ValidateBasic() error { if len(msg.ProofAcked) == 0 { - return sdkerrors.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty proof") + return errorsmod.Wrap(commitmenttypes.ErrInvalidProof, "cannot submit an empty proof") } if msg.ProofHeight.IsZero() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") + return errorsmod.Wrap(sdkerrors.ErrInvalidHeight, "proof height must be non-zero") } if len(msg.Acknowledgement) == 0 { - return sdkerrors.Wrap(ErrInvalidAcknowledgement, "ack bytes cannot be empty") + return errorsmod.Wrap(ErrInvalidAcknowledgement, "ack bytes cannot be empty") } _, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } return msg.Packet.ValidateBasic() } @@ -117,7 +118,7 @@ func NewMsgCleanPacket(packet CleanPacket, signer sdk.AccAddress) *MsgCleanPacke func (msg MsgCleanPacket) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } return msg.CleanPacket.ValidateBasic() } @@ -131,8 +132,10 @@ func (msg MsgCleanPacket) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{signer} } -// NewMsgCleanPacket constructs new MsgCleanPacket -// nolint:interfacer +// NewMsgRecvCleanPacket constructs a new MsgRecvCleanPacket instance, which is used +// to receive a clean packet in the TIBC protocol. It takes a CleanPacket, a proof +// of commitment, the height at which the proof was generated, and the address of the +// signer as parameters. func NewMsgRecvCleanPacket( cleanPacket CleanPacket, proofCommitment []byte, @@ -151,7 +154,7 @@ func NewMsgRecvCleanPacket( func (msg MsgRecvCleanPacket) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err) } return msg.CleanPacket.ValidateBasic() } diff --git a/modules/tibc/core/04-packet/types/msgs_test.go b/modules/tibc/core/04-packet/types/msgs_test.go index c971c79f..ad61ec2a 100644 --- a/modules/tibc/core/04-packet/types/msgs_test.go +++ b/modules/tibc/core/04-packet/types/msgs_test.go @@ -6,13 +6,12 @@ import ( "github.com/stretchr/testify/suite" - dbm "github.com/cometbft/cometbft-db" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" - - "github.com/cosmos/cosmos-sdk/store/iavl" - "github.com/cosmos/cosmos-sdk/store/rootmulti" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/log" + "cosmossdk.io/store/iavl" + "cosmossdk.io/store/metrics" + "cosmossdk.io/store/rootmulti" + storetypes "cosmossdk.io/store/types" + dbm "github.com/cosmos/cosmos-db" sdk "github.com/cosmos/cosmos-sdk/types" clienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" @@ -54,9 +53,9 @@ type TypesTestSuite struct { } func (suite *TypesTestSuite) SetupTest() { - app := simapp.Setup(false) + app := simapp.Setup(suite.T()) db := dbm.NewMemDB() - store := rootmulti.NewStore(db, log.NewNopLogger()) + store := rootmulti.NewStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) storeKey := storetypes.NewKVStoreKey("iavlStoreKey") store.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, nil) @@ -66,11 +65,12 @@ func (suite *TypesTestSuite) SetupTest() { iavlStore.Set([]byte("KEY"), []byte("VALUE")) _ = store.Commit() - res := store.Query(abci.RequestQuery{ + res,err := store.Query(&storetypes.RequestQuery{ Path: fmt.Sprintf("/%s/key", storeKey.Name()), // required path to get key/value+proof Data: []byte("KEY"), Prove: true, }) + suite.Require().NoError(err) merkleProof, err := commitmenttypes.ConvertProofs(res.ProofOps) suite.Require().NoError(err) diff --git a/modules/tibc/core/04-packet/types/packet.go b/modules/tibc/core/04-packet/types/packet.go index cdf85019..cc560a55 100644 --- a/modules/tibc/core/04-packet/types/packet.go +++ b/modules/tibc/core/04-packet/types/packet.go @@ -3,9 +3,9 @@ package types import ( "crypto/sha256" + errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/bianjieai/tibc-go/modules/tibc/core/exported" ) @@ -66,10 +66,10 @@ func (p Packet) GetData() []byte { return p.Data } // ValidateBasic implements PacketI interface func (p Packet) ValidateBasic() error { if p.Sequence == 0 { - return sdkerrors.Wrap(ErrInvalidPacket, "packet sequence cannot be 0") + return errorsmod.Wrap(ErrInvalidPacket, "packet sequence cannot be 0") } if len(p.Data) == 0 { - return sdkerrors.Wrap(ErrInvalidPacket, "packet data bytes cannot be empty") + return errorsmod.Wrap(ErrInvalidPacket, "packet data bytes cannot be empty") } return nil } @@ -103,7 +103,7 @@ func (p CleanPacket) GetRelayChain() string { return p.RelayChain } // ValidateBasic implements PacketI interface func (p CleanPacket) ValidateBasic() error { if p.Sequence == 0 { - return sdkerrors.Wrap(ErrInvalidPacket, "packet sequence cannot be 0") + return errorsmod.Wrap(ErrInvalidPacket, "packet sequence cannot be 0") } return nil } diff --git a/modules/tibc/core/04-packet/types/tx.pb.go b/modules/tibc/core/04-packet/types/tx.pb.go index f7c611d6..5e462fb0 100644 --- a/modules/tibc/core/04-packet/types/tx.pb.go +++ b/modules/tibc/core/04-packet/types/tx.pb.go @@ -7,6 +7,7 @@ import ( context "context" fmt "fmt" types "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -354,44 +355,46 @@ func init() { func init() { proto.RegisterFile("tibc/core/packet/v1/tx.proto", fileDescriptor_1fd46e9a6c4c150c) } var fileDescriptor_1fd46e9a6c4c150c = []byte{ - // 586 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x95, 0xcf, 0x8f, 0xd2, 0x40, - 0x14, 0xc7, 0x5b, 0x16, 0x89, 0x3e, 0x50, 0x4c, 0x57, 0x59, 0x52, 0x36, 0x2d, 0xa9, 0x87, 0x25, - 0x9a, 0xed, 0xc8, 0x6a, 0x62, 0xdc, 0x83, 0xc9, 0xb2, 0x89, 0xd1, 0x03, 0x89, 0xe9, 0xc9, 0xa8, - 0x09, 0x29, 0xc3, 0x38, 0x54, 0x68, 0x87, 0xd0, 0x2e, 0xba, 0x07, 0xef, 0x1e, 0xf5, 0x1f, 0x30, - 0x7b, 0xf2, 0xee, 0x7f, 0xb1, 0xc7, 0x3d, 0x7a, 0x22, 0x06, 0x2e, 0x9e, 0xf9, 0x0b, 0x4c, 0x67, - 0x0a, 0x94, 0x02, 0x4a, 0x62, 0xf6, 0xe2, 0xad, 0x6f, 0xde, 0xf7, 0xfd, 0x98, 0xcf, 0xbc, 0xe9, - 0xc0, 0x6e, 0xe0, 0x34, 0x31, 0xc2, 0xac, 0x4f, 0x50, 0xcf, 0xc6, 0x1d, 0x12, 0xa0, 0x41, 0x15, - 0x05, 0x1f, 0xcc, 0x5e, 0x9f, 0x05, 0x4c, 0xd9, 0x0e, 0xbd, 0x66, 0xe8, 0x35, 0x85, 0xd7, 0x1c, - 0x54, 0xd5, 0x5b, 0x94, 0x51, 0xc6, 0xfd, 0x28, 0xfc, 0x12, 0x52, 0xb5, 0x3c, 0x4f, 0x84, 0xbb, - 0x0e, 0xf1, 0x78, 0x22, 0xf1, 0xb5, 0xac, 0x98, 0x97, 0x8a, 0xd2, 0x72, 0x85, 0xf1, 0x25, 0x05, - 0xd7, 0xeb, 0x3e, 0xb5, 0x08, 0x1e, 0xbc, 0xe0, 0xeb, 0xca, 0x63, 0xc8, 0x08, 0x45, 0x51, 0x2e, - 0xcb, 0x95, 0xec, 0x41, 0xc9, 0x5c, 0xd1, 0x91, 0x29, 0xc4, 0xb5, 0xf4, 0xf9, 0x50, 0x97, 0xac, - 0x28, 0x40, 0x79, 0x0a, 0x37, 0x7b, 0x7d, 0xc6, 0xde, 0x36, 0x30, 0x73, 0x5d, 0x27, 0x70, 0x89, - 0x17, 0x14, 0x53, 0x65, 0xb9, 0x92, 0xab, 0x95, 0x26, 0x43, 0x7d, 0xe7, 0xd4, 0x76, 0xbb, 0x87, - 0x46, 0x52, 0x61, 0x58, 0x79, 0xbe, 0x74, 0x3c, 0x5b, 0x51, 0x5e, 0x43, 0x4e, 0xa8, 0xda, 0xc4, - 0xa1, 0xed, 0xa0, 0xb8, 0xb5, 0xd4, 0x48, 0xb4, 0xcb, 0x41, 0xd5, 0x7c, 0xc6, 0x25, 0xb5, 0x52, - 0xd8, 0xc8, 0x64, 0xa8, 0x6f, 0xc7, 0x8b, 0x88, 0x70, 0xc3, 0xca, 0x72, 0x53, 0x28, 0x95, 0x02, - 0x64, 0x7c, 0x87, 0x7a, 0xa4, 0x5f, 0x4c, 0x97, 0xe5, 0xca, 0x35, 0x2b, 0xb2, 0x0e, 0xaf, 0x7e, - 0x3a, 0xd3, 0xa5, 0x5f, 0x67, 0xba, 0x64, 0xec, 0xc0, 0xed, 0x05, 0x24, 0x16, 0xf1, 0x7b, 0xcc, - 0xf3, 0x89, 0xf1, 0x3d, 0x05, 0x4a, 0xdd, 0xa7, 0x47, 0xb8, 0xe3, 0xb1, 0xf7, 0x5d, 0xd2, 0xa2, - 0x84, 0xb7, 0xfb, 0x0f, 0xc4, 0x2a, 0x90, 0xb7, 0x17, 0xb3, 0x09, 0x60, 0x56, 0x72, 0x59, 0x79, - 0x04, 0x62, 0x17, 0x8d, 0x30, 0xb0, 0xc5, 0x91, 0xe4, 0x6a, 0x85, 0xc9, 0x50, 0x57, 0xe2, 0x3b, - 0xe6, 0x4e, 0xc3, 0x02, 0x6e, 0x1d, 0x85, 0xc6, 0x12, 0xcc, 0xf4, 0xe5, 0xc0, 0xbc, 0xb2, 0x06, - 0xe6, 0x2e, 0xa8, 0xcb, 0xc8, 0x66, 0x44, 0x3f, 0xc2, 0x8d, 0xba, 0x4f, 0x8f, 0xbb, 0xc4, 0xf6, - 0xa2, 0xf1, 0x7b, 0x0e, 0x39, 0x1c, 0x9a, 0x8d, 0x05, 0xa4, 0xe5, 0x95, 0x48, 0x63, 0x71, 0x11, - 0xd7, 0x2c, 0x8e, 0xa5, 0x9a, 0x37, 0x97, 0x5a, 0xd3, 0x5c, 0x11, 0x0a, 0x8b, 0xe5, 0x67, 0x8d, - 0x7d, 0x13, 0x47, 0x1d, 0x0e, 0xc1, 0x25, 0x75, 0xf7, 0x9f, 0x5c, 0x16, 0x71, 0xbe, 0x09, 0x4e, - 0x53, 0x8c, 0x07, 0x5f, 0xb7, 0x60, 0xab, 0xee, 0x53, 0xe5, 0x0d, 0x40, 0xec, 0x17, 0x63, 0xac, - 0xe4, 0xb5, 0x70, 0xe7, 0xd4, 0xbb, 0x7f, 0xd7, 0x4c, 0xab, 0x28, 0x1d, 0xc8, 0x27, 0xef, 0xe4, - 0xde, 0xba, 0xf0, 0x84, 0x50, 0x45, 0x1b, 0x0a, 0x67, 0xc5, 0x1a, 0x90, 0x8d, 0x4f, 0xc4, 0x9d, - 0x75, 0xf1, 0x31, 0x91, 0x7a, 0x6f, 0x03, 0x51, 0x7c, 0x37, 0xc9, 0xb1, 0xdb, 0xfb, 0x13, 0x8c, - 0x78, 0x21, 0xb4, 0xa1, 0x70, 0x5a, 0xac, 0xf6, 0xf2, 0x7c, 0xa4, 0xc9, 0x17, 0x23, 0x4d, 0xfe, - 0x39, 0xd2, 0xe4, 0xcf, 0x63, 0x4d, 0xba, 0x18, 0x6b, 0xd2, 0x8f, 0xb1, 0x26, 0xbd, 0x7a, 0x42, - 0x9d, 0xa0, 0x7d, 0xd2, 0x34, 0x31, 0x73, 0x51, 0xd3, 0xb1, 0xbd, 0x77, 0x0e, 0xb1, 0x1d, 0x14, - 0xa6, 0xdf, 0xa7, 0x0c, 0xb9, 0xac, 0x75, 0xd2, 0x25, 0x3e, 0x9a, 0x3f, 0x30, 0xf7, 0x1f, 0xee, - 0x47, 0x6f, 0x4c, 0x70, 0xda, 0x23, 0x7e, 0x33, 0xc3, 0x1f, 0x98, 0x07, 0xbf, 0x03, 0x00, 0x00, - 0xff, 0xff, 0x4a, 0x8b, 0xa6, 0x9b, 0xef, 0x06, 0x00, 0x00, + // 615 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x55, 0x41, 0x8f, 0xd2, 0x40, + 0x14, 0x6e, 0x81, 0x25, 0x71, 0x40, 0x31, 0x45, 0x81, 0x94, 0x4d, 0x4b, 0xea, 0x61, 0x09, 0x66, + 0x3b, 0xb2, 0x9a, 0x18, 0xf7, 0x60, 0xb2, 0x6c, 0x62, 0xf4, 0x40, 0x62, 0x7a, 0x32, 0x6a, 0x42, + 0x4a, 0x19, 0x87, 0x0a, 0xed, 0x10, 0xa6, 0x8b, 0xee, 0xcd, 0x78, 0xda, 0xa3, 0x3f, 0xc0, 0xc3, + 0x5e, 0xbc, 0xaf, 0x77, 0x7f, 0xc0, 0x1e, 0xf7, 0xe8, 0x89, 0x18, 0x38, 0xac, 0x67, 0x7e, 0x81, + 0xe9, 0x4c, 0x81, 0x52, 0x58, 0x21, 0x31, 0x7b, 0xf1, 0xd6, 0xf7, 0xde, 0xf7, 0xe6, 0xfb, 0xde, + 0xc7, 0x1b, 0x06, 0x6c, 0x7b, 0x76, 0xd3, 0x82, 0x16, 0xe9, 0x23, 0xd8, 0x33, 0xad, 0x0e, 0xf2, + 0xe0, 0xa0, 0x0a, 0xbd, 0x8f, 0x7a, 0xaf, 0x4f, 0x3c, 0x22, 0x65, 0xfd, 0xaa, 0xee, 0x57, 0x75, + 0x5e, 0xd5, 0x07, 0x55, 0xf9, 0x0e, 0x26, 0x98, 0xb0, 0x3a, 0xf4, 0xbf, 0x38, 0x54, 0xce, 0x5b, + 0x84, 0x3a, 0x84, 0x42, 0x87, 0x62, 0xff, 0x08, 0x87, 0xe2, 0xa0, 0x50, 0x9a, 0x33, 0x58, 0x5d, + 0x1b, 0xb9, 0x8c, 0x81, 0x7f, 0x2d, 0x23, 0xe6, 0x1a, 0x02, 0x3e, 0x86, 0xd0, 0xbe, 0xc6, 0xc0, + 0xcd, 0x3a, 0xc5, 0x06, 0xb2, 0x06, 0x2f, 0x59, 0x5e, 0x7a, 0x02, 0x92, 0x1c, 0x51, 0x10, 0x4b, + 0x62, 0x39, 0xb5, 0x57, 0xd4, 0x57, 0x48, 0xd5, 0x39, 0xb8, 0x96, 0x38, 0x1f, 0xaa, 0x82, 0x11, + 0x34, 0x48, 0xcf, 0xc0, 0xed, 0x5e, 0x9f, 0x90, 0x77, 0x0d, 0x8b, 0x38, 0x8e, 0xed, 0x39, 0xc8, + 0xf5, 0x0a, 0xb1, 0x92, 0x58, 0x4e, 0xd7, 0x8a, 0x93, 0xa1, 0x9a, 0x3f, 0x36, 0x9d, 0xee, 0xbe, + 0x16, 0x45, 0x68, 0x46, 0x86, 0xa5, 0x0e, 0x67, 0x19, 0xe9, 0x0d, 0x48, 0x73, 0x54, 0x1b, 0xd9, + 0xb8, 0xed, 0x15, 0xe2, 0x4b, 0x42, 0x82, 0x29, 0x07, 0x55, 0xfd, 0x39, 0x83, 0xd4, 0x8a, 0xbe, + 0x90, 0xc9, 0x50, 0xcd, 0x86, 0x49, 0x78, 0xbb, 0x66, 0xa4, 0x58, 0xc8, 0x91, 0x52, 0x0e, 0x24, + 0xa9, 0x8d, 0x5d, 0xd4, 0x2f, 0x24, 0x4a, 0x62, 0xf9, 0x86, 0x11, 0x44, 0xfb, 0xd9, 0x93, 0x53, + 0x55, 0xf8, 0x7d, 0xaa, 0x0a, 0x9f, 0x2f, 0xcf, 0x2a, 0x41, 0x52, 0xcb, 0x83, 0xbb, 0x0b, 0xee, + 0x18, 0x88, 0xf6, 0x88, 0x4b, 0x91, 0xf6, 0x23, 0x06, 0xa4, 0x3a, 0xc5, 0x07, 0x56, 0xc7, 0x25, + 0x1f, 0xba, 0xa8, 0x85, 0x11, 0x53, 0xfe, 0x0f, 0xe6, 0x95, 0x41, 0xc6, 0x5c, 0x3c, 0x8d, 0x7b, + 0x67, 0x44, 0xd3, 0xd2, 0x63, 0xc0, 0x07, 0x6a, 0xf8, 0x8d, 0x2d, 0xe6, 0x4e, 0xba, 0x96, 0x9b, + 0x0c, 0x55, 0x29, 0x3c, 0x3c, 0x2b, 0x6a, 0x06, 0x60, 0xd1, 0x81, 0x1f, 0x2c, 0xf9, 0x9a, 0xb8, + 0x1e, 0x5f, 0xb7, 0xd6, 0xfb, 0xba, 0x0d, 0xe4, 0x65, 0xf7, 0x66, 0xe6, 0x9e, 0x88, 0xe0, 0x56, + 0x9d, 0xe2, 0xc3, 0x2e, 0x32, 0xdd, 0x60, 0x2b, 0x5f, 0x80, 0xb4, 0xe5, 0x87, 0x8d, 0x05, 0x7b, + 0x4b, 0x2b, 0xed, 0x0d, 0xf5, 0x05, 0x1e, 0xa7, 0xac, 0xd0, 0x51, 0x73, 0xa1, 0xb1, 0xf5, 0x42, + 0x0b, 0x20, 0xb7, 0xa8, 0x64, 0x26, 0xf2, 0x3b, 0xdf, 0x00, 0x7f, 0x37, 0xae, 0x49, 0xe8, 0xff, + 0x77, 0x9d, 0xf8, 0xcf, 0x1e, 0xb1, 0x6c, 0xea, 0xe8, 0xde, 0xb7, 0x38, 0x88, 0xd7, 0x29, 0x96, + 0xde, 0x02, 0x10, 0xfa, 0x3f, 0xd2, 0x56, 0x5a, 0xb7, 0x70, 0x2b, 0xe5, 0xca, 0x7a, 0xcc, 0x94, + 0x45, 0xea, 0x80, 0x4c, 0xf4, 0xd6, 0xee, 0x5c, 0xd5, 0x1e, 0x01, 0xca, 0x70, 0x43, 0xe0, 0x8c, + 0xac, 0x01, 0x52, 0xe1, 0xe5, 0xb8, 0x77, 0x55, 0x7f, 0x08, 0x24, 0xdf, 0xdf, 0x00, 0x14, 0x9e, + 0x26, 0xba, 0x81, 0x3b, 0x7f, 0x33, 0x23, 0x4c, 0x04, 0x37, 0x04, 0x4e, 0xc9, 0xe4, 0xad, 0x4f, + 0x97, 0x67, 0x15, 0xb1, 0xf6, 0xea, 0x7c, 0xa4, 0x88, 0x17, 0x23, 0x45, 0xfc, 0x35, 0x52, 0xc4, + 0x2f, 0x63, 0x45, 0xb8, 0x18, 0x2b, 0xc2, 0xcf, 0xb1, 0x22, 0xbc, 0x7e, 0x8a, 0x6d, 0xaf, 0x7d, + 0xd4, 0xd4, 0x2d, 0xe2, 0xc0, 0xa6, 0x6d, 0xba, 0xef, 0x6d, 0x64, 0xda, 0xd0, 0x67, 0xd9, 0xc5, + 0x04, 0x3a, 0xa4, 0x75, 0xd4, 0x45, 0x14, 0xce, 0x1f, 0xa5, 0x07, 0x8f, 0x76, 0x83, 0x77, 0xc9, + 0x3b, 0xee, 0x21, 0xda, 0x4c, 0xb2, 0x47, 0xe9, 0xe1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2f, + 0xc8, 0xb1, 0x4f, 0x3c, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/tibc/core/23-commitment/types/commitment.pb.go b/modules/tibc/core/23-commitment/types/commitment.pb.go index 683fa729..c053253c 100644 --- a/modules/tibc/core/23-commitment/types/commitment.pb.go +++ b/modules/tibc/core/23-commitment/types/commitment.pb.go @@ -67,7 +67,7 @@ var xxx_messageInfo_MerkleRoot proto.InternalMessageInfo // The constructed key from the Path and the key will be append(Path.KeyPath, // append(Path.KeyPrefix, key...)) type MerklePrefix struct { - KeyPrefix []byte `protobuf:"bytes,1,opt,name=key_prefix,json=keyPrefix,proto3" json:"key_prefix,omitempty" yaml:"key_prefix"` + KeyPrefix []byte `protobuf:"bytes,1,opt,name=key_prefix,json=keyPrefix,proto3" json:"key_prefix,omitempty"` } func (m *MerklePrefix) Reset() { *m = MerklePrefix{} } @@ -114,7 +114,7 @@ func (m *MerklePrefix) GetKeyPrefix() []byte { // arbitrary structured object (defined by a commitment type). // MerklePath is represented from root-to-leaf type MerklePath struct { - KeyPath []string `protobuf:"bytes,1,rep,name=key_path,json=keyPath,proto3" json:"key_path,omitempty" yaml:"key_path"` + KeyPath []string `protobuf:"bytes,1,rep,name=key_path,json=keyPath,proto3" json:"key_path,omitempty"` } func (m *MerklePath) Reset() { *m = MerklePath{} } @@ -217,29 +217,27 @@ func init() { } var fileDescriptor_e76044a26d8b9539 = []byte{ - // 350 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0xcf, 0x4e, 0xea, 0x40, - 0x14, 0xc6, 0xdb, 0x5c, 0xc2, 0xbd, 0x0c, 0x24, 0x37, 0x56, 0x8d, 0x86, 0x98, 0x42, 0xba, 0x30, - 0x6c, 0x98, 0x09, 0xe0, 0xc2, 0xb0, 0xac, 0x26, 0xae, 0x4c, 0x48, 0x97, 0xc6, 0xc4, 0x4c, 0xeb, - 0xd0, 0x8e, 0x50, 0x4e, 0xd3, 0x19, 0x88, 0x7d, 0x03, 0x97, 0x2e, 0x5d, 0xfa, 0x38, 0x2e, 0x59, - 0xba, 0x22, 0x06, 0xde, 0x80, 0x27, 0x30, 0x33, 0x23, 0xd2, 0xdd, 0x39, 0x39, 0xbf, 0xf3, 0xe7, - 0xfb, 0x0e, 0xea, 0x48, 0x1e, 0x46, 0x24, 0x82, 0x9c, 0x91, 0x08, 0xd2, 0x94, 0xcb, 0x94, 0xcd, - 0x24, 0x59, 0xf4, 0x4a, 0x19, 0xce, 0x72, 0x90, 0xe0, 0x9c, 0x28, 0x12, 0x2b, 0x12, 0x97, 0x6a, - 0x8b, 0x5e, 0xf3, 0x28, 0x86, 0x18, 0x34, 0x43, 0x54, 0x64, 0xf0, 0xe6, 0x59, 0x04, 0x22, 0x05, - 0x41, 0x78, 0x24, 0xfa, 0x03, 0x35, 0x30, 0xcb, 0x01, 0xc6, 0xc2, 0x54, 0xbd, 0x73, 0x84, 0x6e, - 0x59, 0x3e, 0x99, 0xb2, 0x00, 0x40, 0x3a, 0x0e, 0xaa, 0x24, 0x54, 0x24, 0xa7, 0x76, 0xdb, 0xee, - 0x34, 0x02, 0x1d, 0x0f, 0x2b, 0x2f, 0xef, 0x2d, 0xcb, 0xbb, 0x46, 0x0d, 0xc3, 0x8d, 0x72, 0x36, - 0xe6, 0xcf, 0xce, 0x05, 0x42, 0x13, 0x56, 0x3c, 0x64, 0x3a, 0x33, 0xbc, 0x7f, 0xbc, 0x5d, 0xb5, - 0x0e, 0x0a, 0x9a, 0x4e, 0x87, 0xde, 0xbe, 0xe6, 0x05, 0xb5, 0x09, 0x2b, 0x4c, 0x97, 0xe7, 0xef, - 0xb6, 0x8d, 0xa8, 0x4c, 0x1c, 0x8c, 0xfe, 0x69, 0x8e, 0x4a, 0xb5, 0xf1, 0x4f, 0xa7, 0xe6, 0x1f, - 0x6e, 0x57, 0xad, 0xff, 0xa5, 0x09, 0x54, 0x26, 0x5e, 0xf0, 0x57, 0xf5, 0x53, 0x99, 0x0c, 0x2b, - 0x6f, 0xea, 0x92, 0x1b, 0x54, 0xdf, 0x5d, 0x02, 0x30, 0x76, 0x2e, 0x51, 0xd5, 0x08, 0xd2, 0x23, - 0xea, 0xfd, 0x36, 0x36, 0x7a, 0xb1, 0xd6, 0x8b, 0x17, 0x3d, 0x7c, 0xf5, 0x6b, 0x92, 0xee, 0x08, - 0x7e, 0x78, 0xff, 0xfe, 0x63, 0xed, 0xda, 0xcb, 0xb5, 0x6b, 0x7f, 0xad, 0x5d, 0xfb, 0x75, 0xe3, - 0x5a, 0xcb, 0x8d, 0x6b, 0x7d, 0x6e, 0x5c, 0xeb, 0xce, 0x8f, 0xb9, 0x4c, 0xe6, 0xa1, 0xb2, 0x97, - 0x84, 0x9c, 0xce, 0x9e, 0x38, 0xa3, 0x9c, 0x28, 0xdb, 0xbb, 0x31, 0x90, 0x14, 0x1e, 0xe7, 0x53, - 0x26, 0xc8, 0xfe, 0x61, 0xfd, 0x41, 0xb7, 0xf4, 0x33, 0x59, 0x64, 0x4c, 0x84, 0x55, 0xed, 0xef, - 0xe0, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xa7, 0x04, 0x13, 0xd8, 0x01, 0x00, 0x00, + // 320 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0xb1, 0x4e, 0xf3, 0x30, + 0x14, 0x85, 0x13, 0xfd, 0x55, 0x7f, 0xea, 0x76, 0xb2, 0x90, 0x80, 0x0a, 0x4c, 0xd5, 0x01, 0x75, + 0x89, 0xad, 0xb6, 0x0b, 0xea, 0x58, 0x06, 0x26, 0xa4, 0x2a, 0x23, 0x42, 0x42, 0x4e, 0x70, 0x13, + 0xd3, 0xa6, 0x37, 0x8a, 0xdd, 0x8a, 0xbe, 0x01, 0x23, 0x23, 0x23, 0x8f, 0xc3, 0xd8, 0x91, 0x11, + 0x25, 0x2f, 0x82, 0x6c, 0xb7, 0x90, 0xed, 0x5e, 0x9d, 0xcf, 0x47, 0x3e, 0xe7, 0xa2, 0x81, 0x96, + 0x51, 0xcc, 0x62, 0x28, 0x04, 0x8b, 0x21, 0xcb, 0xa4, 0xce, 0xc4, 0x4a, 0xb3, 0xcd, 0xb0, 0xb6, + 0xd1, 0xbc, 0x00, 0x0d, 0xf8, 0xc4, 0x90, 0xd4, 0x90, 0xb4, 0xa6, 0x6d, 0x86, 0xdd, 0xe3, 0x04, + 0x12, 0xb0, 0x0c, 0x33, 0x93, 0xc3, 0xbb, 0xe7, 0x31, 0xa8, 0x0c, 0x14, 0x93, 0xb1, 0x1a, 0x8d, + 0x8d, 0x61, 0x5e, 0x00, 0xcc, 0x95, 0x53, 0xfb, 0x57, 0x08, 0xdd, 0x89, 0x62, 0xb1, 0x14, 0x21, + 0x80, 0xc6, 0x18, 0x35, 0x52, 0xae, 0xd2, 0x53, 0xbf, 0xe7, 0x0f, 0x3a, 0xa1, 0x9d, 0x27, 0x8d, + 0xd7, 0x8f, 0x4b, 0xaf, 0x1f, 0xa0, 0x8e, 0xe3, 0x66, 0x85, 0x98, 0xcb, 0x17, 0x7c, 0x81, 0xd0, + 0x42, 0x6c, 0x1f, 0x73, 0xbb, 0xed, 0xf9, 0xd6, 0x42, 0x6c, 0x9d, 0xdc, 0x0f, 0x0e, 0xb6, 0x33, + 0xae, 0x53, 0x7c, 0x86, 0x8e, 0x2c, 0xcc, 0xb5, 0xb1, 0xfe, 0x37, 0x68, 0x85, 0xff, 0x0d, 0xca, + 0x75, 0x3a, 0x69, 0xbc, 0x1b, 0xf7, 0x5b, 0xd4, 0x3e, 0xb8, 0x03, 0xcc, 0xf1, 0x35, 0x6a, 0xba, + 0x4f, 0x5a, 0xba, 0x3d, 0xea, 0x51, 0x97, 0x81, 0xda, 0x0c, 0x74, 0x33, 0xa4, 0x37, 0xbf, 0xc1, + 0xed, 0x8b, 0x70, 0xcf, 0x4f, 0x1f, 0x3e, 0x4b, 0xe2, 0xef, 0x4a, 0xe2, 0x7f, 0x97, 0xc4, 0x7f, + 0xab, 0x88, 0xb7, 0xab, 0x88, 0xf7, 0x55, 0x11, 0xef, 0x7e, 0x9a, 0x48, 0x9d, 0xae, 0x23, 0x53, + 0x19, 0x8b, 0x24, 0x5f, 0x3d, 0x4b, 0xc1, 0x25, 0x33, 0x55, 0x06, 0x09, 0xb0, 0x0c, 0x9e, 0xd6, + 0x4b, 0xa1, 0xd8, 0xdf, 0x11, 0x46, 0xe3, 0xa0, 0x76, 0x07, 0xbd, 0xcd, 0x85, 0x8a, 0x9a, 0xb6, + 0xb3, 0xf1, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x85, 0x38, 0x84, 0xa3, 0xac, 0x01, 0x00, 0x00, } func (m *MerkleRoot) Marshal() (dAtA []byte, err error) { diff --git a/modules/tibc/core/23-commitment/types/commitment_test.go b/modules/tibc/core/23-commitment/types/commitment_test.go index 55a84f98..6f5a7101 100644 --- a/modules/tibc/core/23-commitment/types/commitment_test.go +++ b/modules/tibc/core/23-commitment/types/commitment_test.go @@ -5,12 +5,12 @@ import ( "github.com/stretchr/testify/suite" - dbm "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" - - "github.com/cosmos/cosmos-sdk/store/iavl" - "github.com/cosmos/cosmos-sdk/store/rootmulti" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/log" + "cosmossdk.io/store/iavl" + "cosmossdk.io/store/metrics" + "cosmossdk.io/store/rootmulti" + storetypes "cosmossdk.io/store/types" + dbm "github.com/cosmos/cosmos-db" ) type MerkleTestSuite struct { @@ -23,7 +23,7 @@ type MerkleTestSuite struct { func (suite *MerkleTestSuite) SetupTest() { db := dbm.NewMemDB() - suite.store = rootmulti.NewStore(db, log.NewNopLogger()) + suite.store = rootmulti.NewStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) suite.storeKey = storetypes.NewKVStoreKey("iavlStoreKey") diff --git a/modules/tibc/core/23-commitment/types/errors.go b/modules/tibc/core/23-commitment/types/errors.go index 830d1bac..0376acc4 100644 --- a/modules/tibc/core/23-commitment/types/errors.go +++ b/modules/tibc/core/23-commitment/types/errors.go @@ -1,8 +1,7 @@ package types import ( - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - + errorsmod "cosmossdk.io/errors" host "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" ) @@ -13,7 +12,7 @@ const moduleName = host.ModuleName + "-" + SubModuleName // TIBC connection sentinel errors var ( - ErrInvalidProof = sdkerrors.Register(moduleName, 2, "invalid proof") - ErrInvalidPrefix = sdkerrors.Register(moduleName, 3, "invalid prefix") - ErrInvalidMerkleProof = sdkerrors.Register(moduleName, 4, "invalid merkle proof") + ErrInvalidProof = errorsmod.Register(moduleName, 2, "invalid proof") + ErrInvalidPrefix = errorsmod.Register(moduleName, 3, "invalid prefix") + ErrInvalidMerkleProof = errorsmod.Register(moduleName, 4, "invalid merkle proof") ) diff --git a/modules/tibc/core/23-commitment/types/merkle.go b/modules/tibc/core/23-commitment/types/merkle.go index 915db561..9e2ebcce 100644 --- a/modules/tibc/core/23-commitment/types/merkle.go +++ b/modules/tibc/core/23-commitment/types/merkle.go @@ -10,7 +10,7 @@ import ( tmcrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + errorsmod "cosmossdk.io/errors" "github.com/bianjieai/tibc-go/modules/tibc/core/exported" ) @@ -123,7 +123,7 @@ func (mp MerklePath) Empty() bool { // with the given path. func ApplyPrefix(prefix exported.Prefix, path MerklePath) (MerklePath, error) { if prefix == nil || prefix.Empty() { - return MerklePath{}, sdkerrors.Wrap(ErrInvalidPrefix, "prefix can't be empty") + return MerklePath{}, errorsmod.Wrap(ErrInvalidPrefix, "prefix can't be empty") } return NewMerklePath(append([]string{string(prefix.Bytes())}, path.KeyPath...)...), nil } @@ -144,17 +144,17 @@ func (proof MerkleProof) VerifyMembership( // VerifyMembership specific argument validation mpath, ok := path.(MerklePath) if !ok { - return sdkerrors.Wrapf(ErrInvalidProof, "path %v is not of type MerklePath", path) + return errorsmod.Wrapf(ErrInvalidProof, "path %v is not of type MerklePath", path) } if len(mpath.KeyPath) != len(specs) { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( ErrInvalidProof, "path length %d not same as proof %d", len(mpath.KeyPath), len(specs), ) } if len(value) == 0 { - return sdkerrors.Wrap(ErrInvalidProof, "empty value in membership proof") + return errorsmod.Wrap(ErrInvalidProof, "empty value in membership proof") } // Since every proof in chain is a membership proof we can use verifyChainedMembershipProof from index 0 @@ -180,10 +180,10 @@ func (proof MerkleProof) VerifyNonMembership( // VerifyNonMembership specific argument validation mpath, ok := path.(MerklePath) if !ok { - return sdkerrors.Wrapf(ErrInvalidProof, "path %v is not of type MerkleProof", path) + return errorsmod.Wrapf(ErrInvalidProof, "path %v is not of type MerkleProof", path) } if len(mpath.KeyPath) != len(specs) { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( ErrInvalidProof, "path length %d not same as proof %d", len(mpath.KeyPath), len(specs), ) @@ -195,14 +195,14 @@ func (proof MerkleProof) VerifyNonMembership( // of all subroots up to final root subroot, err := proof.Proofs[0].Calculate() if err != nil { - return sdkerrors.Wrapf(ErrInvalidProof, "could not calculate root for proof index 0, merkle tree is likely empty. %v", err) + return errorsmod.Wrapf(ErrInvalidProof, "could not calculate root for proof index 0, merkle tree is likely empty. %v", err) } key, err := mpath.GetKey(uint64(len(mpath.KeyPath) - 1)) if err != nil { - return sdkerrors.Wrapf(ErrInvalidProof, "could not retrieve key bytes for key: %s", mpath.KeyPath[len(mpath.KeyPath)-1]) + return errorsmod.Wrapf(ErrInvalidProof, "could not retrieve key bytes for key: %s", mpath.KeyPath[len(mpath.KeyPath)-1]) } if ok := ics23.VerifyNonMembership(specs[0], subroot, proof.Proofs[0], key); !ok { - return sdkerrors.Wrapf(ErrInvalidProof, "could not verify absence of key %s. Please ensure that the path is correct.", string(key)) + return errorsmod.Wrapf(ErrInvalidProof, "could not verify absence of key %s. Please ensure that the path is correct.", string(key)) } // Verify chained membership proof starting from index 1 with value = subroot @@ -210,12 +210,12 @@ func (proof MerkleProof) VerifyNonMembership( return err } case *ics23.CommitmentProof_Exist: - return sdkerrors.Wrapf( + return errorsmod.Wrapf( ErrInvalidProof, "got ExistenceProof in VerifyNonMembership. If this is unexpected, please ensure that proof was queried with the correct key.", ) default: - return sdkerrors.Wrapf( + return errorsmod.Wrapf( ErrInvalidProof, "expected proof type: %T, got: %T", &ics23.CommitmentProof_Exist{}, proof.Proofs[0].Proof, @@ -232,7 +232,7 @@ func (proof MerkleProof) BatchVerifyMembership( path exported.Path, items map[string][]byte, ) error { - return sdkerrors.Wrap(ErrInvalidProof, "batch proofs are currently unsupported") + return errorsmod.Wrap(ErrInvalidProof, "batch proofs are currently unsupported") } // BatchVerifyNonMembership verifies absence of a group of keys against the given root @@ -243,7 +243,7 @@ func (proof MerkleProof) BatchVerifyNonMembership( path exported.Path, items [][]byte, ) error { - return sdkerrors.Wrap(ErrInvalidProof, "batch proofs are currently unsupported") + return errorsmod.Wrap(ErrInvalidProof, "batch proofs are currently unsupported") } // verifyChainedMembershipProof takes a list of proofs and specs and verifies each proof sequentially ensuring that the value is committed to @@ -272,18 +272,18 @@ func verifyChainedMembershipProof( case *ics23.CommitmentProof_Exist: subroot, err = proofs[i].Calculate() if err != nil { - return sdkerrors.Wrapf(ErrInvalidProof, "could not calculate proof root at index %d, merkle tree may be empty. %v", i, err) + return errorsmod.Wrapf(ErrInvalidProof, "could not calculate proof root at index %d, merkle tree may be empty. %v", i, err) } // Since keys are passed in from highest to lowest, we must grab their indices in reverse order // from the proofs and specs which are lowest to highest key, err := keys.GetKey(uint64(len(keys.KeyPath) - 1 - i)) if err != nil { - return sdkerrors.Wrapf(ErrInvalidProof, "could not retrieve key bytes for key %s: %v", keys.KeyPath[len(keys.KeyPath)-1-i], err) + return errorsmod.Wrapf(ErrInvalidProof, "could not retrieve key bytes for key %s: %v", keys.KeyPath[len(keys.KeyPath)-1-i], err) } // verify membership of the proof at this index with appropriate key and value if ok := ics23.VerifyMembership(specs[i], subroot, proofs[i], key, value); !ok { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( ErrInvalidProof, "chained membership proof failed to verify membership of value: %X in subroot %X at index %d. Please ensure the path and value are both correct.", value, subroot, i, @@ -292,13 +292,13 @@ func verifyChainedMembershipProof( // Set value to subroot so that we verify next proof in chain commits to this subroot value = subroot case *ics23.CommitmentProof_Nonexist: - return sdkerrors.Wrapf( + return errorsmod.Wrapf( ErrInvalidProof, "chained membership proof contains nonexistence proof at index %d. If this is unexpected, please ensure that proof was queried from the height that contained the value in store and was queried with the correct key.", i, ) default: - return sdkerrors.Wrapf( + return errorsmod.Wrapf( ErrInvalidProof, "expected proof type: %T, got: %T", &ics23.CommitmentProof_Exist{}, proofs[i].Proof, @@ -307,7 +307,7 @@ func verifyChainedMembershipProof( } // Check that chained proof root equals passed-in root if !bytes.Equal(root, subroot) { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( ErrInvalidProof, "proof did not commit to expected root: %X, got: %X. Please ensure proof was submitted with correct proofHeight and to the correct chain.", root, @@ -341,15 +341,15 @@ func (proof MerkleProof) validateVerificationArgs( root exported.Root, ) error { if proof.Empty() { - return sdkerrors.Wrap(ErrInvalidMerkleProof, "proof cannot be empty") + return errorsmod.Wrap(ErrInvalidMerkleProof, "proof cannot be empty") } if root == nil || root.Empty() { - return sdkerrors.Wrap(ErrInvalidMerkleProof, "root cannot be empty") + return errorsmod.Wrap(ErrInvalidMerkleProof, "root cannot be empty") } if len(specs) != len(proof.Proofs) { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( ErrInvalidMerkleProof, "length of specs: %d not equal to length of proof: %d", len(specs), len(proof.Proofs), @@ -358,7 +358,7 @@ func (proof MerkleProof) validateVerificationArgs( for i, spec := range specs { if spec == nil { - return sdkerrors.Wrapf(ErrInvalidProof, "spec at position %d is nil", i) + return errorsmod.Wrapf(ErrInvalidProof, "spec at position %d is nil", i) } } return nil diff --git a/modules/tibc/core/23-commitment/types/merkle_test.go b/modules/tibc/core/23-commitment/types/merkle_test.go index c6cbe18e..520d956c 100644 --- a/modules/tibc/core/23-commitment/types/merkle_test.go +++ b/modules/tibc/core/23-commitment/types/merkle_test.go @@ -4,10 +4,9 @@ import ( "fmt" "testing" + storetypes "cosmossdk.io/store/types" "github.com/stretchr/testify/require" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/bianjieai/tibc-go/modules/tibc/core/23-commitment/types" ) @@ -15,7 +14,7 @@ func (suite *MerkleTestSuite) TestVerifyMembership() { suite.iavlStore.Set([]byte("MYKEY"), []byte("MYVALUE")) cid := suite.store.Commit() - res := suite.store.Query(abci.RequestQuery{ + res,err := suite.store.Query(&storetypes.RequestQuery{ Path: fmt.Sprintf( "/%s/key", suite.storeKey.Name(), @@ -23,7 +22,9 @@ func (suite *MerkleTestSuite) TestVerifyMembership() { Data: []byte("MYKEY"), Prove: true, }) + require.NoError(suite.T(), err) require.NotNil(suite.T(), res.ProofOps) + proof, err := types.ConvertProofs(res.ProofOps) require.NoError(suite.T(), err) @@ -161,7 +162,7 @@ func (suite *MerkleTestSuite) TestVerifyNonMembership() { cid := suite.store.Commit() // Get Proof - res := suite.store.Query(abci.RequestQuery{ + res,err := suite.store.Query(&storetypes.RequestQuery{ Path: fmt.Sprintf( "/%s/key", suite.storeKey.Name(), @@ -169,6 +170,7 @@ func (suite *MerkleTestSuite) TestVerifyNonMembership() { Data: []byte("MYABSENTKEY"), Prove: true, }) + require.NoError(suite.T(), err) require.NotNil(suite.T(), res.ProofOps) proof, err := types.ConvertProofs(res.ProofOps) diff --git a/modules/tibc/core/23-commitment/types/utils.go b/modules/tibc/core/23-commitment/types/utils.go index afa4d385..2ba202d8 100644 --- a/modules/tibc/core/23-commitment/types/utils.go +++ b/modules/tibc/core/23-commitment/types/utils.go @@ -5,13 +5,13 @@ import ( crypto "github.com/cometbft/cometbft/proto/tendermint/crypto" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + errorsmod "cosmossdk.io/errors" ) // ConvertProofs converts crypto.ProofOps into MerkleProof func ConvertProofs(tmProof *crypto.ProofOps) (MerkleProof, error) { if tmProof == nil { - return MerkleProof{}, sdkerrors.Wrapf(ErrInvalidMerkleProof, "tendermint proof is nil") + return MerkleProof{}, errorsmod.Wrapf(ErrInvalidMerkleProof, "tendermint proof is nil") } // Unmarshal all proof ops to CommitmentProof proofs := make([]*ics23.CommitmentProof, len(tmProof.Ops)) @@ -19,7 +19,7 @@ func ConvertProofs(tmProof *crypto.ProofOps) (MerkleProof, error) { var p ics23.CommitmentProof err := p.Unmarshal(op.Data) if err != nil || p.Proof == nil { - return MerkleProof{}, sdkerrors.Wrapf( + return MerkleProof{}, errorsmod.Wrapf( ErrInvalidMerkleProof, "could not unmarshal proof op into CommitmentProof at index %d: %v", i, diff --git a/modules/tibc/core/23-commitment/types/utils_test.go b/modules/tibc/core/23-commitment/types/utils_test.go index 3e24b4a6..42091a93 100644 --- a/modules/tibc/core/23-commitment/types/utils_test.go +++ b/modules/tibc/core/23-commitment/types/utils_test.go @@ -3,9 +3,9 @@ package types_test import ( "fmt" + storetypes "cosmossdk.io/store/types" "github.com/stretchr/testify/require" - abci "github.com/cometbft/cometbft/abci/types" crypto "github.com/cometbft/cometbft/proto/tendermint/crypto" "github.com/bianjieai/tibc-go/modules/tibc/core/23-commitment/types" @@ -29,7 +29,7 @@ func (suite *MerkleTestSuite) TestConvertProofs() { }{{ "success for ExistenceProof", func() { - res := suite.store.Query(abci.RequestQuery{ + res, err := suite.store.Query(&storetypes.RequestQuery{ Path: fmt.Sprintf( "/%s/key", suite.storeKey.Name(), @@ -37,6 +37,7 @@ func (suite *MerkleTestSuite) TestConvertProofs() { Data: []byte("MYKEY"), Prove: true, }) + suite.Require().NoError(err, "failed to query store") require.NotNil(suite.T(), res.ProofOps) proofOps = res.ProofOps @@ -45,7 +46,7 @@ func (suite *MerkleTestSuite) TestConvertProofs() { }, { "success for NonexistenceProof", func() { - res := suite.store.Query(abci.RequestQuery{ + res, err := suite.store.Query(&storetypes.RequestQuery{ Path: fmt.Sprintf( "/%s/key", suite.storeKey.Name(), @@ -53,6 +54,7 @@ func (suite *MerkleTestSuite) TestConvertProofs() { Data: []byte("NOTMYKEY"), Prove: true, }) + suite.Require().NoError(err, "failed to query store") require.NotNil(suite.T(), res.ProofOps) proofOps = res.ProofOps @@ -67,7 +69,7 @@ func (suite *MerkleTestSuite) TestConvertProofs() { }, { "proof op data is nil", func() { - res := suite.store.Query(abci.RequestQuery{ + res, err := suite.store.Query(&storetypes.RequestQuery{ Path: fmt.Sprintf( "/%s/key", suite.storeKey.Name(), @@ -75,6 +77,7 @@ func (suite *MerkleTestSuite) TestConvertProofs() { Data: []byte("MYKEY"), Prove: true, }) + suite.Require().NoError(err, "failed to query store") require.NotNil(suite.T(), res.ProofOps) proofOps = res.ProofOps diff --git a/modules/tibc/core/24-host/errors.go b/modules/tibc/core/24-host/errors.go index e3353aad..7e76c980 100644 --- a/modules/tibc/core/24-host/errors.go +++ b/modules/tibc/core/24-host/errors.go @@ -1,7 +1,7 @@ package host import ( - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + errorsmod "cosmossdk.io/errors" ) // SubModuleName defines the TICS 24 host @@ -11,8 +11,8 @@ const moduleName = ModuleName + "-" + SubModuleName // TIBC client sentinel errors var ( - ErrInvalidID = sdkerrors.Register(moduleName, 2, "invalid identifier") - ErrInvalidPath = sdkerrors.Register(moduleName, 3, "invalid path") - ErrInvalidPacket = sdkerrors.Register(moduleName, 4, "invalid packet") - ErrInvalidRule = sdkerrors.Register(moduleName, 5, "invalid routing rule") + ErrInvalidID = errorsmod.Register(moduleName, 2, "invalid identifier") + ErrInvalidPath = errorsmod.Register(moduleName, 3, "invalid path") + ErrInvalidPacket = errorsmod.Register(moduleName, 4, "invalid packet") + ErrInvalidRule = errorsmod.Register(moduleName, 5, "invalid routing rule") ) diff --git a/modules/tibc/core/24-host/parse.go b/modules/tibc/core/24-host/parse.go index d66cf289..ee8af52b 100644 --- a/modules/tibc/core/24-host/parse.go +++ b/modules/tibc/core/24-host/parse.go @@ -4,7 +4,7 @@ import ( "strconv" "strings" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + errorsmod "cosmossdk.io/errors" ) // ParseIdentifier parses the sequence from the identifier using the provided prefix. This function @@ -12,22 +12,22 @@ import ( // are required to use this format. func ParseIdentifier(identifier, prefix string) (uint64, error) { if !strings.HasPrefix(identifier, prefix) { - return 0, sdkerrors.Wrapf(ErrInvalidID, "identifier doesn't contain prefix `%s`", prefix) + return 0, errorsmod.Wrapf(ErrInvalidID, "identifier doesn't contain prefix `%s`", prefix) } splitStr := strings.Split(identifier, prefix) if len(splitStr) != 2 { - return 0, sdkerrors.Wrapf(ErrInvalidID, "identifier must be in format: `%s{N}`", prefix) + return 0, errorsmod.Wrapf(ErrInvalidID, "identifier must be in format: `%s{N}`", prefix) } // sanity check if splitStr[0] != "" { - return 0, sdkerrors.Wrapf(ErrInvalidID, "identifier must begin with prefix %s", prefix) + return 0, errorsmod.Wrapf(ErrInvalidID, "identifier must begin with prefix %s", prefix) } sequence, err := strconv.ParseUint(splitStr[1], 10, 64) if err != nil { - return 0, sdkerrors.Wrap(err, "failed to parse identifier sequence") + return 0, errorsmod.Wrap(err, "failed to parse identifier sequence") } return sequence, nil } @@ -37,7 +37,7 @@ func ParseIdentifier(identifier, prefix string) (uint64, error) { func ParseChannelPath(path string) (string, string, error) { split := strings.Split(path, "/") if len(split) < 3 { - return "", "", sdkerrors.Wrapf(ErrInvalidPath, "cannot parse channel path %s", path) + return "", "", errorsmod.Wrapf(ErrInvalidPath, "cannot parse channel path %s", path) } return split[1], split[2], nil diff --git a/modules/tibc/core/24-host/validate.go b/modules/tibc/core/24-host/validate.go index 42fe8659..7a056ded 100644 --- a/modules/tibc/core/24-host/validate.go +++ b/modules/tibc/core/24-host/validate.go @@ -4,7 +4,7 @@ import ( "regexp" "strings" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + errorsmod "cosmossdk.io/errors" ) // DefaultMaxCharacterLength defines the default maximum character length used @@ -35,19 +35,19 @@ type ValidateFn func(string) error func defaultIdentifierValidator(id string, min, max int) error { //nolint:unparam if strings.TrimSpace(id) == "" { - return sdkerrors.Wrap(ErrInvalidID, "identifier cannot be blank") + return errorsmod.Wrap(ErrInvalidID, "identifier cannot be blank") } // valid id MUST NOT contain "/" separator if strings.Contains(id, "/") { - return sdkerrors.Wrapf(ErrInvalidID, "identifier %s cannot contain separator '/'", id) + return errorsmod.Wrapf(ErrInvalidID, "identifier %s cannot contain separator '/'", id) } // valid id must fit the length requirements if len(id) < min || len(id) > max { - return sdkerrors.Wrapf(ErrInvalidID, "identifier %s has invalid length: %d, must be between %d-%d characters", id, len(id), min, max) + return errorsmod.Wrapf(ErrInvalidID, "identifier %s has invalid length: %d, must be between %d-%d characters", id, len(id), min, max) } // valid id must contain only lower alphabetic characters if !IsValidID(id) { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( ErrInvalidID, "identifier %s must contain only alphanumeric or the following characters: '.', '_', '+', '-', '#', '[', ']', '<', '>'", id, @@ -59,7 +59,7 @@ func defaultIdentifierValidator(id string, min, max int) error { //nolint:unpara func defaultRuleValidator(rule string) error { // valid rule must contain two dot if !IsValidRule(rule) { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( ErrInvalidRule, "rule %s must contain two ','", rule, @@ -108,13 +108,13 @@ func NewPathValidator(idValidator ValidateFn) ValidateFn { return func(path string) error { pathArr := strings.Split(path, "/") if len(pathArr) > 0 && pathArr[0] == path { - return sdkerrors.Wrapf(ErrInvalidPath, "path %s doesn't contain any separator '/'", path) + return errorsmod.Wrapf(ErrInvalidPath, "path %s doesn't contain any separator '/'", path) } for _, p := range pathArr { // a path beginning or ending in a separator returns empty string elements. if p == "" { - return sdkerrors.Wrapf(ErrInvalidPath, "path %s cannot begin or end with '/'", path) + return errorsmod.Wrapf(ErrInvalidPath, "path %s cannot begin or end with '/'", path) } if err := idValidator(p); err != nil { @@ -122,7 +122,7 @@ func NewPathValidator(idValidator ValidateFn) ValidateFn { } // Each path element must either be a valid identifier or constant number if err := defaultIdentifierValidator(p, 1, DefaultMaxCharacterLength); err != nil { - return sdkerrors.Wrapf(err, "path %s contains an invalid identifier: '%s'", path, p) + return errorsmod.Wrapf(err, "path %s contains an invalid identifier: '%s'", path, p) } } diff --git a/modules/tibc/core/26-routing/client/cli/tx.go b/modules/tibc/core/26-routing/client/cli/tx.go index 53d79c21..b290915e 100644 --- a/modules/tibc/core/26-routing/client/cli/tx.go +++ b/modules/tibc/core/26-routing/client/cli/tx.go @@ -68,10 +68,6 @@ func NewSetRoutingRulesProposalCmd() *cobra.Command { return err } - if err = msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/modules/tibc/core/26-routing/keeper/grpc_query.go b/modules/tibc/core/26-routing/keeper/grpc_query.go index a2cc86ba..dde37849 100644 --- a/modules/tibc/core/26-routing/keeper/grpc_query.go +++ b/modules/tibc/core/26-routing/keeper/grpc_query.go @@ -6,8 +6,8 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/bianjieai/tibc-go/modules/tibc/core/26-routing/types" ) @@ -24,7 +24,7 @@ func (q Keeper) RoutingRules(c context.Context, req *types.QueryRoutingRulesRequ if !found { return nil, status.Error( codes.NotFound, - sdkerrors.Wrap(types.ErrRoutingRulesNotFound, "routing rules not found").Error(), + errorsmod.Wrap(types.ErrRoutingRulesNotFound, "routing rules not found").Error(), ) } diff --git a/modules/tibc/core/26-routing/keeper/keeper.go b/modules/tibc/core/26-routing/keeper/keeper.go index 8bf67939..849a39d2 100644 --- a/modules/tibc/core/26-routing/keeper/keeper.go +++ b/modules/tibc/core/26-routing/keeper/keeper.go @@ -5,11 +5,10 @@ import ( "regexp" "strings" - "github.com/cometbft/cometbft/libs/log" - - storetypes "github.com/cosmos/cosmos-sdk/store/types" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" host "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" "github.com/bianjieai/tibc-go/modules/tibc/core/26-routing/types" @@ -48,12 +47,12 @@ func (k Keeper) SetRoutingRules(ctx sdk.Context, rules []string) error { for _, rule := range rules { valid, _ := regexp.MatchString(types.RulePattern, rule) if !valid { - return sdkerrors.Wrap(types.ErrInvalidRule, "invalid rule") + return errorsmod.Wrap(types.ErrInvalidRule, "invalid rule") } } routingBz, err := json.Marshal(rules) if err != nil { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( types.ErrFailMarshalRules, "failed to marshal rules: %s", err.Error(), diff --git a/modules/tibc/core/26-routing/types/errors.go b/modules/tibc/core/26-routing/types/errors.go index d6e638b9..04ce8d88 100644 --- a/modules/tibc/core/26-routing/types/errors.go +++ b/modules/tibc/core/26-routing/types/errors.go @@ -1,8 +1,7 @@ package types import ( - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - + errorsmod "cosmossdk.io/errors" host "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" ) @@ -10,9 +9,9 @@ const moduleName = host.ModuleName + "-" + SubModuleName // TIBC routing sentinel errors var ( - ErrInvalidRoute = sdkerrors.Register(moduleName, 2, "route not found") - ErrInvalidRule = sdkerrors.Register(moduleName, 3, "invalid rule") - ErrFailMarshalRules = sdkerrors.Register(moduleName, 4, "failed to marshal rules") - ErrFailUnmarshalRules = sdkerrors.Register(moduleName, 5, "failed to unmarshal rules") - ErrRoutingRulesNotFound = sdkerrors.Register(moduleName, 6, "routing rules not found") + ErrInvalidRoute = errorsmod.Register(moduleName, 2, "route not found") + ErrInvalidRule = errorsmod.Register(moduleName, 3, "invalid rule") + ErrFailMarshalRules = errorsmod.Register(moduleName, 4, "failed to marshal rules") + ErrFailUnmarshalRules = errorsmod.Register(moduleName, 5, "failed to unmarshal rules") + ErrRoutingRulesNotFound = errorsmod.Register(moduleName, 6, "routing rules not found") ) diff --git a/modules/tibc/core/26-routing/types/genesis.go b/modules/tibc/core/26-routing/types/genesis.go index 9c66db79..779fdf51 100644 --- a/modules/tibc/core/26-routing/types/genesis.go +++ b/modules/tibc/core/26-routing/types/genesis.go @@ -3,7 +3,7 @@ package types import ( "regexp" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + errorsmod "cosmossdk.io/errors" ) func DefaultGenesisState() GenesisState { @@ -21,7 +21,7 @@ func (gs GenesisState) Validate() error { for _, rule := range gs.Rules { valid, _ := regexp.MatchString(RulePattern, rule) if !valid { - return sdkerrors.Wrap(ErrInvalidRule, "invalid rule") + return errorsmod.Wrap(ErrInvalidRule, "invalid rule") } } return nil diff --git a/modules/tibc/core/26-routing/types/msg.go b/modules/tibc/core/26-routing/types/msg.go index 9d5fc716..b6679601 100644 --- a/modules/tibc/core/26-routing/types/msg.go +++ b/modules/tibc/core/26-routing/types/msg.go @@ -1,6 +1,7 @@ package types import ( + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -13,7 +14,7 @@ var ( func (msg MsgSetRoutingRules) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(msg.Authority) if err != nil { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( sdkerrors.ErrInvalidAddress, "string could not be parsed as address: %v", err, diff --git a/modules/tibc/core/26-routing/types/tx.pb.go b/modules/tibc/core/26-routing/types/tx.pb.go index d4ca4252..bcfa9216 100644 --- a/modules/tibc/core/26-routing/types/tx.pb.go +++ b/modules/tibc/core/26-routing/types/tx.pb.go @@ -7,7 +7,6 @@ import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -122,30 +121,30 @@ func init() { func init() { proto.RegisterFile("tibc/core/routing/v1/tx.proto", fileDescriptor_761c65cabc9460e8) } var fileDescriptor_761c65cabc9460e8 = []byte{ - // 366 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x3f, 0x4f, 0xc2, 0x40, - 0x18, 0xc6, 0x5b, 0x51, 0x12, 0xce, 0x81, 0xa4, 0x69, 0x62, 0x6d, 0xb4, 0x12, 0x26, 0x62, 0x42, - 0x4f, 0x30, 0x61, 0x70, 0x31, 0xb2, 0xb3, 0x94, 0x49, 0x17, 0xd3, 0x3f, 0xe7, 0x71, 0x86, 0xf6, - 0x6d, 0xee, 0xae, 0x44, 0x56, 0x27, 0x47, 0x3f, 0x82, 0xbb, 0x8b, 0x83, 0x1f, 0xc2, 0x91, 0x38, - 0x39, 0x1a, 0x18, 0xfc, 0x1a, 0xe6, 0x7a, 0x10, 0x8c, 0x38, 0xb8, 0xf5, 0xe9, 0xef, 0x79, 0x9e, - 0xf7, 0xda, 0x7b, 0xd1, 0xa1, 0x64, 0x51, 0x8c, 0x63, 0xe0, 0x04, 0x73, 0x28, 0x24, 0xcb, 0x28, - 0x9e, 0x74, 0xb0, 0xbc, 0xf3, 0x73, 0x0e, 0x12, 0x2c, 0x5b, 0x61, 0x5f, 0x61, 0x7f, 0x89, 0xfd, - 0x49, 0xc7, 0xb5, 0x29, 0x50, 0x28, 0x0d, 0x58, 0x3d, 0x69, 0xaf, 0xbb, 0x4f, 0x01, 0xe8, 0x98, - 0xe0, 0x52, 0x45, 0xc5, 0x0d, 0x0e, 0xb3, 0xe9, 0x12, 0xed, 0xc5, 0x20, 0x52, 0x10, 0x38, 0x15, - 0x65, 0x7d, 0x2a, 0xe8, 0x2a, 0xa3, 0xc1, 0xb5, 0x2e, 0xd3, 0x42, 0xa3, 0xe6, 0xb3, 0x89, 0xac, - 0x81, 0xa0, 0x43, 0x22, 0x03, 0x3d, 0x39, 0x28, 0xc6, 0x44, 0x58, 0x36, 0xda, 0x91, 0x4c, 0x8e, - 0x89, 0x63, 0x36, 0xcc, 0x56, 0x2d, 0xd0, 0xc2, 0x6a, 0xa0, 0xdd, 0x84, 0x88, 0x98, 0xb3, 0x5c, - 0x32, 0xc8, 0x9c, 0xad, 0x92, 0xfd, 0x7c, 0xa5, 0x72, 0x5c, 0x15, 0x38, 0x95, 0x46, 0x45, 0xe5, - 0x4a, 0x61, 0xf5, 0x50, 0x2d, 0x2c, 0xe4, 0x08, 0x38, 0x93, 0x53, 0x67, 0x5b, 0xa5, 0xfa, 0xce, - 0xfb, 0x6b, 0xdb, 0x5e, 0x9e, 0xe4, 0x22, 0x49, 0x38, 0x11, 0x62, 0x28, 0xb9, 0x9a, 0xbf, 0xb6, - 0x9e, 0xd5, 0x1f, 0x9e, 0x8e, 0x8c, 0xfb, 0xaf, 0x97, 0xe3, 0xaa, 0x60, 0x34, 0x23, 0xbc, 0x79, - 0x80, 0xdc, 0xcd, 0xc3, 0x06, 0x44, 0xe4, 0x90, 0x09, 0xd2, 0x95, 0xa8, 0x32, 0x10, 0xd4, 0x4a, - 0x51, 0xfd, 0xf7, 0xe7, 0xb4, 0xfc, 0xbf, 0xfe, 0xb0, 0xbf, 0xd9, 0xe5, 0x9e, 0xfc, 0xd7, 0xb9, - 0x9a, 0xda, 0xbf, 0x7c, 0x9b, 0x7b, 0xe6, 0x6c, 0xee, 0x99, 0x9f, 0x73, 0xcf, 0x7c, 0x5c, 0x78, - 0xc6, 0x6c, 0xe1, 0x19, 0x1f, 0x0b, 0xcf, 0xb8, 0x3a, 0xa7, 0x4c, 0x8e, 0x8a, 0xc8, 0x8f, 0x21, - 0xc5, 0x11, 0x0b, 0xb3, 0x5b, 0x46, 0x42, 0x86, 0x55, 0x7f, 0x9b, 0x02, 0x4e, 0x21, 0x51, 0x3d, - 0x78, 0xbd, 0x1a, 0xdd, 0x5e, 0x7b, 0xb5, 0x1d, 0x72, 0x9a, 0x13, 0x11, 0x55, 0xcb, 0x3b, 0x3a, - 0xfd, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xe8, 0x38, 0x99, 0xfe, 0x3f, 0x02, 0x00, 0x00, + // 360 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x31, 0x4f, 0xfa, 0x40, + 0x18, 0xc6, 0xdb, 0x3f, 0x7f, 0x4c, 0x38, 0x07, 0x93, 0xa6, 0x89, 0xb5, 0xd1, 0x4a, 0x98, 0x08, + 0x09, 0x3d, 0xc1, 0x84, 0xc1, 0xc5, 0xc8, 0xce, 0x52, 0x26, 0x5d, 0x0c, 0x6d, 0x2f, 0xc7, 0x19, + 0xda, 0xb7, 0xb9, 0xbb, 0x12, 0x89, 0x8b, 0x71, 0x72, 0xf4, 0x23, 0xf8, 0x09, 0x0c, 0x83, 0x1f, + 0xc2, 0x91, 0x38, 0x39, 0x1a, 0x18, 0xf8, 0x1a, 0xe6, 0x7a, 0x10, 0x8c, 0x38, 0xb8, 0xf5, 0x7d, + 0x7f, 0xcf, 0xf3, 0xbc, 0x6f, 0xdb, 0x17, 0x1d, 0x49, 0x16, 0x46, 0x38, 0x02, 0x4e, 0x30, 0x87, + 0x5c, 0xb2, 0x94, 0xe2, 0x71, 0x0b, 0xcb, 0x5b, 0x3f, 0xe3, 0x20, 0xc1, 0xb2, 0x15, 0xf6, 0x15, + 0xf6, 0x57, 0xd8, 0x1f, 0xb7, 0x5c, 0x9b, 0x02, 0x85, 0x42, 0x80, 0xd5, 0x93, 0xd6, 0xba, 0xfb, + 0x11, 0x88, 0x04, 0x04, 0x4e, 0x44, 0x91, 0x91, 0x08, 0xba, 0x02, 0x07, 0x1a, 0x5c, 0x6b, 0x87, + 0x2e, 0x34, 0xaa, 0xbd, 0x98, 0xc8, 0xea, 0x09, 0xda, 0x27, 0x32, 0xd0, 0xf1, 0x41, 0x3e, 0x22, + 0xc2, 0xb2, 0x51, 0x59, 0x32, 0x39, 0x22, 0x8e, 0x59, 0x35, 0xeb, 0x95, 0x40, 0x17, 0x56, 0x15, + 0xed, 0xc6, 0x44, 0x44, 0x9c, 0x65, 0x92, 0x41, 0xea, 0xfc, 0x2b, 0xd8, 0xf7, 0x96, 0xf2, 0x71, + 0x15, 0xe0, 0x94, 0xaa, 0x25, 0xe5, 0x2b, 0x0a, 0xab, 0x83, 0x2a, 0x83, 0x5c, 0x0e, 0x81, 0x33, + 0x39, 0x71, 0xfe, 0x2b, 0x57, 0xd7, 0x79, 0x7f, 0x6d, 0xda, 0xab, 0x4d, 0x2e, 0xe2, 0x98, 0x13, + 0x21, 0xfa, 0x92, 0xab, 0xf9, 0x1b, 0xe9, 0x99, 0xf5, 0xf8, 0x7c, 0x6c, 0x3c, 0x2c, 0xa7, 0x8d, + 0x4d, 0xaf, 0x76, 0x88, 0xdc, 0xed, 0x7d, 0x03, 0x22, 0x32, 0x48, 0x05, 0x69, 0xdf, 0xa1, 0x52, + 0x4f, 0x50, 0x2b, 0x41, 0x7b, 0x3f, 0xdf, 0xa8, 0xee, 0xff, 0xf6, 0x25, 0xfd, 0xed, 0x2c, 0xf7, + 0xe4, 0xaf, 0xca, 0xf5, 0x54, 0xb7, 0x7c, 0xbf, 0x9c, 0x36, 0xcc, 0xee, 0xe5, 0xdb, 0xdc, 0x33, + 0x67, 0x73, 0xcf, 0xfc, 0x9c, 0x7b, 0xe6, 0xd3, 0xc2, 0x33, 0x66, 0x0b, 0xcf, 0xf8, 0x58, 0x78, + 0xc6, 0xd5, 0x39, 0x65, 0x72, 0x98, 0x87, 0x7e, 0x04, 0x09, 0x0e, 0xd9, 0x20, 0xbd, 0x61, 0x64, + 0xc0, 0xb0, 0x1a, 0xd3, 0xa4, 0x80, 0x13, 0x88, 0x55, 0x1c, 0xde, 0x5c, 0x42, 0xbb, 0xd3, 0x5c, + 0x1f, 0x83, 0x9c, 0x64, 0x44, 0x84, 0x3b, 0xc5, 0xdf, 0x3a, 0xfd, 0x0a, 0x00, 0x00, 0xff, 0xff, + 0xfe, 0xc8, 0x6b, 0xf7, 0x2e, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/tibc/core/client/cli/proposal_handler.go b/modules/tibc/core/client/cli/proposal_handler.go index 14cf6696..6b3b99f3 100644 --- a/modules/tibc/core/client/cli/proposal_handler.go +++ b/modules/tibc/core/client/cli/proposal_handler.go @@ -1,6 +1,7 @@ package cli import ( + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" govclient "github.com/cosmos/cosmos-sdk/x/gov/client" @@ -13,6 +14,7 @@ import ( "github.com/bianjieai/tibc-go/modules/tibc/core/keeper" ) +// GovHandlers defines the client manager proposal handlers var GovHandlers = []govclient.ProposalHandler{ govclient.NewProposalHandler(clientcli.NewCreateClientProposalCmd), govclient.NewProposalHandler(clientcli.NewUpgradeClientProposalCmd), @@ -33,7 +35,7 @@ func NewProposalHandler(k *keeper.Keeper) govv1beta1.Handler { case *routingtypes.SetRoutingRulesProposal: return k.RoutingKeeper.HandleSetRoutingRulesProposal(ctx, c) default: - return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized tibc proposal content type: %T", c) + return errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized tibc proposal content type: %T", c) } } } diff --git a/modules/tibc/core/depinject.go b/modules/tibc/core/depinject.go index c55aa1da..fd953eba 100644 --- a/modules/tibc/core/depinject.go +++ b/modules/tibc/core/depinject.go @@ -6,8 +6,8 @@ import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" + store "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - store "github.com/cosmos/cosmos-sdk/store/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" diff --git a/modules/tibc/core/exported/client.go b/modules/tibc/core/exported/client.go index b9abbfc7..3c1b6086 100644 --- a/modules/tibc/core/exported/client.go +++ b/modules/tibc/core/exported/client.go @@ -3,6 +3,7 @@ package exported import ( proto "github.com/cosmos/gogoproto/proto" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -50,20 +51,20 @@ type ClientState interface { // Initialize function // Clients must validate the initial consensus state, and may store any client-specific metadata // necessary for correct light client operation - Initialize(sdk.Context, codec.BinaryCodec, sdk.KVStore, ConsensusState) error + Initialize(sdk.Context, codec.BinaryCodec, storetypes.KVStore, ConsensusState) error // Status function // Clients must return their status. Only Active clients are allowed to process packets. - Status(ctx sdk.Context, clientStore sdk.KVStore, cdc codec.BinaryCodec) Status + Status(ctx sdk.Context, clientStore storetypes.KVStore, cdc codec.BinaryCodec) Status // ExportMetadata function - ExportMetadata(sdk.KVStore) []GenesisMetadata + ExportMetadata(storetypes.KVStore) []GenesisMetadata // Update and Misbehaviour functions CheckHeaderAndUpdateState( sdk.Context, codec.BinaryCodec, - sdk.KVStore, + storetypes.KVStore, Header, ) (ClientState, ConsensusState, error) @@ -71,7 +72,7 @@ type ClientState interface { // Verify the commitment of the cross-chain data package VerifyPacketCommitment( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, cdc codec.BinaryCodec, height Height, proof []byte, @@ -84,7 +85,7 @@ type ClientState interface { // Verify the Acknowledgement of the cross-chain data package VerifyPacketAcknowledgement( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, cdc codec.BinaryCodec, height Height, proof []byte, @@ -97,7 +98,7 @@ type ClientState interface { // Verify the CleanCommitment of the cross-chain data package VerifyPacketCleanCommitment( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, cdc codec.BinaryCodec, height Height, proof []byte, diff --git a/modules/tibc/core/genesis_test.go b/modules/tibc/core/genesis_test.go index d2c2d6cc..b1c4945f 100644 --- a/modules/tibc/core/genesis_test.go +++ b/modules/tibc/core/genesis_test.go @@ -49,9 +49,9 @@ func TestIBCTestSuite(t *testing.T) { func (suite *TIBCTestSuite) TestValidateGenesis() { header := suite.chainA.CreateTMClientHeader( - suite.chainA.ChainID, suite.chainA.CurrentHeader.Height, - clienttypes.NewHeight(0, uint64(suite.chainA.CurrentHeader.Height-1)), - suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Vals, + suite.chainA.ChainID, suite.chainA.ProposedHeader.Height, + clienttypes.NewHeight(0, uint64(suite.chainA.ProposedHeader.Height-1)), + suite.chainA.ProposedHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers, ) @@ -149,9 +149,9 @@ func (suite *TIBCTestSuite) TestValidateGenesis() { func (suite *TIBCTestSuite) TestInitGenesis() { header := suite.chainA.CreateTMClientHeader( - suite.chainA.ChainID, suite.chainA.CurrentHeader.Height, - clienttypes.NewHeight(0, uint64(suite.chainA.CurrentHeader.Height-1)), - suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, + suite.chainA.ChainID, suite.chainA.ProposedHeader.Height, + clienttypes.NewHeight(0, uint64(suite.chainA.ProposedHeader.Height-1)), + suite.chainA.ProposedHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers, ) @@ -205,11 +205,11 @@ func (suite *TIBCTestSuite) TestInitGenesis() { }} for _, tc := range testCases { - app := simapp.Setup(false) + app := simapp.Setup(suite.T()) suite.NotPanics(func() { tibc.InitGenesis( - app.BaseApp.NewContext(false, tmproto.Header{Height: 1}), + app.BaseApp.NewContextLegacy(false, tmproto.Header{Height: 1}), *app.TIBCKeeper, true, tc.genState, diff --git a/modules/tibc/core/keeper/keeper.go b/modules/tibc/core/keeper/keeper.go index 0c0d1a79..3be0ec55 100644 --- a/modules/tibc/core/keeper/keeper.go +++ b/modules/tibc/core/keeper/keeper.go @@ -1,8 +1,8 @@ package keeper import ( + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" clientkeeper "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/keeper" clienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" diff --git a/modules/tibc/core/keeper/msg_server.go b/modules/tibc/core/keeper/msg_server.go index 4eaa0626..7a01a24f 100644 --- a/modules/tibc/core/keeper/msg_server.go +++ b/modules/tibc/core/keeper/msg_server.go @@ -3,8 +3,9 @@ package keeper import ( "context" - "github.com/armon/go-metrics" + "github.com/hashicorp/go-metrics" + errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -37,7 +38,7 @@ func (m msgServer) CreateClient( msg *clienttypes.MsgCreateClient, ) (*clienttypes.MsgCreateClientResponse, error) { if m.k.authority != msg.Authority { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( sdkerrors.ErrUnauthorized, "invalid authority; expected %s, got %s", m.k.authority, @@ -48,7 +49,7 @@ func (m msgServer) CreateClient( ctx := sdk.UnwrapSDKContext(goCtx) _, has := m.k.ClientKeeper.GetClientState(ctx, msg.ChainName) if has { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( clienttypes.ErrClientExists, "chain-name: %s", msg.ChainName, @@ -108,7 +109,7 @@ func (m msgServer) UpdateClient( // Verify that the account has permission to update the client if !m.k.ClientKeeper.AuthRelayer(ctx, msg.ChainName, msg.Signer) { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( sdkerrors.ErrUnauthorized, "relayer: %s", msg.Signer, @@ -135,7 +136,7 @@ func (m msgServer) UpgradeClient( msg *clienttypes.MsgUpgradeClient, ) (*clienttypes.MsgUpgradeClientResponse, error) { if m.k.authority != msg.Authority { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( sdkerrors.ErrUnauthorized, "invalid authority; expected %s, got %s", m.k.authority, @@ -166,7 +167,7 @@ func (m msgServer) RegisterRelayer( msg *clienttypes.MsgRegisterRelayer, ) (*clienttypes.MsgRegisterRelayerResponse, error) { if m.k.authority != msg.Authority { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( sdkerrors.ErrUnauthorized, "invalid authority; expected %s, got %s", m.k.authority, @@ -185,7 +186,7 @@ func (m msgServer) SetRoutingRules( msg *routingtypes.MsgSetRoutingRules, ) (*routingtypes.MsgSetRoutingRulesResponse, error) { if m.k.authority != msg.Authority { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( sdkerrors.ErrUnauthorized, "invalid authority; expected %s, got %s", m.k.authority, @@ -216,7 +217,7 @@ func (m msgServer) RecvPacket( } return &packettypes.MsgRecvPacketResponse{}, nil default: - return nil, sdkerrors.Wrap( + return nil, errorsmod.Wrap( err, "receive packet verification failed", ) @@ -227,7 +228,7 @@ func (m msgServer) RecvPacket( // Retrieve callbacks from router cbs, ok := m.k.RoutingKeeper.Router.GetRoute(routingtypes.Port(msg.Packet.Port)) if !ok { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( routingtypes.ErrInvalidRoute, "route not found to module: %s", msg.Packet.Port, @@ -237,7 +238,7 @@ func (m msgServer) RecvPacket( // Perform application logic callback _, ack, err := cbs.OnRecvPacket(ctx, msg.Packet) if err != nil { - return nil, sdkerrors.Wrap( + return nil, errorsmod.Wrap( err, "receive packet callback failed", ) @@ -279,7 +280,7 @@ func (m msgServer) Acknowledgement( // Retrieve callbacks from router cbs, ok := m.k.RoutingKeeper.Router.GetRoute(routingtypes.Port(msg.Packet.Port)) if !ok { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( routingtypes.ErrInvalidRoute, "route not found to module: %s", msg.Packet.Port, @@ -288,7 +289,7 @@ func (m msgServer) Acknowledgement( // Perform TAO verification if err := m.k.PacketKeeper.AcknowledgePacket(ctx, msg.Packet, msg.Acknowledgement, msg.ProofAcked, msg.ProofHeight); err != nil { - return nil, sdkerrors.Wrap( + return nil, errorsmod.Wrap( err, "acknowledge packet verification failed", ) @@ -297,7 +298,7 @@ func (m msgServer) Acknowledgement( // Perform application logic callback _, err := cbs.OnAcknowledgementPacket(ctx, msg.Packet, msg.Acknowledgement) if err != nil { - return nil, sdkerrors.Wrap( + return nil, errorsmod.Wrap( err, "acknowledge packet callback failed", ) @@ -326,7 +327,7 @@ func (m msgServer) CleanPacket( ) (*packettypes.MsgCleanPacketResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) if err := m.k.PacketKeeper.CleanPacket(ctx, msg.CleanPacket); err != nil { - return nil, sdkerrors.Wrap( + return nil, errorsmod.Wrap( err, "send clean packet failed", ) @@ -357,7 +358,7 @@ func (m msgServer) RecvCleanPacket( ) (*packettypes.MsgRecvCleanPacketResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) if err := m.k.PacketKeeper.RecvCleanPacket(ctx, msg.CleanPacket, msg.ProofCommitment, msg.ProofHeight); err != nil { - return nil, sdkerrors.Wrap( + return nil, errorsmod.Wrap( err, "receive clean packet failed", ) diff --git a/modules/tibc/core/keeper/msg_server_test.go b/modules/tibc/core/keeper/msg_server_test.go index 7e838031..d6d36f61 100644 --- a/modules/tibc/core/keeper/msg_server_test.go +++ b/modules/tibc/core/keeper/msg_server_test.go @@ -6,7 +6,7 @@ package keeper_test // "github.com/stretchr/testify/suite" // sdk "github.com/cosmos/cosmos-sdk/types" -// upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" +// upgradetypes "cosmossdk.io/x/upgrade/types" // clienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" // packettypes "github.com/bianjieai/tibc-go/modules/tibc/core/04-packet/types" diff --git a/modules/tibc/core/module.go b/modules/tibc/core/module.go index e404db41..3c1d5cd6 100644 --- a/modules/tibc/core/module.go +++ b/modules/tibc/core/module.go @@ -158,16 +158,6 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 1 } -// BeginBlock returns the begin blocker for the tibc module. -func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { -} - -// EndBlock returns the end blocker for the tibc module. It returns no validator -// updates. -func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} - // ____________________________________________________________________________ // AppModuleSimulation functions @@ -178,7 +168,7 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } // RegisterStoreDecoder registers a decoder for tibc module's types -func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { +func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) { sdr[host.StoreKey] = simulation.NewDecodeStore(*am.keeper) } diff --git a/modules/tibc/core/simulation/decoder_test.go b/modules/tibc/core/simulation/decoder_test.go index 958d6867..31c0277e 100644 --- a/modules/tibc/core/simulation/decoder_test.go +++ b/modules/tibc/core/simulation/decoder_test.go @@ -15,7 +15,7 @@ import ( ) func TestDecodeStore(t *testing.T) { - app := simapp.Setup(false) + app := simapp.Setup(t) dec := simulation.NewDecodeStore(*app.TIBCKeeper) chainName := "clientidone" diff --git a/modules/tibc/core/simulation/genesis.go b/modules/tibc/core/simulation/genesis.go index db968f01..f163916b 100644 --- a/modules/tibc/core/simulation/genesis.go +++ b/modules/tibc/core/simulation/genesis.go @@ -31,12 +31,12 @@ func RandomizedGenState(simState *module.SimulationState) { ) simState.AppParams.GetOrGenerate( - simState.Cdc, clientGenesis, &clientGenesisState, simState.Rand, + clientGenesis, &clientGenesisState, simState.Rand, func(r *rand.Rand) { clientGenesisState = clientsims.GenClientGenesis(r, simState.Accounts) }, ) simState.AppParams.GetOrGenerate( - simState.Cdc, packetGenesis, &packetGenesisState, simState.Rand, + packetGenesis, &packetGenesisState, simState.Rand, func(r *rand.Rand) { packetGenesisState = packetsims.GenpacketGenesis(r, simState.Accounts) }, ) diff --git a/modules/tibc/light-clients/07-tendermint/types/client_state.go b/modules/tibc/light-clients/07-tendermint/types/client_state.go index dd894672..521b82b7 100644 --- a/modules/tibc/light-clients/07-tendermint/types/client_state.go +++ b/modules/tibc/light-clients/07-tendermint/types/client_state.go @@ -8,6 +8,8 @@ import ( "github.com/cometbft/cometbft/light" + errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -85,25 +87,25 @@ func (cs ClientState) IsExpired(latestTimestamp, now time.Time) bool { // Validate performs a basic validation of the client state fields. func (cs ClientState) Validate() error { if strings.TrimSpace(cs.ChainId) == "" { - return sdkerrors.Wrap(ErrInvalidChainID, "chain id cannot be empty string") + return errorsmod.Wrap(ErrInvalidChainID, "chain id cannot be empty string") } if err := light.ValidateTrustLevel(cs.TrustLevel.ToTendermint()); err != nil { return err } if cs.TrustingPeriod == 0 { - return sdkerrors.Wrap(ErrInvalidTrustingPeriod, "trusting period cannot be zero") + return errorsmod.Wrap(ErrInvalidTrustingPeriod, "trusting period cannot be zero") } if cs.UnbondingPeriod == 0 { - return sdkerrors.Wrap(ErrInvalidUnbondingPeriod, "unbonding period cannot be zero") + return errorsmod.Wrap(ErrInvalidUnbondingPeriod, "unbonding period cannot be zero") } if cs.MaxClockDrift == 0 { - return sdkerrors.Wrap(ErrInvalidMaxClockDrift, "max clock drift cannot be zero") + return errorsmod.Wrap(ErrInvalidMaxClockDrift, "max clock drift cannot be zero") } if cs.LatestHeight.RevisionHeight == 0 { - return sdkerrors.Wrapf(ErrInvalidHeaderHeight, "tendermint revision height cannot be zero") + return errorsmod.Wrapf(ErrInvalidHeaderHeight, "tendermint revision height cannot be zero") } if cs.TrustingPeriod >= cs.UnbondingPeriod { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( ErrInvalidTrustingPeriod, "trusting period (%s) should be < unbonding period (%s)", cs.TrustingPeriod, cs.UnbondingPeriod, @@ -111,11 +113,11 @@ func (cs ClientState) Validate() error { } if cs.ProofSpecs == nil { - return sdkerrors.Wrap(ErrInvalidProofSpecs, "proof specs cannot be nil for tm client") + return errorsmod.Wrap(ErrInvalidProofSpecs, "proof specs cannot be nil for tm client") } for i, spec := range cs.ProofSpecs { if spec == nil { - return sdkerrors.Wrapf(ErrInvalidProofSpecs, "proof spec cannot be nil at index: %d", i) + return errorsmod.Wrapf(ErrInvalidProofSpecs, "proof spec cannot be nil at index: %d", i) } } return nil @@ -132,11 +134,11 @@ func (cs ClientState) GetProofSpecs() []*ics23.ProofSpec { func (cs ClientState) Initialize( ctx sdk.Context, _ codec.BinaryCodec, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, consState exported.ConsensusState, ) error { if _, ok := consState.(*ConsensusState); !ok { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidConsensus, "invalid initial consensus state. expected type: %T, got: %T", &ConsensusState{}, consState, @@ -151,7 +153,7 @@ func (cs ClientState) Initialize( // Clients must return their status. Only Active clients are allowed to process packets. func (cs ClientState) Status( ctx sdk.Context, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, cdc codec.BinaryCodec, ) exported.Status { // get latest consensus state from clientStore to check for expiry @@ -171,7 +173,7 @@ func (cs ClientState) Status( // the specified sourceChain, specified destChain, and specified sequence. func (cs ClientState) VerifyPacketCommitment( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, proof []byte, @@ -216,7 +218,7 @@ func (cs ClientState) VerifyPacketCommitment( // acknowledgement at the specified sourceChain, specified destChain, and specified sequence. func (cs ClientState) VerifyPacketAcknowledgement( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, proof []byte, @@ -261,7 +263,7 @@ func (cs ClientState) VerifyPacketAcknowledgement( // acknowledgement at the specified sourceChain, specified destChain, and specified sequence. func (cs ClientState) VerifyPacketCleanCommitment( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, proof []byte, @@ -305,14 +307,14 @@ func (cs ClientState) VerifyPacketCleanCommitment( // before allowing verification to continue. func verifyDelayPeriodPassed( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, proofHeight exported.Height, delayPeriod uint64, ) error { // check that executing chain's timestamp has passed consensusState's processed time + delay period processedTime, ok := GetProcessedTime(store, proofHeight) if !ok { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( ErrProcessedTimeNotFound, "processed time not found for height: %s", proofHeight, @@ -322,7 +324,7 @@ func verifyDelayPeriodPassed( validTime := processedTime + delayPeriod // NOTE: delay period is inclusive, so if currentTimestamp is validTime, then we return no error if validTime > currentTimestamp { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( ErrDelayPeriodNotPassed, "cannot verify packet until time: %d, current time: %d", validTime, currentTimestamp, @@ -335,7 +337,7 @@ func verifyDelayPeriodPassed( // shared between the verification functions and returns the unmarshal // merkle proof, the consensus state and an error if one occurred. func produceVerificationArgs( - store sdk.KVStore, + store storetypes.KVStore, cdc codec.BinaryCodec, cs ClientState, height exported.Height, @@ -343,7 +345,7 @@ func produceVerificationArgs( proof []byte, ) (merkleProof commitmenttypes.MerkleProof, consensusState *ConsensusState, err error) { if cs.GetLatestHeight().LT(height) { - return commitmenttypes.MerkleProof{}, nil, sdkerrors.Wrapf( + return commitmenttypes.MerkleProof{}, nil, errorsmod.Wrapf( sdkerrors.ErrInvalidHeight, "client state height < proof height (%d < %d)", cs.GetLatestHeight(), height, @@ -351,7 +353,7 @@ func produceVerificationArgs( } if prefix == nil { - return commitmenttypes.MerkleProof{}, nil, sdkerrors.Wrap( + return commitmenttypes.MerkleProof{}, nil, errorsmod.Wrap( commitmenttypes.ErrInvalidPrefix, "prefix cannot be empty", ) @@ -359,7 +361,7 @@ func produceVerificationArgs( _, ok := prefix.(*commitmenttypes.MerklePrefix) if !ok { - return commitmenttypes.MerkleProof{}, nil, sdkerrors.Wrapf( + return commitmenttypes.MerkleProof{}, nil, errorsmod.Wrapf( commitmenttypes.ErrInvalidPrefix, "invalid prefix type %T, expected *MerklePrefix", prefix, @@ -367,14 +369,14 @@ func produceVerificationArgs( } if proof == nil { - return commitmenttypes.MerkleProof{}, nil, sdkerrors.Wrap( + return commitmenttypes.MerkleProof{}, nil, errorsmod.Wrap( commitmenttypes.ErrInvalidProof, "proof cannot be empty", ) } if err = cdc.Unmarshal(proof, &merkleProof); err != nil { - return commitmenttypes.MerkleProof{}, nil, sdkerrors.Wrap( + return commitmenttypes.MerkleProof{}, nil, errorsmod.Wrap( commitmenttypes.ErrInvalidProof, "failed to unmarshal proof into commitment merkle proof", ) diff --git a/modules/tibc/light-clients/07-tendermint/types/consensus_state.go b/modules/tibc/light-clients/07-tendermint/types/consensus_state.go index b2ac4c63..16c4b8cd 100644 --- a/modules/tibc/light-clients/07-tendermint/types/consensus_state.go +++ b/modules/tibc/light-clients/07-tendermint/types/consensus_state.go @@ -6,7 +6,7 @@ import ( tmbytes "github.com/cometbft/cometbft/libs/bytes" tmtypes "github.com/cometbft/cometbft/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + errorsmod "cosmossdk.io/errors" clienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" commitmenttypes "github.com/bianjieai/tibc-go/modules/tibc/core/23-commitment/types" @@ -44,13 +44,13 @@ func (cs ConsensusState) GetTimestamp() uint64 { // as opposed to a consensus state constructed by the chain. func (cs ConsensusState) ValidateBasic() error { if cs.Root.Empty() { - return sdkerrors.Wrap(clienttypes.ErrInvalidConsensus, "root cannot be empty") + return errorsmod.Wrap(clienttypes.ErrInvalidConsensus, "root cannot be empty") } if err := tmtypes.ValidateHash(cs.NextValidatorsHash); err != nil { - return sdkerrors.Wrap(err, "next validators hash is invalid") + return errorsmod.Wrap(err, "next validators hash is invalid") } if cs.Timestamp.Unix() <= 0 { - return sdkerrors.Wrap( + return errorsmod.Wrap( clienttypes.ErrInvalidConsensus, "timestamp must be a positive Unix time", ) diff --git a/modules/tibc/light-clients/07-tendermint/types/errors.go b/modules/tibc/light-clients/07-tendermint/types/errors.go index bf7f73d3..ca45ecd7 100644 --- a/modules/tibc/light-clients/07-tendermint/types/errors.go +++ b/modules/tibc/light-clients/07-tendermint/types/errors.go @@ -1,8 +1,7 @@ package types import ( - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - + errorsmod "cosmossdk.io/errors" host "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" ) @@ -13,16 +12,16 @@ const ( // TIBC tendermint client sentinel errors var ( - ErrInvalidChainID = sdkerrors.Register(moduleName, 2, "invalid chain-id") - ErrInvalidTrustingPeriod = sdkerrors.Register(moduleName, 3, "invalid trusting period") - ErrInvalidUnbondingPeriod = sdkerrors.Register(moduleName, 4, "invalid unbonding period") - ErrInvalidHeaderHeight = sdkerrors.Register(moduleName, 5, "invalid header height") - ErrInvalidHeader = sdkerrors.Register(moduleName, 6, "invalid header") - ErrInvalidMaxClockDrift = sdkerrors.Register(moduleName, 7, "invalid max clock drift") - ErrProcessedTimeNotFound = sdkerrors.Register(moduleName, 8, "processed time not found") - ErrDelayPeriodNotPassed = sdkerrors.Register(moduleName, 9, "packet-specified delay period has not been reached") - ErrTrustingPeriodExpired = sdkerrors.Register(moduleName, 10, "time since latest trusted state has passed the trusting period") - ErrUnbondingPeriodExpired = sdkerrors.Register(moduleName, 11, "time since latest trusted state has passed the unbonding period") - ErrInvalidProofSpecs = sdkerrors.Register(moduleName, 12, "invalid proof specs") - ErrInvalidValidatorSet = sdkerrors.Register(moduleName, 13, "invalid validator set") + ErrInvalidChainID = errorsmod.Register(moduleName, 2, "invalid chain-id") + ErrInvalidTrustingPeriod = errorsmod.Register(moduleName, 3, "invalid trusting period") + ErrInvalidUnbondingPeriod = errorsmod.Register(moduleName, 4, "invalid unbonding period") + ErrInvalidHeaderHeight = errorsmod.Register(moduleName, 5, "invalid header height") + ErrInvalidHeader = errorsmod.Register(moduleName, 6, "invalid header") + ErrInvalidMaxClockDrift = errorsmod.Register(moduleName, 7, "invalid max clock drift") + ErrProcessedTimeNotFound = errorsmod.Register(moduleName, 8, "processed time not found") + ErrDelayPeriodNotPassed = errorsmod.Register(moduleName, 9, "packet-specified delay period has not been reached") + ErrTrustingPeriodExpired = errorsmod.Register(moduleName, 10, "time since latest trusted state has passed the trusting period") + ErrUnbondingPeriodExpired = errorsmod.Register(moduleName, 11, "time since latest trusted state has passed the unbonding period") + ErrInvalidProofSpecs = errorsmod.Register(moduleName, 12, "invalid proof specs") + ErrInvalidValidatorSet = errorsmod.Register(moduleName, 13, "invalid validator set") ) diff --git a/modules/tibc/light-clients/07-tendermint/types/genesis.go b/modules/tibc/light-clients/07-tendermint/types/genesis.go index 88cc67ac..ab415532 100644 --- a/modules/tibc/light-clients/07-tendermint/types/genesis.go +++ b/modules/tibc/light-clients/07-tendermint/types/genesis.go @@ -1,15 +1,14 @@ package types import ( - sdk "github.com/cosmos/cosmos-sdk/types" - + storetypes "cosmossdk.io/store/types" clienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" "github.com/bianjieai/tibc-go/modules/tibc/core/exported" ) // ExportMetadata exports all the processed times in the client store so they can be included in clients genesis // and imported by a ClientKeeper -func (cs ClientState) ExportMetadata(store sdk.KVStore) []exported.GenesisMetadata { +func (cs ClientState) ExportMetadata(store storetypes.KVStore) []exported.GenesisMetadata { gm := make([]exported.GenesisMetadata, 0) IterateProcessedTime(store, func(key, val []byte) bool { gm = append(gm, clienttypes.NewGenesisMetadata(key, val)) diff --git a/modules/tibc/light-clients/07-tendermint/types/header.go b/modules/tibc/light-clients/07-tendermint/types/header.go index e2da191a..c8ff848a 100644 --- a/modules/tibc/light-clients/07-tendermint/types/header.go +++ b/modules/tibc/light-clients/07-tendermint/types/header.go @@ -6,7 +6,7 @@ import ( tmtypes "github.com/cometbft/cometbft/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + errorsmod "cosmossdk.io/errors" clienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" commitmenttypes "github.com/bianjieai/tibc-go/modules/tibc/core/23-commitment/types" @@ -50,26 +50,26 @@ func (h Header) GetTime() time.Time { // with MsgCreateClient func (h Header) ValidateBasic() error { if h.SignedHeader == nil { - return sdkerrors.Wrap( + return errorsmod.Wrap( clienttypes.ErrInvalidHeader, "tendermint signed header cannot be nil", ) } if h.Header == nil { - return sdkerrors.Wrap(clienttypes.ErrInvalidHeader, "tendermint header cannot be nil") + return errorsmod.Wrap(clienttypes.ErrInvalidHeader, "tendermint header cannot be nil") } tmSignedHeader, err := tmtypes.SignedHeaderFromProto(h.SignedHeader) if err != nil { - return sdkerrors.Wrap(err, "header is not a tendermint header") + return errorsmod.Wrap(err, "header is not a tendermint header") } if err := tmSignedHeader.ValidateBasic(h.Header.GetChainID()); err != nil { - return sdkerrors.Wrap(err, "header failed basic validation") + return errorsmod.Wrap(err, "header failed basic validation") } // TrustedHeight is less than Header for updates // and less than or equal to Header for misbehaviour if h.TrustedHeight.GT(h.GetHeight()) { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( ErrInvalidHeaderHeight, "TrustedHeight %d must be less than or equal to header height %d", h.TrustedHeight, @@ -78,14 +78,14 @@ func (h Header) ValidateBasic() error { } if h.ValidatorSet == nil { - return sdkerrors.Wrap(clienttypes.ErrInvalidHeader, "validator set is nil") + return errorsmod.Wrap(clienttypes.ErrInvalidHeader, "validator set is nil") } tmValset, err := tmtypes.ValidatorSetFromProto(h.ValidatorSet) if err != nil { - return sdkerrors.Wrap(err, "validator set is not tendermint validator set") + return errorsmod.Wrap(err, "validator set is not tendermint validator set") } if !bytes.Equal(h.Header.ValidatorsHash, tmValset.Hash()) { - return sdkerrors.Wrap(clienttypes.ErrInvalidHeader, "validator set does not match hash") + return errorsmod.Wrap(clienttypes.ErrInvalidHeader, "validator set does not match hash") } return nil } diff --git a/modules/tibc/light-clients/07-tendermint/types/store.go b/modules/tibc/light-clients/07-tendermint/types/store.go index fe4fdd63..3cac3bb8 100644 --- a/modules/tibc/light-clients/07-tendermint/types/store.go +++ b/modules/tibc/light-clients/07-tendermint/types/store.go @@ -4,9 +4,10 @@ import ( "encoding/binary" "strings" + errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" clienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" host "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" @@ -21,10 +22,10 @@ var ( // GetConsensusState retrieves the consensus state from the client prefixed // store. An error is returned if the consensus state does not exist. -func GetConsensusState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height) (*ConsensusState, error) { +func GetConsensusState(store storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height) (*ConsensusState, error) { bz := store.Get(host.ConsensusStateKey(height)) if bz == nil { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( clienttypes.ErrConsensusStateNotFound, "consensus state does not exist for height %s", height, @@ -33,12 +34,12 @@ func GetConsensusState(store sdk.KVStore, cdc codec.BinaryCodec, height exported consensusStateI, err := clienttypes.UnmarshalConsensusState(cdc, bz) if err != nil { - return nil, sdkerrors.Wrapf(clienttypes.ErrInvalidConsensus, "unmarshal error: %v", err) + return nil, errorsmod.Wrapf(clienttypes.ErrInvalidConsensus, "unmarshal error: %v", err) } consensusState, ok := consensusStateI.(*ConsensusState) if !ok { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( clienttypes.ErrInvalidConsensus, "invalid consensus type %T, expected %T", consensusState, &ConsensusState{}, @@ -50,8 +51,8 @@ func GetConsensusState(store sdk.KVStore, cdc codec.BinaryCodec, height exported // IterateProcessedTime iterates through the prefix store and applies the callback. // If the cb returns true, then iterator will close and stop. -func IterateProcessedTime(store sdk.KVStore, cb func(key, val []byte) bool) { - iterator := sdk.KVStorePrefixIterator(store, []byte(host.KeyConsensusStatePrefix)) +func IterateProcessedTime(store storetypes.KVStore, cb func(key, val []byte) bool) { + iterator := storetypes.KVStorePrefixIterator(store, []byte(host.KeyConsensusStatePrefix)) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { @@ -81,9 +82,9 @@ func GetHeightFromIterationKey(iterKey []byte) exported.Height { // IterateConsensusStateAscending iterates through the consensus states in ascending order. It calls the provided // callback on each height, until stop=true is returned. -func IterateConsensusStateAscending(clientStore sdk.KVStore, +func IterateConsensusStateAscending(clientStore storetypes.KVStore, cb func(height exported.Height) (stop bool)) { - iterator := sdk.KVStorePrefixIterator(clientStore, []byte(KeyIterateConsensusStatePrefix)) + iterator := storetypes.KVStorePrefixIterator(clientStore, []byte(KeyIterateConsensusStatePrefix)) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { @@ -105,7 +106,7 @@ func ProcessedTimeKey(height exported.Height) []byte { // SetProcessedTime stores the time at which a header was processed and the corresponding consensus state was created. // This is useful when validating whether a packet has reached the specified delay period in the tendermint client's // verification functions -func SetProcessedTime(clientStore sdk.KVStore, height exported.Height, timeNs uint64) { +func SetProcessedTime(clientStore storetypes.KVStore, height exported.Height, timeNs uint64) { key := ProcessedTimeKey(height) val := sdk.Uint64ToBigEndian(timeNs) clientStore.Set(key, val) @@ -113,7 +114,7 @@ func SetProcessedTime(clientStore sdk.KVStore, height exported.Height, timeNs ui // GetProcessedTime gets the time (in nanoseconds) at which this chain received and processed a tendermint header. // This is used to validate that a received packet has passed the delay period. -func GetProcessedTime(clientStore sdk.KVStore, height exported.Height) (uint64, bool) { +func GetProcessedTime(clientStore storetypes.KVStore, height exported.Height) (uint64, bool) { key := ProcessedTimeKey(height) bz := clientStore.Get(key) if bz == nil { @@ -130,7 +131,7 @@ func IterationKey(height exported.Height) []byte { } // SetIterationKey stores the consensus state key under a key that is more efficient for ordered iteration -func SetIterationKey(clientStore sdk.KVStore, height exported.Height) { +func SetIterationKey(clientStore storetypes.KVStore, height exported.Height) { key := IterationKey(height) val := host.ConsensusStateKey(height) clientStore.Set(key, val) @@ -138,7 +139,7 @@ func SetIterationKey(clientStore sdk.KVStore, height exported.Height) { // GetIterationKey returns the consensus state key stored under the efficient iteration key. // NOTE: This function is currently only used for testing purposes -func GetIterationKey(clientStore sdk.KVStore, height exported.Height) []byte { +func GetIterationKey(clientStore storetypes.KVStore, height exported.Height) []byte { key := IterationKey(height) return clientStore.Get(key) } @@ -147,19 +148,19 @@ func GetIterationKey(clientStore sdk.KVStore, height exported.Height) []byte { // as this is internal tendermint light client logic. // client state and consensus state will be set by client keeper // set iteration key to provide ability for efficient ordered iteration of consensus states. -func setConsensusMetadata(ctx sdk.Context, clientStore sdk.KVStore, height exported.Height) { +func setConsensusMetadata(ctx sdk.Context, clientStore storetypes.KVStore, height exported.Height) { setConsensusMetadataWithValues(clientStore, height, clienttypes.GetSelfHeight(ctx), uint64(ctx.BlockTime().UnixNano())) } // deleteConsensusMetadata deletes the metadata stored for a particular consensus state. -func deleteConsensusMetadata(clientStore sdk.KVStore, height exported.Height) { +func deleteConsensusMetadata(clientStore storetypes.KVStore, height exported.Height) { deleteProcessedTime(clientStore, height) deleteIterationKey(clientStore, height) } // setConsensusMetadataWithValues sets the consensus metadata with the provided values func setConsensusMetadataWithValues( - clientStore sdk.KVStore, height, + clientStore storetypes.KVStore, height, processedHeight exported.Height, processedTime uint64, ) { @@ -168,19 +169,19 @@ func setConsensusMetadataWithValues( } // deleteConsensusState deletes the consensus state at the given height -func deleteConsensusState(clientStore sdk.KVStore, height exported.Height) { +func deleteConsensusState(clientStore storetypes.KVStore, height exported.Height) { key := host.ConsensusStateKey(height) clientStore.Delete(key) } // deleteProcessedTime deletes the processedTime for a given height -func deleteProcessedTime(clientStore sdk.KVStore, height exported.Height) { +func deleteProcessedTime(clientStore storetypes.KVStore, height exported.Height) { key := ProcessedTimeKey(height) clientStore.Delete(key) } // deleteIterationKey deletes the iteration key for a given height -func deleteIterationKey(clientStore sdk.KVStore, height exported.Height) { +func deleteIterationKey(clientStore storetypes.KVStore, height exported.Height) { key := IterationKey(height) clientStore.Delete(key) } diff --git a/modules/tibc/light-clients/07-tendermint/types/store_test.go b/modules/tibc/light-clients/07-tendermint/types/store_test.go index b367a5e1..01b217f1 100644 --- a/modules/tibc/light-clients/07-tendermint/types/store_test.go +++ b/modules/tibc/light-clients/07-tendermint/types/store_test.go @@ -72,8 +72,7 @@ func (suite *TendermintTestSuite) TestGetProcessedTime() { suite.coordinator.UpdateTime() // coordinator increments time before creating client - expectedTime := suite.chainA.CurrentHeader.Time.Add(tibctesting.TimeIncrement) - + expectedTime := suite.chainA.ProposedHeader.Time // Verify ProcessedTime on CreateClient err := path.EndpointA.CreateClient() suite.Require().NoError(err) @@ -88,7 +87,7 @@ func (suite *TendermintTestSuite) TestGetProcessedTime() { suite.coordinator.UpdateTime() // coordinator increments time before updating client - expectedTime = suite.chainA.CurrentHeader.Time.Add(tibctesting.TimeIncrement) + expectedTime = suite.chainA.ProposedHeader.Time.Add(tibctesting.TimeIncrement) // Verify ProcessedTime on UpdateClient err = path.EndpointA.UpdateClient() diff --git a/modules/tibc/light-clients/07-tendermint/types/tendermint_test.go b/modules/tibc/light-clients/07-tendermint/types/tendermint_test.go index 6f6334e2..14f8d651 100644 --- a/modules/tibc/light-clients/07-tendermint/types/tendermint_test.go +++ b/modules/tibc/light-clients/07-tendermint/types/tendermint_test.go @@ -64,7 +64,7 @@ func (suite *TendermintTestSuite) SetupTest() { // TODO: deprecate usage in favor of testing package checkTx := false - app := simapp.Setup(checkTx) + app := simapp.Setup(suite.T()) suite.cdc = app.AppCodec() @@ -99,7 +99,7 @@ func (suite *TendermintTestSuite) SetupTest() { suite.valSet, suite.signers, ) - suite.ctx = app.BaseApp.NewContext(checkTx, tmproto.Header{Height: 1, Time: suite.now}) + suite.ctx = app.BaseApp.NewContextLegacy(checkTx, tmproto.Header{Height: 1, Time: suite.now}) } func getAltSigners( diff --git a/modules/tibc/light-clients/07-tendermint/types/update.go b/modules/tibc/light-clients/07-tendermint/types/update.go index e90f2848..e7d93669 100644 --- a/modules/tibc/light-clients/07-tendermint/types/update.go +++ b/modules/tibc/light-clients/07-tendermint/types/update.go @@ -4,12 +4,13 @@ import ( "bytes" "time" + errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" "github.com/cometbft/cometbft/light" tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" clienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" commitmenttypes "github.com/bianjieai/tibc-go/modules/tibc/core/23-commitment/types" @@ -39,13 +40,13 @@ import ( // Tendermint client validity checking uses the bisection algorithm described // in the [Tendermint spec](https://github.com/tendermint/spec/blob/master/spec/consensus/light-client.md). func (cs ClientState) CheckHeaderAndUpdateState( - ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, header exported.Header, + ctx sdk.Context, cdc codec.BinaryCodec, clientStore storetypes.KVStore, header exported.Header, ) ( exported.ClientState, exported.ConsensusState, error, ) { tmHeader, ok := header.(*Header) if !ok { - return nil, nil, sdkerrors.Wrapf( + return nil, nil, errorsmod.Wrapf( clienttypes.ErrInvalidHeader, "expected type %T, got %T", &Header{}, @@ -56,7 +57,7 @@ func (cs ClientState) CheckHeaderAndUpdateState( // get consensus state from clientStore tmConsState, err := GetConsensusState(clientStore, cdc, tmHeader.TrustedHeight) if err != nil { - return nil, nil, sdkerrors.Wrapf( + return nil, nil, errorsmod.Wrapf( err, "could not get consensus state from clientstore at TrustedHeight: %s", tmHeader.TrustedHeight, @@ -103,14 +104,14 @@ func (cs ClientState) CheckHeaderAndUpdateState( func checkTrustedHeader(header *Header, consState *ConsensusState) error { tmTrustedValidators, err := tmtypes.ValidatorSetFromProto(header.TrustedValidators) if err != nil { - return sdkerrors.Wrap(err, "trusted validator set in not tendermint validator set type") + return errorsmod.Wrap(err, "trusted validator set in not tendermint validator set type") } // assert that trustedVals is NextValidators of last trusted header // to do this, we check that trustedVals.Hash() == consState.NextValidatorsHash tvalHash := tmTrustedValidators.Hash() if !bytes.Equal(consState.NextValidatorsHash, tvalHash) { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( ErrInvalidValidatorSet, "trusted validators %s, does not hash to latest trusted validators. Expected: %X, got: %X", header.TrustedValidators, @@ -133,7 +134,7 @@ func checkValidity( // UpdateClient only accepts updates with a header at the same revision // as the trusted consensus state if header.GetHeight().GetRevisionNumber() != header.TrustedHeight.RevisionNumber { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( ErrInvalidHeaderHeight, "header height revision %d does not match trusted header revision %d", header.GetHeight().GetRevisionNumber(), header.TrustedHeight.RevisionNumber, @@ -142,22 +143,22 @@ func checkValidity( tmTrustedValidators, err := tmtypes.ValidatorSetFromProto(header.TrustedValidators) if err != nil { - return sdkerrors.Wrap(err, "trusted validator set in not tendermint validator set type") + return errorsmod.Wrap(err, "trusted validator set in not tendermint validator set type") } tmSignedHeader, err := tmtypes.SignedHeaderFromProto(header.SignedHeader) if err != nil { - return sdkerrors.Wrap(err, "signed header in not tendermint signed header type") + return errorsmod.Wrap(err, "signed header in not tendermint signed header type") } tmValidatorSet, err := tmtypes.ValidatorSetFromProto(header.ValidatorSet) if err != nil { - return sdkerrors.Wrap(err, "validator set in not tendermint validator set type") + return errorsmod.Wrap(err, "validator set in not tendermint validator set type") } // assert header height is newer than consensus state if header.GetHeight().LTE(header.TrustedHeight) { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidHeader, "header height ≤ consensus state height (%s ≤ %s)", header.GetHeight(), header.TrustedHeight, @@ -197,7 +198,7 @@ func checkValidity( clientState.TrustingPeriod, currentTimestamp, clientState.MaxClockDrift, clientState.TrustLevel.ToTendermint(), ); err != nil { - return sdkerrors.Wrap(err, "failed to verify header") + return errorsmod.Wrap(err, "failed to verify header") } return nil } @@ -205,7 +206,7 @@ func checkValidity( // update the consensus state from a new header and set processed time metadata func update( ctx sdk.Context, - clientStore sdk.KVStore, + clientStore storetypes.KVStore, clientState *ClientState, header *Header, ) (*ClientState, *ConsensusState) { diff --git a/modules/tibc/light-clients/08-bsc/types/bsc.go b/modules/tibc/light-clients/08-bsc/types/bsc.go index 17b3795a..6272a981 100644 --- a/modules/tibc/light-clients/08-bsc/types/bsc.go +++ b/modules/tibc/light-clients/08-bsc/types/bsc.go @@ -4,11 +4,11 @@ import ( fmt "fmt" "math/big" + errorsmod "cosmossdk.io/errors" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" ) @@ -135,7 +135,7 @@ type ProofAccount struct { func ParseValidators(extra []byte) ([][]byte, error) { validatorBytes := extra[extraVanity : len(extra)-extraSeal] if len(validatorBytes)%addressLength != 0 { - return nil, sdkerrors.Wrap(ErrInvalidValidatorBytes, "(validatorsBytes % AddressLength) should bz zero") + return nil, errorsmod.Wrap(ErrInvalidValidatorBytes, "(validatorsBytes % AddressLength) should bz zero") } n := len(validatorBytes) / addressLength result := make([][]byte, n) diff --git a/modules/tibc/light-clients/08-bsc/types/bsc_test.go b/modules/tibc/light-clients/08-bsc/types/bsc_test.go index f1b3eccc..e9eafaf3 100644 --- a/modules/tibc/light-clients/08-bsc/types/bsc_test.go +++ b/modules/tibc/light-clients/08-bsc/types/bsc_test.go @@ -20,9 +20,9 @@ type BSCTestSuite struct { } func (suite *BSCTestSuite) SetupTest() { - app := simapp.Setup(false) + app := simapp.Setup(suite.T()) - suite.ctx = app.BaseApp.NewContext(false, tmproto.Header{}) + suite.ctx = app.BaseApp.NewContextLegacy(false, tmproto.Header{}) suite.app = app } diff --git a/modules/tibc/light-clients/08-bsc/types/client_state.go b/modules/tibc/light-clients/08-bsc/types/client_state.go index e4374d3f..db05486f 100644 --- a/modules/tibc/light-clients/08-bsc/types/client_state.go +++ b/modules/tibc/light-clients/08-bsc/types/client_state.go @@ -12,6 +12,8 @@ import ( "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/trie" + errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -73,11 +75,11 @@ func (m ClientState) GetPrefix() exported.Prefix { func (m ClientState) Initialize( ctx sdk.Context, cdc codec.BinaryCodec, - store sdk.KVStore, + store storetypes.KVStore, state exported.ConsensusState, ) error { if m.Header.Height.RevisionHeight%m.Epoch != 0 { - return sdkerrors.Wrap(ErrInvalidGenesisBlock, "header") + return errorsmod.Wrap(ErrInvalidGenesisBlock, "header") } SetRecentSigners(store, m.RecentSigners) @@ -91,7 +93,7 @@ func (m ClientState) Initialize( func (m ClientState) Status( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, cdc codec.BinaryCodec, ) exported.Status { onsState, err := GetConsensusState(store, cdc, m.GetLatestHeight()) @@ -105,7 +107,7 @@ func (m ClientState) Status( } // ExportMetadata exports RecentSingers and PendingValidators -func (m ClientState) ExportMetadata(store sdk.KVStore) []exported.GenesisMetadata { +func (m ClientState) ExportMetadata(store storetypes.KVStore) []exported.GenesisMetadata { gm := make([]exported.GenesisMetadata, 0) callback := func(key, val []byte) bool { gm = append(gm, clienttypes.NewGenesisMetadata(key, val)) @@ -123,7 +125,7 @@ func (m ClientState) ExportMetadata(store sdk.KVStore) []exported.GenesisMetadat func (m ClientState) VerifyPacketCommitment( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, proof []byte, @@ -139,7 +141,7 @@ func (m ClientState) VerifyPacketCommitment( // check delay period has passed delayBlock := m.Header.Height.RevisionHeight - height.GetRevisionHeight() if delayBlock < m.GetDelayBlock() { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( sdkerrors.ErrInvalidHeight, "delay block (%d) < client state delay block (%d)", delayBlock, m.GetDelayBlock(), @@ -154,7 +156,7 @@ func (m ClientState) VerifyPacketCommitment( func (m ClientState) VerifyPacketAcknowledgement( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, proof []byte, @@ -169,7 +171,7 @@ func (m ClientState) VerifyPacketAcknowledgement( delayBlock := m.Header.Height.RevisionHeight - height.GetRevisionHeight() if delayBlock < m.GetDelayBlock() { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( sdkerrors.ErrInvalidHeight, "delay block (%d) < client state delay block (%d)", delayBlock, m.GetDelayBlock(), @@ -181,7 +183,7 @@ func (m ClientState) VerifyPacketAcknowledgement( func (m ClientState) VerifyPacketCleanCommitment( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, proof []byte, @@ -195,7 +197,7 @@ func (m ClientState) VerifyPacketCleanCommitment( delayBlock := m.Header.Height.RevisionHeight - height.GetRevisionHeight() if delayBlock < m.GetDelayBlock() { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( sdkerrors.ErrInvalidHeight, "delay block (%d) < client state delay block (%d)", delayBlock, m.GetDelayBlock(), @@ -209,7 +211,7 @@ func (m ClientState) VerifyPacketCleanCommitment( // shared between the verification functions and returns the unmarshal // merkle proof, the consensus state and an error if one occurred. func produceVerificationArgs( - store sdk.KVStore, + store storetypes.KVStore, cdc codec.BinaryCodec, cs ClientState, height exported.Height, @@ -220,7 +222,7 @@ func produceVerificationArgs( err error, ) { if cs.GetLatestHeight().LT(height) { - return Proof{}, nil, sdkerrors.Wrapf( + return Proof{}, nil, errorsmod.Wrapf( sdkerrors.ErrInvalidHeight, "client state height < proof height (%d < %d)", cs.GetLatestHeight(), height, @@ -228,11 +230,11 @@ func produceVerificationArgs( } if proof == nil { - return Proof{}, nil, sdkerrors.Wrap(ErrInvalidProof, "proof cannot be empty") + return Proof{}, nil, errorsmod.Wrap(ErrInvalidProof, "proof cannot be empty") } if err = json.Unmarshal(proof, &merkleProof); err != nil { - return Proof{}, nil, sdkerrors.Wrap(ErrInvalidProof, "failed to unmarshal proof into proof") + return Proof{}, nil, errorsmod.Wrap(ErrInvalidProof, "failed to unmarshal proof into proof") } consensusState, err = GetConsensusState(store, cdc, height) diff --git a/modules/tibc/light-clients/08-bsc/types/errors.go b/modules/tibc/light-clients/08-bsc/types/errors.go index f9e48cde..ef3fec90 100644 --- a/modules/tibc/light-clients/08-bsc/types/errors.go +++ b/modules/tibc/light-clients/08-bsc/types/errors.go @@ -1,8 +1,7 @@ package types import ( - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - + errorsmod "cosmossdk.io/errors" host "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" ) @@ -13,47 +12,47 @@ const ( // TIBC bsc client sentinel errors var ( - ErrInvalidGenesisBlock = sdkerrors.Register(moduleName, 2, "invalid genesis block") - ErrInvalidValidatorBytes = sdkerrors.Register(moduleName, 3, "invalid validators bytes length") + ErrInvalidGenesisBlock = errorsmod.Register(moduleName, 2, "invalid genesis block") + ErrInvalidValidatorBytes = errorsmod.Register(moduleName, 3, "invalid validators bytes length") // ErrUnknownBlock is returned when the list of validators is requested for a block // that is not part of the local blockchain. - ErrUnknownBlock = sdkerrors.Register(moduleName, 4, "unknown block") - ErrFutureBlock = sdkerrors.Register(moduleName, 5, "block in the future") + ErrUnknownBlock = errorsmod.Register(moduleName, 4, "unknown block") + ErrFutureBlock = errorsmod.Register(moduleName, 5, "block in the future") // ErrMissingVanity is returned if a block's extra-data section is shorter than // 32 bytes, which is required to store the signer vanity. - ErrMissingVanity = sdkerrors.Register(moduleName, 6, "extra-data 32 byte vanity prefix missing") + ErrMissingVanity = errorsmod.Register(moduleName, 6, "extra-data 32 byte vanity prefix missing") // ErrMissingSignature is returned if a block's extra-data section doesn't seem // to contain a 65 byte secp256k1 signature. - ErrMissingSignature = sdkerrors.Register(moduleName, 7, "extra-data 65 byte signature suffix missing") + ErrMissingSignature = errorsmod.Register(moduleName, 7, "extra-data 65 byte signature suffix missing") // ErrInvalidMixDigest is returned if a block's mix digest is non-zero. - ErrInvalidMixDigest = sdkerrors.Register(moduleName, 8, "non-zero mix digest") + ErrInvalidMixDigest = errorsmod.Register(moduleName, 8, "non-zero mix digest") // ErrInvalidUncleHash is returned if a block contains an non-empty uncle list. - ErrInvalidUncleHash = sdkerrors.Register(moduleName, 9, "non empty uncle hash") + ErrInvalidUncleHash = errorsmod.Register(moduleName, 9, "non empty uncle hash") // ErrInvalidDifficulty is returned if the difficulty of a block is missing. - ErrInvalidDifficulty = sdkerrors.Register(moduleName, 10, "invalid difficulty") - ErrUnknownAncestor = sdkerrors.Register(moduleName, 11, "unknown ancestor") + ErrInvalidDifficulty = errorsmod.Register(moduleName, 10, "invalid difficulty") + ErrUnknownAncestor = errorsmod.Register(moduleName, 11, "unknown ancestor") // ErrCoinBaseMisMatch is returned if a header's coinbase do not match with signature - ErrCoinBaseMisMatch = sdkerrors.Register(moduleName, 12, "coinbase do not match with signature") + ErrCoinBaseMisMatch = errorsmod.Register(moduleName, 12, "coinbase do not match with signature") // ErrUnauthorizedValidator is returned if a header is signed by a non-authorized entity. - ErrUnauthorizedValidator = sdkerrors.Register(moduleName, 13, "unauthorized validator") + ErrUnauthorizedValidator = errorsmod.Register(moduleName, 13, "unauthorized validator") // ErrRecentlySigned is returned if a header is signed by an authorized entity // that already signed a header recently, thus is temporarily not allowed to. - ErrRecentlySigned = sdkerrors.Register(moduleName, 14, "recently signed") + ErrRecentlySigned = errorsmod.Register(moduleName, 14, "recently signed") // ErrWrongDifficulty is returned if the difficulty of a block doesn't match the // turn of the signer. - ErrWrongDifficulty = sdkerrors.Register(moduleName, 15, "wrong difficulty") + ErrWrongDifficulty = errorsmod.Register(moduleName, 15, "wrong difficulty") // ErrExtraValidators is returned if non-sprint-end block contain validator data in // their extra-data fields. - ErrExtraValidators = sdkerrors.Register(moduleName, 16, "non-sprint-end block contains extra validator list") + ErrExtraValidators = errorsmod.Register(moduleName, 16, "non-sprint-end block contains extra validator list") // ErrInvalidSpanValidators is returned if a block contains an // invalid list of validators (i.e. non divisible by 20 bytes). - ErrInvalidSpanValidators = sdkerrors.Register(moduleName, 17, "invalid validator list on sprint end block") + ErrInvalidSpanValidators = errorsmod.Register(moduleName, 17, "invalid validator list on sprint end block") - ErrInvalidProof = sdkerrors.Register(moduleName, 18, "invalid proof") + ErrInvalidProof = errorsmod.Register(moduleName, 18, "invalid proof") ) diff --git a/modules/tibc/light-clients/08-bsc/types/header.go b/modules/tibc/light-clients/08-bsc/types/header.go index f9931ffa..88a3b2a2 100644 --- a/modules/tibc/light-clients/08-bsc/types/header.go +++ b/modules/tibc/light-clients/08-bsc/types/header.go @@ -12,9 +12,9 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" + errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/bianjieai/tibc-go/modules/tibc/core/exported" ) @@ -40,24 +40,24 @@ func (h Header) ValidateBasic() error { // Check that the extra-data contains the vanity, validators and signature. if len(h.Extra) < extraVanity { - return sdkerrors.Wrap(ErrMissingVanity, "header Extra") + return errorsmod.Wrap(ErrMissingVanity, "header Extra") } if len(h.Extra) < extraVanity+extraSeal { - return sdkerrors.Wrap(ErrMissingSignature, "header Extra") + return errorsmod.Wrap(ErrMissingSignature, "header Extra") } // Ensure that the mix digest is zero as we don't have fork protection currently if common.BytesToHash(h.MixDigest) != (common.Hash{}) { - return sdkerrors.Wrap(ErrInvalidMixDigest, "header MixDigest") + return errorsmod.Wrap(ErrInvalidMixDigest, "header MixDigest") } // Ensure that the block doesn't contain any uncles which are meaningless in PoA if common.BytesToHash(h.UncleHash) != uncleHash { - return sdkerrors.Wrap(ErrInvalidUncleHash, "header UncleHash") + return errorsmod.Wrap(ErrInvalidUncleHash, "header UncleHash") } // Ensure that the block's difficulty is meaningful (may not be correct at this point) if number > 0 { if h.Difficulty == 0 { - return sdkerrors.Wrap(ErrInvalidDifficulty, "header Difficulty") + return errorsmod.Wrap(ErrInvalidDifficulty, "header Difficulty") } } return nil @@ -85,7 +85,7 @@ func (h Header) ToBscHeader() BscHeader { func verifyHeader( cdc codec.BinaryCodec, - store sdk.KVStore, + store storetypes.KVStore, clientState *ClientState, header Header, ) error { @@ -99,11 +99,11 @@ func verifyHeader( // Ensure that the extra-data contains a signer list on checkpoint, but none otherwise signersBytes := len(header.Extra) - extraVanity - extraSeal if !isEpoch && signersBytes != 0 { - return sdkerrors.Wrap(ErrExtraValidators, "header.Extra") + return errorsmod.Wrap(ErrExtraValidators, "header.Extra") } if isEpoch && signersBytes%addressLength != 0 { - return sdkerrors.Wrap(ErrInvalidSpanValidators, "header.Extra") + return errorsmod.Wrap(ErrInvalidSpanValidators, "header.Extra") } // All basic checks passed, verify cascading fields @@ -116,7 +116,7 @@ func verifyHeader( // database. This is useful for concurrently verifying a batch of new headers. func verifyCascadingFields( cdc codec.BinaryCodec, - store sdk.KVStore, + store storetypes.KVStore, clientState *ClientState, header Header, ) error { @@ -124,7 +124,7 @@ func verifyCascadingFields( parent := clientState.Header if parent.Height.RevisionHeight != height-1 || parent.Hash() != common.BytesToHash(header.ParentHash) { - return sdkerrors.Wrap(ErrUnknownAncestor, "") + return errorsmod.Wrap(ErrUnknownAncestor, "") } // Verify that the gas limit is <= 2^63-1 @@ -154,7 +154,7 @@ func verifyCascadingFields( func verifySeal( cdc codec.BinaryCodec, - store sdk.KVStore, + store storetypes.KVStore, clientState *ClientState, header Header, ) error { @@ -167,7 +167,7 @@ func verifySeal( } if signer != common.BytesToAddress(header.Coinbase) { - return sdkerrors.Wrap(ErrCoinBaseMisMatch, "header.Coinbase") + return errorsmod.Wrap(ErrCoinBaseMisMatch, "header.Coinbase") } // Retrieve the snapshot needed to verify this header and cache it @@ -177,14 +177,14 @@ func verifySeal( } if _, ok := snap.Validators[signer]; !ok { - return sdkerrors.Wrap(ErrUnauthorizedValidator, signer.Hex()) + return errorsmod.Wrap(ErrUnauthorizedValidator, signer.Hex()) } for seen, recent := range snap.Recents { if recent == signer { // Signer is among recents, only fail if the current block doesn't shift it out if limit := uint64(len(snap.Validators)/2 + 1); seen > number-limit { - return sdkerrors.Wrap(ErrRecentlySigned, signer.Hex()) + return errorsmod.Wrap(ErrRecentlySigned, signer.Hex()) } } } @@ -198,10 +198,10 @@ func verifySeal( inturn := snap.inturn(signer) diff := big.NewInt(int64(header.Difficulty)) if inturn && diff.Cmp(diffInTurn) != 0 { - return sdkerrors.Wrap(ErrWrongDifficulty, "header.Difficulty") + return errorsmod.Wrap(ErrWrongDifficulty, "header.Difficulty") } if !inturn && diff.Cmp(diffNoTurn) != 0 { - return sdkerrors.Wrap(ErrWrongDifficulty, "header.Difficulty") + return errorsmod.Wrap(ErrWrongDifficulty, "header.Difficulty") } return nil } @@ -210,7 +210,7 @@ func verifySeal( func ecrecover(header Header, chainId *big.Int) (common.Address, error) { // Retrieve the signature from the header extra-data if len(header.Extra) < extraSeal { - return common.Address{}, sdkerrors.Wrap(ErrMissingSignature, "header.Extra") + return common.Address{}, errorsmod.Wrap(ErrMissingSignature, "header.Extra") } signature := header.Extra[len(header.Extra)-extraSeal:] diff --git a/modules/tibc/light-clients/08-bsc/types/snapshot.go b/modules/tibc/light-clients/08-bsc/types/snapshot.go index d0255d3e..e2143b7d 100644 --- a/modules/tibc/light-clients/08-bsc/types/snapshot.go +++ b/modules/tibc/light-clients/08-bsc/types/snapshot.go @@ -4,8 +4,8 @@ import ( "bytes" "sort" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" ) @@ -18,7 +18,7 @@ func (s validatorsAscending) Swap(i, j int) { s[i], s[j] = s[j], s[i] } type snapshot struct { cdc codec.BinaryCodec - store sdk.KVStore + store storetypes.KVStore // Block number where the snapshot was created Number uint64 // Set of authorized validators at this moment @@ -26,7 +26,7 @@ type snapshot struct { Recents map[uint64]common.Address } -func (m ClientState) snapshot(cdc codec.BinaryCodec, store sdk.KVStore) (*snapshot, error) { +func (m ClientState) snapshot(cdc codec.BinaryCodec, store storetypes.KVStore) (*snapshot, error) { recentSingers, err := GetRecentSigners(store) if err != nil { diff --git a/modules/tibc/light-clients/08-bsc/types/store.go b/modules/tibc/light-clients/08-bsc/types/store.go index 3eed6831..794543bc 100644 --- a/modules/tibc/light-clients/08-bsc/types/store.go +++ b/modules/tibc/light-clients/08-bsc/types/store.go @@ -4,10 +4,10 @@ import ( "fmt" "strings" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/store/types" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" clienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" host "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" @@ -19,12 +19,12 @@ var ( PrefixPendingValidators = "pendingValidators" ) -func GetIterator(store sdk.KVStore, keyType string) types.Iterator { - iterator := sdk.KVStorePrefixIterator(store, []byte(keyType)) +func GetIterator(store storetypes.KVStore, keyType string) types.Iterator { + iterator := storetypes.KVStorePrefixIterator(store, []byte(keyType)) return iterator } -func IteratorTraversal(store sdk.KVStore, keyType string, cb func(key, val []byte) bool) { +func IteratorTraversal(store storetypes.KVStore, keyType string, cb func(key, val []byte) bool) { iterator := GetIterator(store, keyType) defer iterator.Close() @@ -37,10 +37,10 @@ func IteratorTraversal(store sdk.KVStore, keyType string, cb func(key, val []byt // GetConsensusState retrieves the consensus state from the client prefixed // store. An error is returned if the consensus state does not exist. -func GetConsensusState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height) (*ConsensusState, error) { +func GetConsensusState(store storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height) (*ConsensusState, error) { bz := store.Get(host.ConsensusStateKey(height)) if bz == nil { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( clienttypes.ErrConsensusStateNotFound, "consensus state does not exist for height %s", height, @@ -49,12 +49,12 @@ func GetConsensusState(store sdk.KVStore, cdc codec.BinaryCodec, height exported consensusStateI, err := clienttypes.UnmarshalConsensusState(cdc, bz) if err != nil { - return nil, sdkerrors.Wrapf(clienttypes.ErrInvalidConsensus, "unmarshal error: %v", err) + return nil, errorsmod.Wrapf(clienttypes.ErrInvalidConsensus, "unmarshal error: %v", err) } consensusState, ok := consensusStateI.(*ConsensusState) if !ok { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( clienttypes.ErrInvalidConsensus, "invalid consensus type %T, expected %T", consensusState, &ConsensusState{}, @@ -65,24 +65,24 @@ func GetConsensusState(store sdk.KVStore, cdc codec.BinaryCodec, height exported } // SetRecentSigners sets the recent singer list in the client prefixed store -func SetRecentSigners(store sdk.KVStore, recentSingers []Signer) { +func SetRecentSigners(store storetypes.KVStore, recentSingers []Signer) { for _, singer := range recentSingers { store.Set(keyRecentSinger(singer), singer.Validator) } } -func SetSigner(store sdk.KVStore, signer Signer) { +func SetSigner(store storetypes.KVStore, signer Signer) { store.Set(keyRecentSinger(signer), signer.Validator) } -func DeleteSigner(store sdk.KVStore, height clienttypes.Height) { +func DeleteSigner(store storetypes.KVStore, height clienttypes.Height) { keyBz := []byte(fmt.Sprintf("%s/%s", PrefixKeyRecentSingers, height)) store.Delete(keyBz) } // GetRecentSigners retrieves the recent singer list from the client prefixed -func GetRecentSigners(store sdk.KVStore) (recentSingers []Signer, err error) { - iterator := sdk.KVStorePrefixIterator(store, []byte(PrefixKeyRecentSingers)) +func GetRecentSigners(store storetypes.KVStore) (recentSingers []Signer, err error) { + iterator := storetypes.KVStorePrefixIterator(store, []byte(PrefixKeyRecentSingers)) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { @@ -101,7 +101,7 @@ func GetRecentSigners(store sdk.KVStore) (recentSingers []Signer, err error) { } // SetPendingValidators sets the validators to be updated in the client prefixed store -func SetPendingValidators(store sdk.KVStore, cdc codec.BinaryCodec, validators [][]byte, +func SetPendingValidators(store storetypes.KVStore, cdc codec.BinaryCodec, validators [][]byte, ) { validatorSet := ValidatorSet{ Validators: validators, @@ -111,7 +111,7 @@ func SetPendingValidators(store sdk.KVStore, cdc codec.BinaryCodec, validators [ } // GetPendingValidators retrieves the validators to be updated from the client prefixed store -func GetPendingValidators(cdc codec.BinaryCodec, store sdk.KVStore) ValidatorSet { +func GetPendingValidators(cdc codec.BinaryCodec, store storetypes.KVStore) ValidatorSet { bz := store.Get([]byte(PrefixPendingValidators)) var validatorSet ValidatorSet diff --git a/modules/tibc/light-clients/08-bsc/types/update.go b/modules/tibc/light-clients/08-bsc/types/update.go index 47db6510..8be36902 100644 --- a/modules/tibc/light-clients/08-bsc/types/update.go +++ b/modules/tibc/light-clients/08-bsc/types/update.go @@ -3,9 +3,10 @@ package types import ( "github.com/ethereum/go-ethereum/common" + errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" clienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" "github.com/bianjieai/tibc-go/modules/tibc/core/exported" @@ -14,7 +15,7 @@ import ( func (m ClientState) CheckHeaderAndUpdateState( ctx sdk.Context, cdc codec.BinaryCodec, - store sdk.KVStore, + store storetypes.KVStore, header exported.Header, ) ( exported.ClientState, @@ -23,7 +24,7 @@ func (m ClientState) CheckHeaderAndUpdateState( ) { bscHeader, ok := header.(*Header) if !ok { - return nil, nil, sdkerrors.Wrapf( + return nil, nil, errorsmod.Wrapf( clienttypes.ErrInvalidHeader, "expected type %T, got %T", &Header{}, header, ) } @@ -31,7 +32,7 @@ func (m ClientState) CheckHeaderAndUpdateState( // get consensus state from clientStore bscConsState, err := GetConsensusState(store, cdc, m.GetLatestHeight()) if err != nil { - return nil, nil, sdkerrors.Wrapf( + return nil, nil, errorsmod.Wrapf( err, "could not get consensus state from clientstore at TrustedHeight: %s", m.GetLatestHeight(), ) } @@ -49,7 +50,7 @@ func (m ClientState) CheckHeaderAndUpdateState( // checkValidity checks if the bsc header is valid. func checkValidity( cdc codec.BinaryCodec, - store sdk.KVStore, + store storetypes.KVStore, clientState *ClientState, consState *ConsensusState, header Header, @@ -64,7 +65,7 @@ func checkValidity( // update the RecentSingers and the ConsensusState. func update( cdc codec.BinaryCodec, - store sdk.KVStore, + store storetypes.KVStore, clientState *ClientState, header *Header, ) ( diff --git a/modules/tibc/light-clients/09-eth/types/client_state.go b/modules/tibc/light-clients/09-eth/types/client_state.go index 801374ab..200fea15 100644 --- a/modules/tibc/light-clients/09-eth/types/client_state.go +++ b/modules/tibc/light-clients/09-eth/types/client_state.go @@ -12,6 +12,8 @@ import ( "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/trie" + errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -50,13 +52,13 @@ func (m ClientState) GetPrefix() exported.Prefix { func (m ClientState) Initialize( ctx sdk.Context, cdc codec.BinaryCodec, - store sdk.KVStore, + store storetypes.KVStore, state exported.ConsensusState, ) error { header := m.Header headerBytes, err := cdc.MarshalInterface(&header) if err != nil { - return sdkerrors.Wrap(ErrInvalidGenesisBlock, "marshal consensus to interface failed") + return errorsmod.Wrap(ErrInvalidGenesisBlock, "marshal consensus to interface failed") } SetEthHeaderIndex(store, header, headerBytes) SetEthConsensusRoot(store, header.Height.RevisionHeight, header.ToEthHeader().Root, header.Hash()) @@ -65,7 +67,7 @@ func (m ClientState) Initialize( func (m ClientState) Status( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, cdc codec.BinaryCodec, ) exported.Status { onsState, err := GetConsensusState(store, cdc, m.GetLatestHeight()) @@ -78,7 +80,7 @@ func (m ClientState) Status( return exported.Active } -func (m ClientState) ExportMetadata(store sdk.KVStore) []exported.GenesisMetadata { +func (m ClientState) ExportMetadata(store storetypes.KVStore) []exported.GenesisMetadata { gm := make([]exported.GenesisMetadata, 0) callback := func(key, val []byte) bool { gm = append(gm, clienttypes.NewGenesisMetadata(key, val)) @@ -96,7 +98,7 @@ func (m ClientState) ExportMetadata(store sdk.KVStore) []exported.GenesisMetadat func (m ClientState) VerifyPacketCommitment( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, proof []byte, @@ -112,7 +114,7 @@ func (m ClientState) VerifyPacketCommitment( // check delay period has passed delayBlock := m.Header.Height.RevisionHeight - height.GetRevisionHeight() if delayBlock < m.GetDelayBlock() { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( sdkerrors.ErrInvalidHeight, "delay block (%d) < client state delay block (%d)", delayBlock, m.GetDelayBlock(), @@ -125,7 +127,7 @@ func (m ClientState) VerifyPacketCommitment( func (m ClientState) VerifyPacketAcknowledgement( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, proof []byte, @@ -140,7 +142,7 @@ func (m ClientState) VerifyPacketAcknowledgement( delayBlock := m.Header.Height.RevisionHeight - height.GetRevisionHeight() if delayBlock < m.GetDelayBlock() { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( sdkerrors.ErrInvalidHeight, "delay block (%d) < client state delay block (%d)", delayBlock, m.GetDelayBlock(), @@ -152,7 +154,7 @@ func (m ClientState) VerifyPacketAcknowledgement( func (m ClientState) VerifyPacketCleanCommitment( ctx sdk.Context, - store sdk.KVStore, + store storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height, proof []byte, @@ -166,7 +168,7 @@ func (m ClientState) VerifyPacketCleanCommitment( delayBlock := m.Header.Height.RevisionHeight - height.GetRevisionHeight() if delayBlock < m.GetDelayBlock() { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( sdkerrors.ErrInvalidHeight, "delay block (%d) < client state delay block (%d)", delayBlock, m.GetDelayBlock(), @@ -180,7 +182,7 @@ func (m ClientState) VerifyPacketCleanCommitment( // shared between the verification functions and returns the unmarshal // merkle proof, the consensus state and an error if one occurred. func produceVerificationArgs( - store sdk.KVStore, + store storetypes.KVStore, cdc codec.BinaryCodec, cs ClientState, height exported.Height, @@ -191,7 +193,7 @@ func produceVerificationArgs( err error, ) { if cs.GetLatestHeight().LT(height) { - return Proof{}, nil, sdkerrors.Wrapf( + return Proof{}, nil, errorsmod.Wrapf( sdkerrors.ErrInvalidHeight, "client state height < proof height (%d < %d)", cs.GetLatestHeight(), height, @@ -199,11 +201,11 @@ func produceVerificationArgs( } if proof == nil { - return Proof{}, nil, sdkerrors.Wrap(ErrInvalidProof, "proof cannot be empty") + return Proof{}, nil, errorsmod.Wrap(ErrInvalidProof, "proof cannot be empty") } if err = json.Unmarshal(proof, &merkleProof); err != nil { - return Proof{}, nil, sdkerrors.Wrap(ErrInvalidProof, "failed to unmarshal proof into proof") + return Proof{}, nil, errorsmod.Wrap(ErrInvalidProof, "failed to unmarshal proof into proof") } consensusState, err = GetConsensusState(store, cdc, height) diff --git a/modules/tibc/light-clients/09-eth/types/errors.go b/modules/tibc/light-clients/09-eth/types/errors.go index 14918c79..b970d351 100644 --- a/modules/tibc/light-clients/09-eth/types/errors.go +++ b/modules/tibc/light-clients/09-eth/types/errors.go @@ -1,8 +1,7 @@ package types import ( - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - + errorsmod "cosmossdk.io/errors" host "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" ) @@ -13,36 +12,36 @@ const ( // TIBC bsc client sentinel errors var ( - ErrInvalidGenesisBlock = sdkerrors.Register(moduleName, 2, "invalid genesis block") - ErrFutureBlock = sdkerrors.Register(moduleName, 3, "block in the future") + ErrInvalidGenesisBlock = errorsmod.Register(moduleName, 2, "invalid genesis block") + ErrFutureBlock = errorsmod.Register(moduleName, 3, "block in the future") // ErrInvalidMixDigest is returned if a block's mix digest is non-zero. - ErrInvalidMixDigest = sdkerrors.Register(moduleName, 4, "non-zero mix digest") + ErrInvalidMixDigest = errorsmod.Register(moduleName, 4, "non-zero mix digest") // ErrInvalidDifficulty is returned if the difficulty of a block is missing. - ErrInvalidDifficulty = sdkerrors.Register(moduleName, 5, "invalid difficulty") - ErrUnknownAncestor = sdkerrors.Register(moduleName, 6, "unknown ancestor") + ErrInvalidDifficulty = errorsmod.Register(moduleName, 5, "invalid difficulty") + ErrUnknownAncestor = errorsmod.Register(moduleName, 6, "unknown ancestor") // ErrWrongDifficulty is returned if the difficulty of a block doesn't match the // turn of the signer. - ErrWrongDifficulty = sdkerrors.Register(moduleName, 7, "wrong difficulty") - ErrInvalidProof = sdkerrors.Register(moduleName, 8, "invalid proof") + ErrWrongDifficulty = errorsmod.Register(moduleName, 7, "wrong difficulty") + ErrInvalidProof = errorsmod.Register(moduleName, 8, "invalid proof") // ErrHeaderIsExist is returned if the header already in store - ErrHeaderIsExist = sdkerrors.Register(moduleName, 9, "header already exist") + ErrHeaderIsExist = errorsmod.Register(moduleName, 9, "header already exist") // ErrUnmarshalInterface is returned if interface can not unmarshal - ErrUnmarshalInterface = sdkerrors.Register(moduleName, 10, "unmarshal field") + ErrUnmarshalInterface = errorsmod.Register(moduleName, 10, "unmarshal field") // ErrExtraLenth is returned if extra data is to long - ErrExtraLenth = sdkerrors.Register(moduleName, 11, "extra-data to long") + ErrExtraLenth = errorsmod.Register(moduleName, 11, "extra-data to long") // ErrInvalidGas is returned if gas data is invalid - ErrInvalidGas = sdkerrors.Register(moduleName, 12, "gas invalid") + ErrInvalidGas = errorsmod.Register(moduleName, 12, "gas invalid") // ErrHeader is returned if the header invalid - ErrHeader = sdkerrors.Register(moduleName, 13, "header invalid") + ErrHeader = errorsmod.Register(moduleName, 13, "header invalid") // ErrMarshalInterface is returned if struct can not marshal - ErrMarshalInterface = sdkerrors.Register(moduleName, 14, "marshal field") + ErrMarshalInterface = errorsmod.Register(moduleName, 14, "marshal field") ) diff --git a/modules/tibc/light-clients/09-eth/types/eth_test.go b/modules/tibc/light-clients/09-eth/types/eth_test.go index 36c71c54..86bd259a 100644 --- a/modules/tibc/light-clients/09-eth/types/eth_test.go +++ b/modules/tibc/light-clients/09-eth/types/eth_test.go @@ -20,9 +20,9 @@ type ETHTestSuite struct { } func (suite *ETHTestSuite) SetupTest() { - app := simapp.Setup(false) + app := simapp.Setup(suite.T()) - suite.ctx = app.BaseApp.NewContext(false, tmproto.Header{Time: time.Now()}) + suite.ctx = app.BaseApp.NewContextLegacy(false, tmproto.Header{Time: time.Now()}) suite.app = app } diff --git a/modules/tibc/light-clients/09-eth/types/header.go b/modules/tibc/light-clients/09-eth/types/header.go index c345300a..9c5a13f0 100644 --- a/modules/tibc/light-clients/09-eth/types/header.go +++ b/modules/tibc/light-clients/09-eth/types/header.go @@ -8,13 +8,14 @@ import ( "os" "time" + errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" clienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" "github.com/bianjieai/tibc-go/modules/tibc/core/exported" @@ -63,7 +64,7 @@ func (h Header) ValidateBasic() error { number := h.Height.RevisionHeight if number > 0 { if h.ToEthHeader().Difficulty.Uint64() == 0 { - return sdkerrors.Wrap(ErrInvalidDifficulty, "header Difficulty") + return errorsmod.Wrap(ErrInvalidDifficulty, "header Difficulty") } } return nil @@ -134,31 +135,31 @@ func (h Header) ToVerifyHeader() *types.Header { func verifyHeader( ctx sdk.Context, cdc codec.BinaryCodec, - store sdk.KVStore, + store storetypes.KVStore, clientState *ClientState, header Header, ) error { found := store.Get(EthHeaderIndexKey(header.Hash(), header.Height.RevisionHeight)) if found != nil { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidHeader, "header already exist for hash %s", header.Hash(), ) } parentHeaderBytes := GetParentHeaderFromIndex(store, header) if parentHeaderBytes == nil { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidHeader, "header does not exist for hash %s", header.ToEthHeader().ParentHash, ) } var parentHeaderInterface exported.Header if err := cdc.UnmarshalInterface(parentHeaderBytes, &parentHeaderInterface); err != nil { - return sdkerrors.Wrap(ErrUnmarshalInterface, err.Error()) + return errorsmod.Wrap(ErrUnmarshalInterface, err.Error()) } parentHeader, ok := parentHeaderInterface.(*Header) if !ok { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidHeader, "parent header can not marshal Invalid header hash %s", header.ToEthHeader().ParentHash, ) @@ -166,7 +167,7 @@ func verifyHeader( //verify whether parent hash validity ethHeader := parentHeader.ToEthHeader() if !bytes.Equal(ethHeader.Hash().Bytes(), header.ToEthHeader().ParentHash.Bytes()) { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidHeader, "parent hash not equal, header.parent: %s ,parent : %s", header.ToEthHeader().ParentHash, @@ -183,12 +184,12 @@ func verifyHeader( } err := VerifyEip1559Header(parentHeader, &header) if err != nil { - return sdkerrors.Wrap(ErrHeader, fmt.Errorf("SyncBlockHeader, err:%v", err).Error()) + return errorsmod.Wrap(ErrHeader, fmt.Errorf("SyncBlockHeader, err:%v", err).Error()) } //verify difficulty expected := makeDifficultyCalculator(big.NewInt(DifficultyCalculatorParams))(header.Time, parentHeader) if expected.Cmp(header.ToEthHeader().Difficulty) != 0 { - return sdkerrors.Wrap( + return errorsmod.Wrap( ErrWrongDifficulty, fmt.Errorf( "SyncBlockHeader, invalid difficulty: have %v, want %v, header: %s", diff --git a/modules/tibc/light-clients/09-eth/types/store.go b/modules/tibc/light-clients/09-eth/types/store.go index 4f3620ed..acdaebab 100644 --- a/modules/tibc/light-clients/09-eth/types/store.go +++ b/modules/tibc/light-clients/09-eth/types/store.go @@ -5,13 +5,14 @@ import ( "fmt" "strings" - "github.com/cosmos/cosmos-sdk/store/types" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/store/types" + storetypes "cosmossdk.io/store/types" "github.com/ethereum/go-ethereum/common" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" clienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" host "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" @@ -38,17 +39,17 @@ func EthRootMainKey(root common.Hash, height uint64) []byte { } func SetEthHeaderIndex( - clientStore sdk.KVStore, + clientStore storetypes.KVStore, header Header, headerBytes []byte, ) { clientStore.Set(EthHeaderIndexKey(header.Hash(), header.Height.RevisionHeight), headerBytes) } -func GetIterator(store sdk.KVStore, keyType string) types.Iterator { - iterator := sdk.KVStorePrefixIterator(store, []byte(keyType)) +func GetIterator(store storetypes.KVStore, keyType string) types.Iterator { + iterator := storetypes.KVStorePrefixIterator(store, []byte(keyType)) return iterator } -func IteratorEthMetaDataByPrefix(store sdk.KVStore, keyType string, cb func(key, val []byte) bool) { +func IteratorEthMetaDataByPrefix(store storetypes.KVStore, keyType string, cb func(key, val []byte) bool) { iterator := GetIterator(store, keyType) defer iterator.Close() @@ -60,7 +61,7 @@ func IteratorEthMetaDataByPrefix(store sdk.KVStore, keyType string, cb func(key, } func GetParentHeaderFromIndex( - clientStore sdk.KVStore, + clientStore storetypes.KVStore, header Header, ) []byte { get := clientStore.Get(EthHeaderIndexKey(header.ToEthHeader().ParentHash, header.Height.RevisionHeight-1)) @@ -69,22 +70,22 @@ func GetParentHeaderFromIndex( // SetEthConsensusRoot sets the consensus metadata with the provided values func SetEthConsensusRoot( - clientStore sdk.KVStore, + clientStore storetypes.KVStore, height uint64, root, headerHash common.Hash, ) { clientStore.Set(EthRootMainKey(root, height), EthHeaderIndexKey(headerHash, height)) } -func GetHeaderIndexKeyByEthConsensusRoot(clientStore sdk.KVStore, root common.Hash, height uint64) []byte { +func GetHeaderIndexKeyByEthConsensusRoot(clientStore storetypes.KVStore, root common.Hash, height uint64) []byte { return clientStore.Get(EthRootMainKey(root, height)) } // GetConsensusState retrieves the consensus state from the client prefixed // store. An error is returned if the consensus state does not exist. -func GetConsensusState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height) (*ConsensusState, error) { +func GetConsensusState(store storetypes.KVStore, cdc codec.BinaryCodec, height exported.Height) (*ConsensusState, error) { bz := store.Get(host.ConsensusStateKey(height)) if bz == nil { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( clienttypes.ErrConsensusStateNotFound, "consensus state does not exist for height %s", height, @@ -93,12 +94,12 @@ func GetConsensusState(store sdk.KVStore, cdc codec.BinaryCodec, height exported consensusStateI, err := clienttypes.UnmarshalConsensusState(cdc, bz) if err != nil { - return nil, sdkerrors.Wrapf(clienttypes.ErrInvalidConsensus, "unmarshal error: %v", err) + return nil, errorsmod.Wrapf(clienttypes.ErrInvalidConsensus, "unmarshal error: %v", err) } consensusState, ok := consensusStateI.(*ConsensusState) if !ok { - return nil, sdkerrors.Wrapf( + return nil, errorsmod.Wrapf( clienttypes.ErrInvalidConsensus, "invalid consensus type %T, expected %T", consensusState, &ConsensusState{}, @@ -110,9 +111,9 @@ func GetConsensusState(store sdk.KVStore, cdc codec.BinaryCodec, height exported // IterateConsensusStateAscending iterates through the consensus states in ascending order. It calls the provided // callback on each height, until stop=true is returned. -func IterateConsensusStateAscending(clientStore sdk.KVStore, +func IterateConsensusStateAscending(clientStore storetypes.KVStore, cb func(height exported.Height) (stop bool)) { - iterator := sdk.KVStorePrefixIterator(clientStore, []byte(host.KeyConsensusStatePrefix)) + iterator := storetypes.KVStorePrefixIterator(clientStore, []byte(host.KeyConsensusStatePrefix)) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { @@ -139,16 +140,16 @@ func GetHeightFromIterationKey(iterKey []byte) exported.Height { height := sdk.BigEndianToUint64(heightBytes) return clienttypes.NewHeight(revision, height) } -func deleteRootMain(clientStore sdk.KVStore, root common.Hash, height exported.Height) { +func deleteRootMain(clientStore storetypes.KVStore, root common.Hash, height exported.Height) { clientStore.Delete(EthRootMainKey(root, height.GetRevisionHeight())) } // deleteConsensusStateAndIndexHeader deletes the consensus state at the given height -func deleteConsensusStateAndIndexHeader(cdc codec.BinaryCodec, clientStore sdk.KVStore, height exported.Height) error { +func deleteConsensusStateAndIndexHeader(cdc codec.BinaryCodec, clientStore storetypes.KVStore, height exported.Height) error { key := host.ConsensusStateKey(height) consensusState := clientStore.Get(key) if consensusState == nil { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrConsensusStateNotFound, "consensus state does not exist for height %s", height, ) @@ -164,7 +165,7 @@ func deleteConsensusStateAndIndexHeader(cdc codec.BinaryCodec, clientStore sdk.K root := tmpConsensus.Root headerIndexKey := GetHeaderIndexKeyByEthConsensusRoot(clientStore, common.BytesToHash(root), height.GetRevisionHeight()) if headerIndexKey == nil { - return sdkerrors.Wrapf(ErrHeader, + return errorsmod.Wrapf(ErrHeader, "Header index not found in height %s", height, ) } diff --git a/modules/tibc/light-clients/09-eth/types/update.go b/modules/tibc/light-clients/09-eth/types/update.go index 99ca8625..61457927 100644 --- a/modules/tibc/light-clients/09-eth/types/update.go +++ b/modules/tibc/light-clients/09-eth/types/update.go @@ -3,11 +3,12 @@ package types import ( "bytes" + errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" "github.com/ethereum/go-ethereum/common" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" clienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" host "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" @@ -17,7 +18,7 @@ import ( func (m ClientState) CheckHeaderAndUpdateState( ctx sdk.Context, cdc codec.BinaryCodec, - store sdk.KVStore, + store storetypes.KVStore, header exported.Header, ) ( exported.ClientState, @@ -26,13 +27,13 @@ func (m ClientState) CheckHeaderAndUpdateState( ) { ethHeader, ok := header.(*Header) if !ok { - return nil, nil, sdkerrors.Wrapf(clienttypes.ErrInvalidHeader, "expected type %T, got %T", &Header{}, header) + return nil, nil, errorsmod.Wrapf(clienttypes.ErrInvalidHeader, "expected type %T, got %T", &Header{}, header) } height := m.GetLatestHeight() // get consensus state from clientStore ethConsState, err := GetConsensusState(store, cdc, height) if err != nil { - return nil, nil, sdkerrors.Wrapf( + return nil, nil, errorsmod.Wrapf( err, "could not get consensus state from clientStore at TrustedHeight: %s,please upgrade", m.GetLatestHeight(), ) } @@ -91,7 +92,7 @@ func (m ClientState) CheckHeaderAndUpdateState( func checkValidity( ctx sdk.Context, cdc codec.BinaryCodec, - store sdk.KVStore, + store storetypes.KVStore, clientState *ClientState, consState *ConsensusState, header Header, @@ -106,7 +107,7 @@ func checkValidity( func update( ctx sdk.Context, cdc codec.BinaryCodec, - store sdk.KVStore, + store storetypes.KVStore, clientState *ClientState, header *Header, ) ( @@ -121,14 +122,14 @@ func update( } headerInterface, err := cdc.MarshalInterface(header) if err != nil { - return nil, nil, sdkerrors.Wrap(ErrInvalidGenesisBlock, "marshal consensus to interface failed") + return nil, nil, errorsmod.Wrap(ErrInvalidGenesisBlock, "marshal consensus to interface failed") } SetEthHeaderIndex(store, *header, headerInterface) SetEthConsensusRoot(store, header.GetHeight().GetRevisionHeight(), header.ToEthHeader().Root, header.Hash()) return clientState, cs, nil } -func (m ClientState) RestrictChain(cdc codec.BinaryCodec, store sdk.KVStore, new Header) error { +func (m ClientState) RestrictChain(cdc codec.BinaryCodec, store storetypes.KVStore, new Header) error { si, ti := m.Header.Height, new.Height var err error current := m.Header @@ -136,34 +137,34 @@ func (m ClientState) RestrictChain(cdc codec.BinaryCodec, store sdk.KVStore, new if si.RevisionHeight > ti.RevisionHeight { ConsensusTmp := store.Get(host.ConsensusStateKey(ti)) if ConsensusTmp == nil { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidConsensus, "can not find consensus state for height %s in RestrictChain", ti) } var tiConsensus exported.ConsensusState if err = cdc.UnmarshalInterface(ConsensusTmp, &tiConsensus); err != nil { - return sdkerrors.Wrapf(ErrUnmarshalInterface, "can not unmarshal ConsensusState interface in RestrictChain ") + return errorsmod.Wrapf(ErrUnmarshalInterface, "can not unmarshal ConsensusState interface in RestrictChain ") } tmpConsensus, ok := tiConsensus.(*ConsensusState) if !ok { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidConsensus, "can not find consensus state for height %s in RestrictChain", ti) } root := tmpConsensus.Root headerIndexKey := GetHeaderIndexKeyByEthConsensusRoot(store, common.BytesToHash(root), ti.GetRevisionHeight()) currentBytes := store.Get(headerIndexKey) if currentBytes == nil { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidConsensus, "can not find Header for height %s in RestrictChain", ti) } var currentHeaderInterface exported.Header if err = cdc.UnmarshalInterface(currentBytes, ¤tHeaderInterface); err != nil { - return sdkerrors.Wrapf(ErrUnmarshalInterface, "can not unmarshal ConsensusState interface in RestrictChain ") + return errorsmod.Wrapf(ErrUnmarshalInterface, "can not unmarshal ConsensusState interface in RestrictChain ") } currentTmp, ok := currentHeaderInterface.(*Header) if !ok { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidConsensus, "can not find consensus state for height %s in RestrictChain", ti) } current = *currentTmp @@ -175,17 +176,17 @@ func (m ClientState) RestrictChain(cdc codec.BinaryCodec, store sdk.KVStore, new newHashes = append(newHashes, new.Hash()) newTmp := GetParentHeaderFromIndex(store, new) if newTmp == nil { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidConsensus, "can not find consensus state for hash %s in RestrictChain in RestrictChain", new.ToEthHeader().ParentHash, ) } var currently exported.Header if err := cdc.UnmarshalInterface(newTmp, ¤tly); err != nil { - return sdkerrors.Wrapf(ErrUnmarshalInterface, "can not unmarshal ConsensusState interface in RestrictChain ") + return errorsmod.Wrapf(ErrUnmarshalInterface, "can not unmarshal ConsensusState interface in RestrictChain ") } tmpConsensus, ok := currently.(*Header) if !ok { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidConsensus, "can not find consensus state for hash %s in RestrictChain", new.ToEthHeader().ParentHash) } new = *tmpConsensus @@ -196,16 +197,16 @@ func (m ClientState) RestrictChain(cdc codec.BinaryCodec, store sdk.KVStore, new newHashes = append(newHashes, new.Hash()) newTmp := GetParentHeaderFromIndex(store, new) if newTmp == nil { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidConsensus, "can not find consensus state for hash %s in RestrictChain", new.ToEthHeader().ParentHash) } var currently exported.Header if err = cdc.UnmarshalInterface(newTmp, ¤tly); err != nil { - return sdkerrors.Wrapf(ErrUnmarshalInterface, "can not unmarshal ConsensusState interface in RestrictChain ") + return errorsmod.Wrapf(ErrUnmarshalInterface, "can not unmarshal ConsensusState interface in RestrictChain ") } tmpConsensus, ok := currently.(*Header) if !ok { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidConsensus, "can not find consensus state for hash %s in RestrictChain", new.ToEthHeader().ParentHash) } new = *tmpConsensus @@ -213,15 +214,15 @@ func (m ClientState) RestrictChain(cdc codec.BinaryCodec, store sdk.KVStore, new si.RevisionHeight-- currentTmp := GetParentHeaderFromIndex(store, current) if currentTmp == nil { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidConsensus, "can not find consensus state for height %s in RestrictChain", si) } if err = cdc.UnmarshalInterface(currentTmp, ¤tly); err != nil { - return sdkerrors.Wrapf(ErrUnmarshalInterface, "can not unmarshal ConsensusState interface in RestrictChain ") + return errorsmod.Wrapf(ErrUnmarshalInterface, "can not unmarshal ConsensusState interface in RestrictChain ") } tmpConsensus = currently.(*Header) if !ok { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidConsensus, "can not consensus state for height %s in RestrictChain", si) } current = *tmpConsensus @@ -229,17 +230,17 @@ func (m ClientState) RestrictChain(cdc codec.BinaryCodec, store sdk.KVStore, new for i := len(newHashes) - 1; i >= 0; i-- { newTmp := store.Get(EthHeaderIndexKey(newHashes[i], ti.GetRevisionHeight())) if newTmp == nil { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidConsensus, "can not find consensus state for hash %s in RestrictChain", newHashes[i]) } var currently exported.Header if err := cdc.UnmarshalInterface(newTmp, ¤tly); err != nil { - return sdkerrors.Wrapf(ErrUnmarshalInterface, "can not unmarshal ConsensusState interface in RestrictChain ") + return errorsmod.Wrapf(ErrUnmarshalInterface, "can not unmarshal ConsensusState interface in RestrictChain ") } tmpHeader, ok := currently.(*Header) if !ok { - return sdkerrors.Wrapf( + return errorsmod.Wrapf( clienttypes.ErrInvalidConsensus, "can not find consensus state for hash %s in RestrictChain", new.ToEthHeader().ParentHash) } consensusState := &ConsensusState{ @@ -249,7 +250,7 @@ func (m ClientState) RestrictChain(cdc codec.BinaryCodec, store sdk.KVStore, new } consensusStateBytes, err := cdc.MarshalInterface(consensusState) if err != nil { - return sdkerrors.Wrap(ErrInvalidGenesisBlock, "marshal consensus to byte failed") + return errorsmod.Wrap(ErrInvalidGenesisBlock, "marshal consensus to byte failed") } // set main_chain store.Set(host.ConsensusStateKey(ti), consensusStateBytes) diff --git a/modules/tibc/testing/app.go b/modules/tibc/testing/app.go index 241ffaf8..2151614b 100644 --- a/modules/tibc/testing/app.go +++ b/modules/tibc/testing/app.go @@ -5,16 +5,15 @@ import ( "testing" "time" - sdkmath "cosmossdk.io/math" - "github.com/stretchr/testify/require" - dbm "github.com/cometbft/cometbft-db" + "cosmossdk.io/log" + sdkmath "cosmossdk.io/math" + abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" tmtypes "github.com/cometbft/cometbft/types" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -28,22 +27,21 @@ import ( var DefaultTestingAppInit func(chainID string) (*simapp.SimApp, map[string]json.RawMessage) = SetupTestingApp +// SetupTestingApp returns a new SimApp with a memory DB and a logger that does +// not output to the console. It also returns the genesis state as a map of +// json.RawMessage. The app is configured with the given chainID and the +// default options for the simapp. func SetupTestingApp(chainID string) (*simapp.SimApp, map[string]json.RawMessage) { db := dbm.NewMemDB() - encCdc := simapp.MakeTestEncodingConfig() app := simapp.NewSimApp( log.NewNopLogger(), db, nil, true, - map[int64]bool{}, - simapp.DefaultNodeHome, - 5, - encCdc, simapp.EmptyAppOptions{}, baseapp.SetChainID(chainID), ) - return app, simapp.NewDefaultGenesisState(encCdc.Codec) + return app, simapp.NewDefaultGenesisState(app.AppCodec()) } // SetupWithGenesisValSet initializes a new SimApp with a validator set and genesis accounts @@ -60,6 +58,9 @@ func SetupWithGenesisValSet( ) *simapp.SimApp { app, genesisState := DefaultTestingAppInit(chainID) + // ensure baseapp has a chain-id set before running InitChain + baseapp.SetChainID(chainID)(app.BaseApp) + // set genesis accounts authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) genesisState[authtypes.ModuleName] = app.AppCodec().MustMarshalJSON(authGenesis) @@ -80,22 +81,22 @@ func SetupWithGenesisValSet( Jailed: false, Status: stakingtypes.Bonded, Tokens: bondAmt, - DelegatorShares: sdk.OneDec(), + DelegatorShares: sdkmath.LegacyOneDec(), Description: stakingtypes.Description{}, UnbondingHeight: int64(0), UnbondingTime: time.Unix(0, 0).UTC(), Commission: stakingtypes.NewCommission( - sdk.ZeroDec(), - sdk.ZeroDec(), - sdk.ZeroDec(), + sdkmath.LegacyZeroDec(), + sdkmath.LegacyZeroDec(), + sdkmath.LegacyZeroDec(), ), - MinSelfDelegation: sdk.ZeroInt(), + MinSelfDelegation: sdkmath.ZeroInt(), } validators = append(validators, validator) delegations = append( delegations, - stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec()), + stakingtypes.NewDelegation(genAccs[0].GetAddress().String(), sdk.ValAddress(val.Address.Bytes()).String(), sdkmath.LegacyOneDec()), ) } @@ -109,7 +110,7 @@ func SetupWithGenesisValSet( balances = append(balances, banktypes.Balance{ Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(), Coins: sdk.Coins{ - sdk.NewCoin(bondDenom, bondAmt.Mul(sdk.NewInt(int64(len(valSet.Validators))))), + sdk.NewCoin(bondDenom, bondAmt.Mul(sdkmath.NewInt(int64(len(valSet.Validators))))), }, }) @@ -131,28 +132,22 @@ func SetupWithGenesisValSet( require.NoError(t, err) // init chain will set the validator set and initialize the genesis accounts - app.InitChain( - abci.RequestInitChain{ + _, err = app.InitChain( + &abci.RequestInitChain{ ChainId: chainID, Validators: []abci.ValidatorUpdate{}, ConsensusParams: simapp.DefaultConsensusParams, AppStateBytes: stateBytes, }, ) + require.NoError(t, err) - // commit genesis changes - app.Commit() - app.BeginBlock( - abci.RequestBeginBlock{ - Header: tmproto.Header{ - ChainID: chainID, - Height: app.LastBlockHeight() + 1, - AppHash: app.LastCommitID().Hash, - ValidatorsHash: valSet.Hash(), - NextValidatorsHash: valSet.Hash(), - }, - }, - ) + _, err = app.FinalizeBlock(&abci.RequestFinalizeBlock{ + Height: 1, + Hash: app.LastCommitID().Hash, + NextValidatorsHash: valSet.Hash(), + }) + require.NoError(t, err) return app } diff --git a/modules/tibc/testing/chain.go b/modules/tibc/testing/chain.go index f9c3853a..1d92c14d 100644 --- a/modules/tibc/testing/chain.go +++ b/modules/tibc/testing/chain.go @@ -7,21 +7,22 @@ import ( "testing" "time" - tmprotoversion "github.com/cometbft/cometbft/proto/tendermint/version" + "cosmossdk.io/math" "github.com/stretchr/testify/require" + errorsmod "cosmossdk.io/errors" abci "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/crypto/tmhash" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - tmtypes "github.com/cometbft/cometbft/types" - tmversion "github.com/cometbft/cometbft/version" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + cmtprotoversion "github.com/cometbft/cometbft/proto/tendermint/version" + cmttypes "github.com/cometbft/cometbft/types" + cmtversion "github.com/cometbft/cometbft/version" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/staking/testutil" @@ -32,7 +33,7 @@ import ( host "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" "github.com/bianjieai/tibc-go/modules/tibc/core/exported" "github.com/bianjieai/tibc-go/modules/tibc/core/types" - ibctmtypes "github.com/bianjieai/tibc-go/modules/tibc/light-clients/07-tendermint/types" + ibccmttypes "github.com/bianjieai/tibc-go/modules/tibc/light-clients/07-tendermint/types" "github.com/bianjieai/tibc-go/modules/tibc/testing/mock" "github.com/bianjieai/tibc-go/simapp" ) @@ -59,9 +60,9 @@ const ( var ( // Default params variables used to create a TM client - DefaultTrustLevel ibctmtypes.Fraction = ibctmtypes.DefaultTrustLevel - TestHash = tmhash.Sum([]byte("TESTING HASH")) - TestCoin = sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)) + DefaultTrustLevel ibccmttypes.Fraction = ibccmttypes.DefaultTrustLevel + TestHash = tmhash.Sum([]byte("TESTING HASH")) + TestCoin = sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(100)) MockAcknowledgement = mock.MockAcknowledgement MockCommitment = mock.MockCommitment @@ -85,21 +86,21 @@ type TestChain struct { Coordinator *Coordinator App *simapp.SimApp ChainID, ChainName string - LastHeader *ibctmtypes.Header // header for last block height committed - CurrentHeader tmproto.Header // header for current block height + LastHeader *ibccmttypes.Header // header for last block height committed + ProposedHeader cmtproto.Header // header for current block height QueryServer types.QueryServer TxConfig client.TxConfig Codec codec.BinaryCodec - Vals *tmtypes.ValidatorSet - NextVals *tmtypes.ValidatorSet + Vals *cmttypes.ValidatorSet + NextVals *cmttypes.ValidatorSet // Signers is a map from validator address to the PrivValidator // The map is converted into an array that is the same order as the validators right before signing commit // This ensures that signers will always be in correct order even as validator powers change. // If a test adds a new validator after chain creation, then the signer map must be updated to include // the new PrivValidator entry. - Signers map[string]tmtypes.PrivValidator + Signers map[string]cmttypes.PrivValidator SenderPrivKey cryptotypes.PrivKey SenderAccount authtypes.AccountI @@ -126,8 +127,8 @@ func NewTestChainWithValSet( t *testing.T, coord *Coordinator, chainID string, - valSet *tmtypes.ValidatorSet, - signers map[string]tmtypes.PrivValidator, + valSet *cmttypes.ValidatorSet, + signers map[string]cmttypes.PrivValidator, ) *TestChain { genAccs := []authtypes.GenesisAccount{} genBals := []banktypes.Balance{} @@ -142,7 +143,7 @@ func NewTestChainWithValSet( uint64(i), 0, ) - amount, ok := sdk.NewIntFromString("10000000000000000000") + amount, ok := math.NewIntFromString("10000000000000000000") require.True(t, ok) balance := banktypes.Balance{ @@ -170,14 +171,12 @@ func NewTestChainWithValSet( genBals...) // create current header and call begin block - header := tmproto.Header{ + header := cmtproto.Header{ ChainID: chainID, Height: 1, Time: coord.CurrentTime.UTC(), } - txConfig := simapp.MakeTestEncodingConfig().TxConfig - // create an account to send transactions from chain := &TestChain{ T: t, @@ -185,9 +184,9 @@ func NewTestChainWithValSet( ChainID: chainID, ChainName: chainID, App: app, - CurrentHeader: header, + ProposedHeader: header, QueryServer: app.TIBCKeeper, - TxConfig: txConfig, + TxConfig: app.GetTxConfig(), Codec: app.AppCodec(), Vals: valSet, NextVals: valSet, @@ -197,7 +196,8 @@ func NewTestChainWithValSet( SenderAccounts: senderAccs, } - coord.CommitBlock(chain) + // commit genesis block + chain.NextBlock() return chain } @@ -208,29 +208,29 @@ func NewTestChain(t *testing.T, coord *Coordinator, chainID string) *TestChain { // generate validators private/public key var ( validatorsPerChain = 4 - validators []*tmtypes.Validator - signersByAddress = make(map[string]tmtypes.PrivValidator, validatorsPerChain) + validators []*cmttypes.Validator + signersByAddress = make(map[string]cmttypes.PrivValidator, validatorsPerChain) ) for i := 0; i < validatorsPerChain; i++ { privVal := mock.NewPV() pubKey, err := privVal.GetPubKey() require.NoError(t, err) - validators = append(validators, tmtypes.NewValidator(pubKey, 1)) + validators = append(validators, cmttypes.NewValidator(pubKey, 1)) signersByAddress[pubKey.Address().String()] = privVal } // construct validator set; // Note that the validators are sorted by voting power // or, if equal, by address lexical order - valSet := tmtypes.NewValidatorSet(validators) + valSet := cmttypes.NewValidatorSet(validators) return NewTestChainWithValSet(t, coord, chainID, valSet, signersByAddress) } // GetContext returns the current context for the application. func (chain *TestChain) GetContext() sdk.Context { - return chain.App.BaseApp.NewContext(false, chain.CurrentHeader) + return chain.App.BaseApp.NewUncachedContext(false, chain.ProposedHeader) } // QueryProof performs an abci query with the given key and returns the proto encoded merkle proof @@ -242,12 +242,13 @@ func (chain *TestChain) QueryProof(key []byte) ([]byte, clienttypes.Height) { // QueryProofAtHeight performs an abci query with the given key and returns the proto encoded merkle proof // for the query and the height at which the proof will succeed on a tendermint verifier. func (chain *TestChain) QueryProofAtHeight(key []byte, height int64) ([]byte, clienttypes.Height) { - res := chain.App.Query(abci.RequestQuery{ + res, err := chain.App.Query(context.Background(), &abci.RequestQuery{ Path: fmt.Sprintf("store/%s/key", host.StoreKey), Height: height - 1, Data: key, Prove: true, }) + require.NoError(chain.T, err) merkleProof, err := commitmenttypes.ConvertProofs(res.ProofOps) require.NoError(chain.T, err) @@ -266,12 +267,13 @@ func (chain *TestChain) QueryProofAtHeight(key []byte, height int64) ([]byte, cl // QueryUpgradeProof performs an abci query with the given key and returns the proto encoded merkle proof // for the query and the height at which the proof will succeed on a tendermint verifier. func (chain *TestChain) QueryUpgradeProof(key []byte, height uint64) ([]byte, clienttypes.Height) { - res := chain.App.Query(abci.RequestQuery{ + res, err := chain.App.Query(context.Background(), &abci.RequestQuery{ Path: "store/upgrade/key", Height: int64(height - 1), Data: key, Prove: true, }) + require.NoError(chain.T, err) merkleProof, err := commitmenttypes.ConvertProofs(res.ProofOps) require.NoError(chain.T, err) @@ -320,31 +322,13 @@ func (chain *TestChain) QueryConsensusStateProof(chainName string) ([]byte, clie // // CONTRACT: this function must only be called after app.Commit() occurs func (chain *TestChain) NextBlock() { - res := chain.App.EndBlock(abci.RequestEndBlock{Height: chain.CurrentHeader.Height}) - - chain.App.Commit() - - // set the last header to the current header - // use nil trusted fields - chain.LastHeader = chain.CurrentTMClientHeader() - - // val set changes returned from previous block get applied to the next validators - // of this block. See tendermint spec for details. - chain.Vals = chain.NextVals - chain.NextVals = ApplyValSetChanges(chain.T, chain.Vals, res.ValidatorUpdates) - - // increment the current header - chain.CurrentHeader = tmproto.Header{ - ChainID: chain.ChainID, - Height: chain.App.LastBlockHeight() + 1, - AppHash: chain.App.LastCommitID().Hash, - // NOTE: the time is increased by the coordinator to maintain time synchrony amongst - // chains. - Time: chain.CurrentHeader.Time, - ValidatorsHash: chain.Vals.Hash(), + res, err := chain.App.FinalizeBlock(&abci.RequestFinalizeBlock{ + Height: chain.ProposedHeader.Height, + Time: chain.ProposedHeader.GetTime(), NextValidatorsHash: chain.NextVals.Hash(), - } - chain.App.BeginBlock(abci.RequestBeginBlock{Header: chain.CurrentHeader}) + }) + require.NoError(chain.T, err) + chain.commitBlock(res) } // sendMsgs delivers a transaction through the application without returning the result. @@ -356,34 +340,47 @@ func (chain *TestChain) sendMsgs(msgs ...sdk.Msg) error { // SendMsgs delivers a transaction through the application. It updates the senders sequence // number and updates the TestChain's headers. It returns the result and error if one // occurred. -func (chain *TestChain) SendMsgs(msgs ...sdk.Msg) (*sdk.Result, error) { +func (chain *TestChain) SendMsgs(msgs ...sdk.Msg) (*abci.ExecTxResult, error) { // ensure the chain has the latest time chain.Coordinator.UpdateTimeForChain(chain) - _, r, err := simapp.SignAndDeliver( + // increment acc sequence regardless of success or failure tx execution + defer func() { + err := chain.SenderAccount.SetSequence(chain.SenderAccount.GetSequence() + 1) + if err != nil { + panic(err) + } + }() + + resp, err := simapp.SignAndDeliver( chain.T, chain.TxConfig, chain.App.BaseApp, - chain.GetContext().BlockHeader(), msgs, chain.ChainID, []uint64{chain.SenderAccount.GetAccountNumber()}, []uint64{chain.SenderAccount.GetSequence()}, - true, true, chain.SenderPrivKey, + true, + chain.ProposedHeader.GetTime(), + chain.NextVals.Hash(), + chain.SenderPrivKey, ) if err != nil { return nil, err } - // NextBlock calls app.Commit() - chain.NextBlock() + chain.commitBlock(resp) - // increment sequence for successful transaction execution - chain.SenderAccount.SetSequence(chain.SenderAccount.GetSequence() + 1) + require.Len(chain.T, resp.TxResults, 1) + txResult := resp.TxResults[0] + + if txResult.Code != 0 { + return txResult, fmt.Errorf("%s/%d: %q", txResult.Codespace, txResult.Code, txResult.Log) + } chain.Coordinator.IncrementTime() - return r, nil + return txResult, nil } // GetClientState retrieves the client state for the provided chainName. The client is @@ -413,19 +410,21 @@ func (chain *TestChain) GetConsensusState( // GetValsAtHeight will return the validator set of the chain at a given height. It will return // a success boolean depending on if the validator set exists or not at that height. -func (chain *TestChain) GetValsAtHeight(height int64) (*tmtypes.ValidatorSet, bool) { - histInfo, ok := chain.App.StakingKeeper.GetHistoricalInfo(chain.GetContext(), height) - if !ok { +func (chain *TestChain) GetValsAtHeight(height int64) (*cmttypes.ValidatorSet, bool) { + histInfo, err := chain.App.StakingKeeper.GetHistoricalInfo(chain.GetContext(), height) + if err != nil { return nil, false } - valSet := stakingtypes.Validators(histInfo.Valset) + valSet := stakingtypes.Validators{ + Validators: histInfo.Valset, + } - tmValidators, err := testutil.ToTmValidators(valSet, sdk.DefaultPowerReduction) + tmValidators, err := testutil.ToCmtValidators(valSet, sdk.DefaultPowerReduction) if err != nil { panic(err) } - return tmtypes.NewValidatorSet(tmValidators), true + return cmttypes.NewValidatorSet(tmValidators), true } // GetAcknowledgement retrieves an acknowledgement for the provided packet. If the @@ -462,7 +461,7 @@ func (chain *TestChain) ConstructMsgCreateClient( switch clientType { case exported.Tendermint: height := counterparty.LastHeader.GetHeight().(clienttypes.Height) - clientState = ibctmtypes.NewClientState( + clientState = ibccmttypes.NewClientState( counterparty.ChainID, DefaultTrustLevel, TrustingPeriod, UnbondingPeriod, MaxClockDrift, height, commitmenttypes.GetSDKSpecs(), Prefix, 0, @@ -510,7 +509,7 @@ func (chain *TestChain) UpdateTMClient(counterparty *TestChain, chainName string func (chain *TestChain) ConstructUpdateTMClientHeader( counterparty *TestChain, chainName string, -) (*ibctmtypes.Header, error) { +) (*ibccmttypes.Header, error) { return chain.ConstructUpdateTMClientHeaderWithTrustedHeight( counterparty, chainName, @@ -524,14 +523,14 @@ func (chain *TestChain) ConstructUpdateTMClientHeaderWithTrustedHeight( counterparty *TestChain, chainName string, trustedHeight clienttypes.Height, -) (*ibctmtypes.Header, error) { +) (*ibccmttypes.Header, error) { header := counterparty.LastHeader // Relayer must query for LatestHeight on client to get TrustedHeight if the trusted height is not set if trustedHeight.IsZero() { trustedHeight = chain.GetClientState(chainName).GetLatestHeight().(clienttypes.Height) } var ( - tmTrustedVals *tmtypes.ValidatorSet + tmTrustedVals *cmttypes.ValidatorSet ok bool ) // Once we get TrustedHeight from client, we must query the validators from the counterparty chain @@ -546,7 +545,7 @@ func (chain *TestChain) ConstructUpdateTMClientHeaderWithTrustedHeight( // NextValidatorsHash tmTrustedVals, ok = counterparty.GetValsAtHeight(int64(trustedHeight.RevisionHeight + 1)) if !ok { - return nil, sdkerrors.Wrapf(ibctmtypes.ErrInvalidHeaderHeight, "could not retrieve trusted validators at trustedHeight: %d", trustedHeight) + return nil, errorsmod.Wrapf(ibccmttypes.ErrInvalidHeaderHeight, "could not retrieve trusted validators at trustedHeight: %d", trustedHeight) } } // inject trusted fields into last header @@ -559,7 +558,6 @@ func (chain *TestChain) ConstructUpdateTMClientHeaderWithTrustedHeight( } header.TrustedValidators = trustedVals return header, nil - } // ExpireClient fast forwards the chain's block time by the provided amount of time which will @@ -570,12 +568,12 @@ func (chain *TestChain) ExpireClient(amount time.Duration) { // CurrentTMClientHeader creates a TM header using the current header parameters // on the chain. The trusted fields in the header are set to nil. -func (chain *TestChain) CurrentTMClientHeader() *ibctmtypes.Header { +func (chain *TestChain) CurrentTMClientHeader() *ibccmttypes.Header { return chain.CreateTMClientHeader( chain.ChainID, - chain.CurrentHeader.Height, + chain.ProposedHeader.Height, clienttypes.Height{}, - chain.CurrentHeader.Time, + chain.ProposedHeader.Time, chain.Vals, chain.NextVals, nil, @@ -592,20 +590,20 @@ func (chain *TestChain) CreateTMClientHeader( timestamp time.Time, tmValSet, nextVals, - tmTrustedVals *tmtypes.ValidatorSet, - signers map[string]tmtypes.PrivValidator, -) *ibctmtypes.Header { + tmTrustedVals *cmttypes.ValidatorSet, + signers map[string]cmttypes.PrivValidator, +) *ibccmttypes.Header { var ( - valSet *tmproto.ValidatorSet - trustedVals *tmproto.ValidatorSet + valSet *cmtproto.ValidatorSet + trustedVals *cmtproto.ValidatorSet ) require.NotNil(chain.T, tmValSet) vsetHash := tmValSet.Hash() nextValHash := nextVals.Hash() - tmHeader := tmtypes.Header{ - Version: tmprotoversion.Consensus{Block: tmversion.BlockProtocol, App: 2}, + tmHeader := cmttypes.Header{ + Version: cmtprotoversion.Consensus{Block: cmtversion.BlockProtocol, App: 2}, ChainID: chainID, Height: blockHeight, Time: timestamp, @@ -619,7 +617,7 @@ func (chain *TestChain) CreateTMClientHeader( ValidatorsHash: vsetHash, NextValidatorsHash: nextValHash, ConsensusHash: tmhash.Sum([]byte("consensus_hash")), - AppHash: chain.CurrentHeader.AppHash, + AppHash: chain.ProposedHeader.AppHash, LastResultsHash: tmhash.Sum([]byte("last_results_hash")), EvidenceHash: tmhash.Sum([]byte("evidence_hash")), ProposerAddress: tmValSet.Proposer.Address, //nolint:staticcheck @@ -627,30 +625,30 @@ func (chain *TestChain) CreateTMClientHeader( hhash := tmHeader.Hash() blockID := MakeBlockID(hhash, 3, tmhash.Sum([]byte("part_set"))) - voteSet := tmtypes.NewVoteSet(chainID, blockHeight, 1, tmproto.PrecommitType, tmValSet) + voteSet := cmttypes.NewVoteSet(chainID, blockHeight, 1, cmtproto.PrecommitType, tmValSet) // MakeCommit expects a signer array in the same order as the validator array. // Thus we iterate over the ordered validator set and construct a signer array // from the signer map in the same order. - var signerArr []tmtypes.PrivValidator + var signerArr []cmttypes.PrivValidator for _, v := range tmValSet.Validators { signerArr = append(signerArr, signers[v.Address.String()]) } - commit, err := MakeCommit( - context.Background(), + commit, err := cmttypes.MakeExtCommit( blockID, blockHeight, 1, voteSet, signerArr, timestamp, + false, ) require.NoError(chain.T, err) - signedHeader := &tmproto.SignedHeader{ + signedHeader := &cmtproto.SignedHeader{ Header: tmHeader.ToProto(), - Commit: commit.ToProto(), + Commit: commit.ToCommit().ToProto(), } if tmValSet != nil { @@ -665,7 +663,7 @@ func (chain *TestChain) CreateTMClientHeader( // The trusted fields may be nil. They may be filled before relaying messages to a client. // The relayer is responsible for querying client and injecting appropriate trusted fields. - return &ibctmtypes.Header{ + return &ibccmttypes.Header{ SignedHeader: signedHeader, ValidatorSet: valSet, TrustedHeight: trustedHeight, @@ -673,11 +671,38 @@ func (chain *TestChain) CreateTMClientHeader( } } -// MakeBlockID copied unimported test functions from tmtypes to use them here -func MakeBlockID(hash []byte, partSetSize uint32, partSetHash []byte) tmtypes.BlockID { - return tmtypes.BlockID{ +func (chain *TestChain) commitBlock(res *abci.ResponseFinalizeBlock) { + _, err := chain.App.Commit() + require.NoError(chain.T, err) + + // set the last header to the current header + // use nil trusted fields + chain.LastHeader = chain.CurrentTMClientHeader() + + // val set changes returned from previous block get applied to the next validators + // of this block. See tendermint spec for details. + chain.Vals = chain.NextVals + chain.NextVals = ApplyValSetChanges(chain.T, chain.Vals, res.ValidatorUpdates) + + // increment the current header + chain.ProposedHeader = cmtproto.Header{ + ChainID: chain.ChainID, + Height: chain.App.LastBlockHeight() + 1, + AppHash: chain.App.LastCommitID().Hash, + // NOTE: the time is increased by the coordinator to maintain time synchrony amongst + // chains. + Time: chain.ProposedHeader.Time, + ValidatorsHash: chain.Vals.Hash(), + NextValidatorsHash: chain.NextVals.Hash(), + ProposerAddress: chain.ProposedHeader.ProposerAddress, + } +} + +// MakeBlockID copied unimported test functions from cmttypes to use them here +func MakeBlockID(hash []byte, partSetSize uint32, partSetHash []byte) cmttypes.BlockID { + return cmttypes.BlockID{ Hash: hash, - PartSetHeader: tmtypes.PartSetHeader{ + PartSetHeader: cmttypes.PartSetHeader{ Total: partSetSize, Hash: partSetHash, }, @@ -689,17 +714,17 @@ func MakeBlockID(hash []byte, partSetSize uint32, partSetHash []byte) tmtypes.Bl // sorting of ValidatorSet. // The sorting is first by .VotingPower (descending), with secondary index of .Address (ascending). func CreateSortedSignerArray( - altPrivVal, suitePrivVal tmtypes.PrivValidator, altVal, suiteVal *tmtypes.Validator, -) []tmtypes.PrivValidator { + altPrivVal, suitePrivVal cmttypes.PrivValidator, altVal, suiteVal *cmttypes.Validator, +) []cmttypes.PrivValidator { switch { case altVal.VotingPower > suiteVal.VotingPower: - return []tmtypes.PrivValidator{altPrivVal, suitePrivVal} + return []cmttypes.PrivValidator{altPrivVal, suitePrivVal} case altVal.VotingPower < suiteVal.VotingPower: - return []tmtypes.PrivValidator{suitePrivVal, altPrivVal} + return []cmttypes.PrivValidator{suitePrivVal, altPrivVal} default: if bytes.Compare(altVal.Address, suiteVal.Address) == -1 { - return []tmtypes.PrivValidator{altPrivVal, suitePrivVal} + return []cmttypes.PrivValidator{altPrivVal, suitePrivVal} } - return []tmtypes.PrivValidator{suitePrivVal, altPrivVal} + return []cmttypes.PrivValidator{suitePrivVal, altPrivVal} } } diff --git a/modules/tibc/testing/coordinator.go b/modules/tibc/testing/coordinator.go index 7439b560..fac6d1c7 100644 --- a/modules/tibc/testing/coordinator.go +++ b/modules/tibc/testing/coordinator.go @@ -6,7 +6,6 @@ import ( "testing" "time" - abci "github.com/cometbft/cometbft/abci/types" "github.com/stretchr/testify/require" ) @@ -68,8 +67,7 @@ func (coord *Coordinator) UpdateTime() { // UpdateTimeForChain updates the clock for a specific chain. func (coord *Coordinator) UpdateTimeForChain(chain *TestChain) { - chain.CurrentHeader.Time = coord.CurrentTime.UTC() - chain.App.BeginBlock(abci.RequestBeginBlock{Header: chain.CurrentHeader}) + chain.ProposedHeader.Time = coord.CurrentTime.UTC() } // SetupClients is a helper function to create clients on both chains. It assumes the @@ -108,7 +106,6 @@ func (coord *Coordinator) CommitBlock(chains ...*TestChain) { // CommitNBlocks commits n blocks to state and updates the block height by 1 for each commit. func (coord *Coordinator) CommitNBlocks(chain *TestChain, n uint64) { for i := uint64(0); i < n; i++ { - chain.App.BeginBlock(abci.RequestBeginBlock{Header: chain.CurrentHeader}) chain.NextBlock() coord.IncrementTime() } diff --git a/modules/tibc/testing/endpoint.go b/modules/tibc/testing/endpoint.go index 8cd6c919..11a61210 100644 --- a/modules/tibc/testing/endpoint.go +++ b/modules/tibc/testing/endpoint.go @@ -5,8 +5,7 @@ import ( "github.com/stretchr/testify/require" - sdk "github.com/cosmos/cosmos-sdk/types" - + storetypes "cosmossdk.io/store/types" clienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" packettypes "github.com/bianjieai/tibc-go/modules/tibc/core/04-packet/types" commitmenttypes "github.com/bianjieai/tibc-go/modules/tibc/core/23-commitment/types" @@ -64,7 +63,7 @@ func (endpoint *Endpoint) QueryProofAtHeight(key []byte, height uint64) ([]byte, // NOTE: a solo machine client will be created with an empty diversifier. func (endpoint *Endpoint) CreateClient() error { // ensure counterparty has committed state - endpoint.Chain.Coordinator.CommitBlock(endpoint.Counterparty.Chain) + endpoint.Counterparty.Chain.NextBlock() // ensure the chain has the latest time endpoint.Chain.Coordinator.UpdateTimeForChain(endpoint.Chain) @@ -108,7 +107,6 @@ func (endpoint *Endpoint) CreateClient() error { endpoint.Chain.NextBlock() // increment sequence for successful transaction execution endpoint.Chain.Coordinator.IncrementTime() - return nil } @@ -216,7 +214,7 @@ func (endpoint *Endpoint) RecvCleanPacket(cleanPacket packettypes.CleanPacket) e return endpoint.Chain.sendMsgs(recvCleanMsg) } -func (endpoint *Endpoint) ClientStore() sdk.KVStore { +func (endpoint *Endpoint) ClientStore() storetypes.KVStore { return endpoint.Chain.App.TIBCKeeper.ClientKeeper.ClientStore(endpoint.Chain.GetContext(), endpoint.Counterparty.Chain.ChainName) } diff --git a/modules/tibc/testing/mock/mock.go b/modules/tibc/testing/mock/mock.go index 52d93d0a..d13466b3 100644 --- a/modules/tibc/testing/mock/mock.go +++ b/modules/tibc/testing/mock/mock.go @@ -99,15 +99,6 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw return nil } -// BeginBlock implements the AppModule interface -func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { -} - -// EndBlock implements the AppModule interface -func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { - return []abci.ValidatorUpdate{} -} - // ____________________________________________________________________________ // OnRecvPacket implements the TIBCModule interface. diff --git a/modules/tibc/testing/utils.go b/modules/tibc/testing/utils.go index 217f84a0..6976d4ed 100644 --- a/modules/tibc/testing/utils.go +++ b/modules/tibc/testing/utils.go @@ -1,13 +1,9 @@ package tibctesting import ( - "context" "testing" - "time" abci "github.com/cometbft/cometbft/abci/types" - tmprotostate "github.com/cometbft/cometbft/proto/tendermint/state" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" tmtypes "github.com/cometbft/cometbft/types" "github.com/stretchr/testify/require" ) @@ -29,50 +25,3 @@ func ApplyValSetChanges( return newVals } - -// ABCIResponsesResultsHash returns a merkle hash of ABCI results -func ABCIResponsesResultsHash(ar *tmprotostate.ABCIResponses) []byte { - return tmtypes.NewResults(ar.DeliverTxs).Hash() -} - -// MakeCommit iterates over the provided validator set, creating a Precommit vote for each -// participant at the provided height and round. Each vote is signed and added to the VoteSet. -// Finally, the VoteSet is committed finalizing the block. -func MakeCommit( - ctx context.Context, - blockID tmtypes.BlockID, - height int64, - round int32, - voteSet *tmtypes.VoteSet, - validators []tmtypes.PrivValidator, - now time.Time, -) (*tmtypes.Commit, error) { - // all sign - for i := 0; i < len(validators); i++ { - pubKey, err := validators[i].GetPubKey() - if err != nil { - return nil, err - } - vote := &tmtypes.Vote{ - ValidatorAddress: pubKey.Address(), - ValidatorIndex: int32(i), - Height: height, - Round: round, - Type: tmproto.PrecommitType, - BlockID: blockID, - Timestamp: now, - } - - v := vote.ToProto() - - if err := validators[i].SignVote(voteSet.ChainID(), v); err != nil { - return nil, err - } - vote.Signature = v.Signature - if _, err := voteSet.AddVote(vote); err != nil { - return nil, err - } - } - - return voteSet.MakeCommit(), nil -} diff --git a/proto/buf.lock b/proto/buf.lock index 37365697..81167615 100644 --- a/proto/buf.lock +++ b/proto/buf.lock @@ -16,7 +16,7 @@ deps: - remote: buf.build owner: cosmos repository: ics23 - commit: 55085f7c710a45f58fa09947208eb70b + commit: dc427cb4519143d8996361c045a29ad7 - remote: buf.build owner: googleapis repository: googleapis diff --git a/proto/buf.yaml b/proto/buf.yaml index c5b34113..f17c57c2 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -1,11 +1,11 @@ version: v1 name: buf.build/irisnet/tibc-go deps: - - buf.build/cosmos/cosmos-sdk:v0.47.0 + - buf.build/cosmos/cosmos-sdk:aa25660f4ff746388669ce36b3778442 - buf.build/cosmos/cosmos-proto:1935555c206d4afb9e94615dfd0fad31 - buf.build/cosmos/gogo-proto:a14993478f40695898ed8a86931094b6656e8a5d - buf.build/googleapis/googleapis:8d7204855ec14631a499bd7393ce1970 - - buf.build/cosmos/ics23:b1abd8678aab07165efd453c96796a179eb3131f + - buf.build/cosmos/ics23:dc427cb4519143d8996361c045a29ad7 breaking: use: - FILE diff --git a/proto/tibc/apps/mt_transfer/v1/tx.proto b/proto/tibc/apps/mt_transfer/v1/tx.proto index ea0c1154..aac44c5f 100644 --- a/proto/tibc/apps/mt_transfer/v1/tx.proto +++ b/proto/tibc/apps/mt_transfer/v1/tx.proto @@ -4,16 +4,21 @@ package tibc.apps.mt_transfer.v1; option go_package = "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer/types"; import "gogoproto/gogo.proto"; +import "cosmos/msg/v1/msg.proto"; // Msg defines the tibc/MtTransfer Msg service. service Msg { + option (cosmos.msg.v1.service) = true; + // MtTransfer defines a rpc handler method for MsgMtTransfer. rpc MtTransfer(MsgMtTransfer) returns (MsgMtTransferResponse); } +// MsgMtTransfer defines the Msg/MtTransfer request type. message MsgMtTransfer { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "sender"; // the class to which the mt to be transferred belongs string class = 1; diff --git a/proto/tibc/apps/nft_transfer/v1/tx.proto b/proto/tibc/apps/nft_transfer/v1/tx.proto index 04ed1425..13af4b27 100644 --- a/proto/tibc/apps/nft_transfer/v1/tx.proto +++ b/proto/tibc/apps/nft_transfer/v1/tx.proto @@ -4,16 +4,21 @@ package tibc.apps.nft_transfer.v1; option go_package = "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/types"; import "gogoproto/gogo.proto"; +import "cosmos/msg/v1/msg.proto"; // Msg defines the tibc/nftTransfer Msg service. service Msg { + option (cosmos.msg.v1.service) = true; + // NftTransfer defines a rpc handler method for MsgNftTransfer. rpc NftTransfer(MsgNftTransfer) returns (MsgNftTransferResponse); } +// MsgNftTransfer defines the Msg/NftTransfer request type. message MsgNftTransfer { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "sender"; // the class to which the NFT to be transferred belongs string class = 1; diff --git a/proto/tibc/core/client/v1/tx.proto b/proto/tibc/core/client/v1/tx.proto index 936c4802..a36e9aed 100644 --- a/proto/tibc/core/client/v1/tx.proto +++ b/proto/tibc/core/client/v1/tx.proto @@ -10,6 +10,8 @@ import "cosmos_proto/cosmos.proto"; // Msg defines the tibc/client Msg service. service Msg { + option (cosmos.msg.v1.service) = true; + // CreateClient defines a rpc handler method for MsgCreateClient. rpc CreateClient(MsgCreateClient) returns (MsgCreateClientResponse); diff --git a/proto/tibc/core/commitment/v1/commitment.proto b/proto/tibc/core/commitment/v1/commitment.proto index ffb3a32e..d59712ca 100644 --- a/proto/tibc/core/commitment/v1/commitment.proto +++ b/proto/tibc/core/commitment/v1/commitment.proto @@ -18,7 +18,7 @@ message MerkleRoot { // The constructed key from the Path and the key will be append(Path.KeyPath, // append(Path.KeyPrefix, key...)) message MerklePrefix { - bytes key_prefix = 1 [ (gogoproto.moretags) = "yaml:\"key_prefix\"" ]; + bytes key_prefix = 1; } // MerklePath is the path used to verify commitment proofs, which can be an @@ -27,7 +27,7 @@ message MerklePrefix { message MerklePath { option (gogoproto.goproto_stringer) = false; - repeated string key_path = 1 [ (gogoproto.moretags) = "yaml:\"key_path\"" ]; + repeated string key_path = 1; } // MerkleProof is a wrapper type over a chain of CommitmentProofs. diff --git a/proto/tibc/core/packet/v1/tx.proto b/proto/tibc/core/packet/v1/tx.proto index 772bfa47..47206c9d 100644 --- a/proto/tibc/core/packet/v1/tx.proto +++ b/proto/tibc/core/packet/v1/tx.proto @@ -4,11 +4,14 @@ package tibc.core.packet.v1; option go_package = "github.com/bianjieai/tibc-go/modules/tibc/core/04-packet/types"; import "gogoproto/gogo.proto"; +import "cosmos/msg/v1/msg.proto"; import "tibc/core/client/v1/client.proto"; import "tibc/core/packet/v1/packet.proto"; // Msg defines the tibc/packet Msg service. service Msg { + option (cosmos.msg.v1.service) = true; + // RecvPacket defines a rpc handler method for MsgRecvPacket. rpc RecvPacket(MsgRecvPacket) returns (MsgRecvPacketResponse); @@ -26,6 +29,7 @@ service Msg { message MsgRecvPacket { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "signer"; Packet packet = 1 [ (gogoproto.nullable) = false ]; bytes proof_commitment = 2 @@ -44,6 +48,7 @@ message MsgRecvPacketResponse {} message MsgAcknowledgement { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "signer"; Packet packet = 1 [ (gogoproto.nullable) = false ]; bytes acknowledgement = 2; @@ -62,6 +67,7 @@ message MsgAcknowledgementResponse {} message MsgCleanPacket { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "signer"; CleanPacket clean_packet = 1 [ (gogoproto.nullable) = false ]; string signer = 2; @@ -74,6 +80,7 @@ message MsgCleanPacketResponse {} message MsgRecvCleanPacket { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "signer"; CleanPacket clean_packet = 1 [ (gogoproto.nullable) = false ]; bytes proof_commitment = 2 diff --git a/proto/tibc/core/routing/v1/tx.proto b/proto/tibc/core/routing/v1/tx.proto index 024e2cba..4324f522 100644 --- a/proto/tibc/core/routing/v1/tx.proto +++ b/proto/tibc/core/routing/v1/tx.proto @@ -4,12 +4,13 @@ package tibc.core.routing.v1; option go_package = "github.com/bianjieai/tibc-go/modules/tibc/core/26-routing/types"; import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; // Msg defines the tibc/routing Msg service. service Msg { + option (cosmos.msg.v1.service) = true; + // SetRoutingRules defines a rpc handler method for MsgSetRoutingRules. rpc SetRoutingRules(MsgSetRoutingRules) returns (MsgSetRoutingRulesResponse); @@ -18,7 +19,7 @@ service Msg { // MsgSetRoutingRules defines a proposal to set routing rules message MsgSetRoutingRules { option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "signer"; + option (cosmos.msg.v1.signer) = "authority"; // the title of the update proposal string title = 1; // the description of the proposal diff --git a/scripts/protocgen-pulsar.sh b/scripts/protocgen-pulsar.sh index 69de3048..d051ff9d 100755 --- a/scripts/protocgen-pulsar.sh +++ b/scripts/protocgen-pulsar.sh @@ -1,6 +1,6 @@ -# this script is for generating protobuf files for the new google.golang.org/protobuf API +#!/usr/bin/env bash -set -eo pipefail +set -e protoc_install_gopulsar() { go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index a5ee2f6b..868ce7e1 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -1,10 +1,9 @@ #!/usr/bin/env bash -set -eo pipefail +set -e echo "Generating gogo proto code" cd proto - proto_dirs=$(find ./tibc -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) for dir in $proto_dirs; do for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do @@ -20,7 +19,7 @@ done cd .. # move proto files to the right places -# cp -r github.com/bianjieai/tibc-go/* ./ +cp -r github.com/bianjieai/tibc-go/* ./ rm -rf github.com ./scripts/protocgen-pulsar.sh \ No newline at end of file diff --git a/simapp/app.go b/simapp/app.go index b8721be9..67cb7489 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -2,49 +2,58 @@ package simapp import ( "encoding/json" + "fmt" "io" - "net/http" "os" "path/filepath" - "github.com/gorilla/mux" - "github.com/rakyll/statik/fs" - "github.com/spf13/cast" - - dbm "github.com/cometbft/cometbft-db" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" + "cosmossdk.io/x/evidence" + evidencekeeper "cosmossdk.io/x/evidence/keeper" + evidencetypes "cosmossdk.io/x/evidence/types" + "cosmossdk.io/x/feegrant" + feegrantmodule "cosmossdk.io/x/feegrant/module" + "cosmossdk.io/x/tx/signing" + "cosmossdk.io/x/upgrade" + upgradekeeper "cosmossdk.io/x/upgrade/keeper" + upgradetypes "cosmossdk.io/x/upgrade/types" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" - tmos "github.com/cometbft/cometbft/libs/os" - + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" - _ "github.com/cosmos/cosmos-sdk/client/docs/statik" // unnamed import of statik for swagger UI support + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" - "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/codec/types" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - "github.com/cosmos/cosmos-sdk/testutil/testdata" + "github.com/cosmos/cosmos-sdk/std" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/types/msgservice" + sigtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/ante" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + "github.com/cosmos/cosmos-sdk/x/auth/posthandler" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" + "github.com/cosmos/cosmos-sdk/x/auth/tx" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" + txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/auth/vesting" - vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" "github.com/cosmos/cosmos-sdk/x/bank" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/cosmos-sdk/x/capability" - capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" "github.com/cosmos/cosmos-sdk/x/crisis" crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" @@ -52,12 +61,6 @@ import ( distr "github.com/cosmos/cosmos-sdk/x/distribution" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/cosmos-sdk/x/evidence" - evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" - feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" - feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/cosmos/cosmos-sdk/x/gov" @@ -80,14 +83,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/cosmos-sdk/x/upgrade" - upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" - upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - - tibcnfttransfer "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer" - tibcnfttransferkeeper "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/keeper" - tibcnfttypes "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/types" + "github.com/cosmos/gogoproto/proto" + "github.com/spf13/cast" "mods.irisnet.org/modules/mt" mtkeeper "mods.irisnet.org/modules/mt/keeper" @@ -99,14 +96,15 @@ import ( tibcmttransfer "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer" tibcmttransferkeeper "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer/keeper" tibcmttypes "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer/types" - + tibcnfttransfer "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer" + tibcnfttransferkeeper "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/keeper" + tibcnfttypes "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/types" tibc "github.com/bianjieai/tibc-go/modules/tibc/core" tibchost "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" tibcroutingtypes "github.com/bianjieai/tibc-go/modules/tibc/core/26-routing/types" corecli "github.com/bianjieai/tibc-go/modules/tibc/core/client/cli" tibckeeper "github.com/bianjieai/tibc-go/modules/tibc/core/keeper" tibcmock "github.com/bianjieai/tibc-go/modules/tibc/testing/mock" - simappparams "github.com/bianjieai/tibc-go/simapp/params" ) const appName = "SimApp" @@ -122,16 +120,12 @@ var ( auth.AppModuleBasic{}, genutil.AppModuleBasic{}, bank.AppModuleBasic{}, - capability.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( []govclient.ProposalHandler{ paramsclient.ProposalHandler, - // distrclient.ProposalHandler, TODO - upgradeclient.LegacyProposalHandler, - upgradeclient.LegacyCancelProposalHandler, }, ), params.AppModuleBasic{}, @@ -162,10 +156,7 @@ var ( } ) -var ( - _ App = (*SimApp)(nil) - _ servertypes.Application = (*SimApp)(nil) -) +var _ servertypes.Application = (*SimApp)(nil) // SimApp extends an ABCI application, but with most of its parameters exported. // They are exported for convenience in creating helper functions, as object @@ -174,9 +165,8 @@ type SimApp struct { *baseapp.BaseApp legacyAmino *codec.LegacyAmino appCodec codec.Codec - interfaceRegistry types.InterfaceRegistry - - invCheckPeriod uint + txConfig client.TxConfig + interfaceRegistry codectypes.InterfaceRegistry // keys to access the substores keys map[string]*storetypes.KVStoreKey @@ -186,7 +176,6 @@ type SimApp struct { // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper - CapabilityKeeper *capabilitykeeper.Keeper NftKeeper nftkeeper.Keeper MtKeeper mtkeeper.Keeper StakingKeeper *stakingkeeper.Keeper @@ -201,15 +190,11 @@ type SimApp struct { NftTransferKeeper tibcnfttransferkeeper.Keeper MtTransferKeeper tibcmttransferkeeper.Keeper EvidenceKeeper evidencekeeper.Keeper - FeeGrantKeeper feegrantkeeper.Keeper ConsensusParamsKeeper consensusparamkeeper.Keeper - // make scoped keepers public for test purposes - ScopedTIBCKeeper capabilitykeeper.ScopedKeeper - ScopedTIBCMockKeeper capabilitykeeper.ScopedKeeper - // the module manager - mm *module.Manager + ModuleManager *module.Manager + BasicModuleManager module.BasicManager // simulation manager sm *module.SimulationManager @@ -219,7 +204,7 @@ type SimApp struct { } func init() { - ConfigureBech32Prefix() + // ConfigureBech32Prefix() userHomeDir, err := os.UserHomeDir() if err != nil { @@ -229,39 +214,54 @@ func init() { DefaultNodeHome = filepath.Join(userHomeDir, ".simapp") } +// NewSimApp returns a reference to an initialized SimApp. // NewSimApp returns a reference to an initialized SimApp. func NewSimApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, - skipUpgradeHeights map[int64]bool, - homePath string, - invCheckPeriod uint, - encodingConfig simappparams.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *SimApp { - // TODO: Remove cdc in favor of appCodec once all modules are migrated. - appCodec := encodingConfig.Codec - legacyAmino := encodingConfig.Amino - interfaceRegistry := encodingConfig.InterfaceRegistry + interfaceRegistry, _ := types.NewInterfaceRegistryWithOptions(types.InterfaceRegistryOptions{ + ProtoFiles: proto.HybridResolver, + SigningOptions: signing.Options{ + AddressCodec: address.Bech32Codec{ + Bech32Prefix: sdk.GetConfig().GetBech32AccountAddrPrefix(), + }, + ValidatorAddressCodec: address.Bech32Codec{ + Bech32Prefix: sdk.GetConfig().GetBech32ValidatorAddrPrefix(), + }, + }, + }) + appCodec := codec.NewProtoCodec(interfaceRegistry) + legacyAmino := codec.NewLegacyAmino() + txConfig := tx.NewTxConfig(appCodec, tx.DefaultSignModes) + + if err := txConfig.SigningContext().Validate(); err != nil { + panic(err) + } + + std.RegisterLegacyAminoCodec(legacyAmino) + std.RegisterInterfaces(interfaceRegistry) bApp := baseapp.NewBaseApp( appName, logger, db, - encodingConfig.TxConfig.TxDecoder(), + txConfig.TxDecoder(), baseAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetVersion(version.Version) bApp.SetInterfaceRegistry(interfaceRegistry) + bApp.SetTxEncoder(txConfig.TxEncoder()) - keys := sdk.NewKVStoreKeys( - crisistypes.StoreKey, + keys := storetypes.NewKVStoreKeys( authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, + crisistypes.StoreKey, minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, @@ -270,25 +270,20 @@ func NewSimApp( tibchost.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey, - evidencetypes.StoreKey, - capabilitytypes.StoreKey, nfttypes.StoreKey, mttypes.StoreKey, tibcnfttypes.StoreKey, tibcmttypes.StoreKey, ) - tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) - memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) + tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey) app := &SimApp{ BaseApp: bApp, legacyAmino: legacyAmino, appCodec: appCodec, interfaceRegistry: interfaceRegistry, - invCheckPeriod: invCheckPeriod, keys: keys, tkeys: tkeys, - memKeys: memKeys, } app.ParamsKeeper = initParamsKeeper( @@ -301,55 +296,62 @@ func NewSimApp( // set the BaseApp's parameter store app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper( appCodec, - keys[upgradetypes.StoreKey], + runtime.NewKVStoreService(keys[upgradetypes.StoreKey]), authtypes.NewModuleAddress(govtypes.ModuleName).String(), + runtime.EventService{}, ) // set the BaseApp's parameter store - bApp.SetParamStore(&app.ConsensusParamsKeeper) - - // add capability keeper and ScopeToModule for tibc module - app.CapabilityKeeper = capabilitykeeper.NewKeeper( - appCodec, - keys[capabilitytypes.StoreKey], - memKeys[capabilitytypes.MemStoreKey], - ) - - scopedTIBCKeeper := app.CapabilityKeeper.ScopeToModule(tibchost.ModuleName) - // NOTE: the TIBC mock keeper and application module is used only for testing core TIBC. Do - // note replicate if you do not need to test core TIBC or light clients. - scopedIBCMockKeeper := app.CapabilityKeeper.ScopeToModule(tibcmock.ModuleName) + bApp.SetParamStore(&app.ConsensusParamsKeeper.ParamsStore) // add keepers - app.AccountKeeper = authkeeper.NewAccountKeeper( appCodec, - keys[authtypes.StoreKey], + runtime.NewKVStoreService(keys[authtypes.StoreKey]), authtypes.ProtoBaseAccount, maccPerms, + authcodec.NewBech32Codec(sdk.Bech32MainPrefix), sdk.Bech32MainPrefix, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.BankKeeper = bankkeeper.NewBaseKeeper( appCodec, - keys[banktypes.StoreKey], + runtime.NewKVStoreService(keys[banktypes.StoreKey]), app.AccountKeeper, BlockedAddresses(), authtypes.NewModuleAddress(govtypes.ModuleName).String(), + logger, ) + // optional: enable sign mode textual by overwriting the default tx config (after setting the bank keeper) + enabledSignModes := append(tx.DefaultSignModes, sigtypes.SignMode_SIGN_MODE_TEXTUAL) + txConfigOpts := tx.ConfigOptions{ + EnabledSignModes: enabledSignModes, + TextualCoinMetadataQueryFn: txmodule.NewBankKeeperCoinMetadataQueryFn(app.BankKeeper), + } + txConfig, err := tx.NewTxConfigWithOptions( + appCodec, + txConfigOpts, + ) + if err != nil { + panic(err) + } + app.txConfig = txConfig + app.StakingKeeper = stakingkeeper.NewKeeper( appCodec, - keys[stakingtypes.StoreKey], + runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), + authcodec.NewBech32Codec(sdk.Bech32PrefixValAddr), + authcodec.NewBech32Codec(sdk.Bech32PrefixConsAddr), ) app.MintKeeper = mintkeeper.NewKeeper( appCodec, - keys[minttypes.StoreKey], + runtime.NewKVStoreService(keys[minttypes.StoreKey]), app.StakingKeeper, app.AccountKeeper, app.BankKeeper, @@ -359,7 +361,7 @@ func NewSimApp( app.DistrKeeper = distrkeeper.NewKeeper( appCodec, - keys[distrtypes.StoreKey], + runtime.NewKVStoreService(keys[distrtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, app.StakingKeeper, @@ -370,29 +372,32 @@ func NewSimApp( app.SlashingKeeper = slashingkeeper.NewKeeper( appCodec, legacyAmino, - keys[slashingtypes.StoreKey], + runtime.NewKVStoreService(keys[slashingtypes.StoreKey]), app.StakingKeeper, authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) + invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)) app.CrisisKeeper = crisiskeeper.NewKeeper( - appCodec, - keys[crisistypes.StoreKey], + appCodec, + runtime.NewKVStoreService(keys[crisistypes.StoreKey]), invCheckPeriod, - app.BankKeeper, - authtypes.FeeCollectorName, - authtypes.NewModuleAddress(govtypes.ModuleName).String(), + app.BankKeeper, + authtypes.FeeCollectorName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + app.AccountKeeper.AddressCodec(), ) - app.FeeGrantKeeper = feegrantkeeper.NewKeeper( - appCodec, - keys[feegrant.StoreKey], - app.AccountKeeper, - ) + // get skipUpgradeHeights from the app options + skipUpgradeHeights := map[int64]bool{} + for _, h := range cast.ToIntSlice(appOpts.Get(server.FlagUnsafeSkipUpgrades)) { + skipUpgradeHeights[int64(h)] = true + } + homePath := cast.ToString(appOpts.Get(flags.FlagHome)) app.UpgradeKeeper = upgradekeeper.NewKeeper( skipUpgradeHeights, - keys[upgradetypes.StoreKey], + runtime.NewKVStoreService(keys[upgradetypes.StoreKey]), appCodec, homePath, app.BaseApp, @@ -415,7 +420,7 @@ func NewSimApp( app.NftKeeper = nftkeeper.NewKeeper( appCodec, - keys[nfttypes.StoreKey], + runtime.NewKVStoreService(keys[nfttypes.StoreKey]), app.AccountKeeper, app.BankKeeper, ) @@ -425,15 +430,16 @@ func NewSimApp( govRouter := govv1beta1.NewRouter() govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). - AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). AddRoute(tibchost.RouterKey, corecli.NewProposalHandler(app.TIBCKeeper)) + govConfig := govtypes.DefaultConfig() app.GovKeeper = govkeeper.NewKeeper( appCodec, - keys[govtypes.StoreKey], + runtime.NewKVStoreService(keys[govtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, app.StakingKeeper, + app.DistrKeeper, app.MsgServiceRouter(), govConfig, authtypes.NewModuleAddress(govtypes.ModuleName).String(), @@ -468,7 +474,12 @@ func NewSimApp( // create evidence keeper with router evidenceKeeper := evidencekeeper.NewKeeper( - appCodec, keys[evidencetypes.StoreKey], app.StakingKeeper, app.SlashingKeeper, + appCodec, + runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), + app.StakingKeeper, + app.SlashingKeeper, + app.AccountKeeper.AddressCodec(), + runtime.ProvideCometInfoService(), ) // If evidence needs to be handled for the app, set routes in router here and seal app.EvidenceKeeper = *evidenceKeeper @@ -481,12 +492,12 @@ func NewSimApp( // NOTE: Any module instantiated in the module manager that is later modified // must be passed by reference here. - app.mm = module.NewManager( + app.ModuleManager = module.NewManager( genutil.NewAppModule( app.AccountKeeper, app.StakingKeeper, - app.BaseApp.DeliverTx, - encodingConfig.TxConfig, + app, + txConfig, ), auth.NewAppModule( appCodec, @@ -494,26 +505,17 @@ func NewSimApp( authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName), ), - vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), bank.NewAppModule( appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName), ), - capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), crisis.NewAppModule( app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName), ), - feegrantmodule.NewAppModule( - appCodec, - app.AccountKeeper, - app.BankKeeper, - app.FeeGrantKeeper, - app.interfaceRegistry, - ), gov.NewAppModule( appCodec, app.GovKeeper, @@ -535,6 +537,7 @@ func NewSimApp( app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName), + app.interfaceRegistry, ), distr.NewAppModule( appCodec, @@ -551,7 +554,7 @@ func NewSimApp( app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName), ), - upgrade.NewAppModule(app.UpgradeKeeper), + upgrade.NewAppModule(app.UpgradeKeeper, app.AccountKeeper.AddressCodec()), evidence.NewAppModule(app.EvidenceKeeper), tibc.NewAppModule(app.TIBCKeeper), params.NewAppModule(app.ParamsKeeper), @@ -561,54 +564,74 @@ func NewSimApp( mt.NewAppModule(appCodec, app.MtKeeper, app.AccountKeeper, app.BankKeeper), ) + // BasicModuleManager defines the module BasicManager is in charge of setting up basic, + // non-dependant module elements, such as codec registration and genesis verification. + // By default it is composed of all the module from the module manager. + // Additionally, app module basics can be overwritten by passing them as argument. + app.BasicModuleManager = module.NewBasicManagerFromManager( + app.ModuleManager, + map[string]module.AppModuleBasic{ + genutiltypes.ModuleName: genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), + govtypes.ModuleName: gov.NewAppModuleBasic( + []govclient.ProposalHandler{ + paramsclient.ProposalHandler, + }, + ), + }) + app.BasicModuleManager.RegisterLegacyAminoCodec(legacyAmino) + app.BasicModuleManager.RegisterInterfaces(interfaceRegistry) + // NOTE: upgrade module is required to be prioritized + app.ModuleManager.SetOrderPreBlockers( + upgradetypes.ModuleName, + ) + // During begin block slashing happens after distr.BeginBlocker so that // there is nothing left over in the validator fee pool, so as to keep the // CanWithdrawInvariant invariant. // NOTE: staking module is required if HistoricalEntries param > 0 - app.mm.SetOrderBeginBlockers( - upgradetypes.ModuleName, capabilitytypes.ModuleName, minttypes.ModuleName, + app.ModuleManager.SetOrderBeginBlockers( + minttypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName, evidencetypes.ModuleName, stakingtypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, govtypes.ModuleName, crisistypes.ModuleName, genutiltypes.ModuleName, - feegrant.ModuleName, paramstypes.ModuleName, vestingtypes.ModuleName, + feegrant.ModuleName, paramstypes.ModuleName, tibchost.ModuleName, nfttypes.ModuleName, tibcnfttypes.ModuleName, tibcmttypes.ModuleName, mttypes.ModuleName, ) - app.mm.SetOrderEndBlockers( + app.ModuleManager.SetOrderEndBlockers( crisistypes.ModuleName, govtypes.ModuleName, stakingtypes.ModuleName, - capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, + authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName, minttypes.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, feegrant.ModuleName, - paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, + paramstypes.ModuleName, upgradetypes.ModuleName, tibchost.ModuleName, nfttypes.ModuleName, tibcnfttypes.ModuleName, tibcmttypes.ModuleName, mttypes.ModuleName, ) // NOTE: The genutils module must occur after staking so that pools are // properly initialized with tokens from genesis accounts. - // NOTE: Capability module must occur first so that it can initialize any capabilities - // so that other modules that want to create or claim capabilities afterwards in InitChain - // can do so safely. - app.mm.SetOrderInitGenesis( - capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, - distrtypes.ModuleName, stakingtypes.ModuleName, slashingtypes.ModuleName, - govtypes.ModuleName, minttypes.ModuleName, crisistypes.ModuleName, - genutiltypes.ModuleName, evidencetypes.ModuleName, feegrant.ModuleName, - paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, + // NOTE: The genutils module must also occur after auth so that it can access the params from auth. + genesisModuleOrder := []string{ + authtypes.ModuleName, banktypes.ModuleName, + distrtypes.ModuleName, stakingtypes.ModuleName, slashingtypes.ModuleName, govtypes.ModuleName, + minttypes.ModuleName, crisistypes.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, + feegrant.ModuleName, paramstypes.ModuleName, upgradetypes.ModuleName, tibchost.ModuleName, nfttypes.ModuleName, tibcnfttypes.ModuleName, tibcmttypes.ModuleName, mttypes.ModuleName, - ) + } + app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...) + app.ModuleManager.SetOrderExportGenesis(genesisModuleOrder...) - app.mm.RegisterInvariants(app.CrisisKeeper) + app.ModuleManager.RegisterInvariants(app.CrisisKeeper) app.configurator = module.NewConfigurator( app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter(), ) - app.mm.RegisterServices(app.configurator) - // add test gRPC service for testing gRPC queries in isolation - testdata.RegisterQueryServer(app.GRPCQueryRouter(), testdata.QueryImpl{}) + if err := app.ModuleManager.RegisterServices(app.configurator); err != nil { + panic(err) + } // add test gRPC service for testing gRPC queries in isolation // testdata_pulsar.RegisterQueryServer(app.GRPCQueryRouter(), testdata_pulsar.QueryImpl{}) @@ -625,49 +648,40 @@ func NewSimApp( app.GetSubspace(authtypes.ModuleName), ), } - app.sm = module.NewSimulationManagerFromAppModules(app.mm.Modules, overrideModules) + app.sm = module.NewSimulationManagerFromAppModules(app.ModuleManager.Modules, overrideModules) app.sm.RegisterStoreDecoders() // initialize stores app.MountKVStores(keys) app.MountTransientStores(tkeys) - app.MountMemoryStores(memKeys) // initialize BaseApp app.SetInitChainer(app.InitChainer) + app.SetPreBlocker(app.PreBlocker) app.SetBeginBlocker(app.BeginBlocker) - anteHandler, err := ante.NewAnteHandler( - ante.HandlerOptions{ - AccountKeeper: app.AccountKeeper, - BankKeeper: app.BankKeeper, - SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), - FeegrantKeeper: app.FeeGrantKeeper, - SigGasConsumer: ante.DefaultSigVerificationGasConsumer, - }, - ) + app.SetEndBlocker(app.EndBlocker) + app.setAnteHandler(txConfig) + app.setPostHandler() + + // At startup, after all modules have been registered, check that all prot + // annotations are correct. + protoFiles, err := proto.MergedRegistry() if err != nil { panic(err) } - app.SetAnteHandler(anteHandler) - app.SetEndBlocker(app.EndBlocker) + err = msgservice.ValidateProtoAnnotations(protoFiles) + if err != nil { + // Once we switch to using protoreflect-based antehandlers, we might + // want to panic here instead of logging a warning. + fmt.Fprintln(os.Stderr, err.Error()) + } if loadLatest { if err := app.LoadLatestVersion(); err != nil { - tmos.Exit(err.Error()) + panic(fmt.Errorf("error loading last version: %w", err)) } - - // Initialize and seal the capability keeper so all persistent capabilities - // are loaded in-memory and prevent any further modules from creating scoped - // sub-keepers. - // This must be done during creation of baseapp rather than in InitChain so - // that in-memory capabilities get regenerated on app restart. - // Note that since this reads from the store, we can only perform it when - // `loadLatest` is set to true. - app.CapabilityKeeper.Seal() } - app.ScopedTIBCKeeper = scopedTIBCKeeper - app.ScopedTIBCMockKeeper = scopedIBCMockKeeper return app } @@ -679,48 +693,35 @@ func MakeCodecs() (codec.Codec, *codec.LegacyAmino) { return config.Codec, config.Amino } -// BlockedAddresses returns all the app's blocked account addresses. -func BlockedAddresses() map[string]bool { - modAccAddrs := make(map[string]bool) - for acc := range GetMaccPerms() { - modAccAddrs[authtypes.NewModuleAddress(acc).String()] = true - } - - // allow the following addresses to receive funds - delete(modAccAddrs, authtypes.NewModuleAddress(govtypes.ModuleName).String()) - - return modAccAddrs -} - // Name returns the name of the App func (app *SimApp) Name() string { return app.BaseApp.Name() } -// BeginBlocker application updates every begin block -func (app *SimApp) BeginBlocker( - ctx sdk.Context, - req abci.RequestBeginBlock, -) abci.ResponseBeginBlock { - return app.mm.BeginBlock(ctx, req) -} +func (app *SimApp) setAnteHandler(txConfig client.TxConfig) { + anteHandler, err := ante.NewAnteHandler( + ante.HandlerOptions{ + AccountKeeper: app.AccountKeeper, + BankKeeper: app.BankKeeper, + SignModeHandler: txConfig.SignModeHandler(), + SigGasConsumer: ante.DefaultSigVerificationGasConsumer, + }, + ) + if err != nil { + panic(err) + } -// EndBlocker application updates every end block -func (app *SimApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { - return app.mm.EndBlock(ctx, req) + // Set the AnteHandler for the app + app.SetAnteHandler(anteHandler) } -// InitChainer application update at chain initialization -func (app *SimApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { - var genesisState GenesisState - if err := json.Unmarshal(req.AppStateBytes, &genesisState); err != nil { +func (app *SimApp) setPostHandler() { + postHandler, err := posthandler.NewPostHandler( + posthandler.HandlerOptions{}, + ) + if err != nil { panic(err) } - app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap()) - return app.mm.InitGenesis(ctx, app.appCodec, genesisState) -} -// LoadHeight loads a particular height -func (app *SimApp) LoadHeight(height int64) error { - return app.LoadVersion(height) + app.SetPostHandler(postHandler) } // ModuleAccountAddrs returns all the app's module account addresses. @@ -754,6 +755,11 @@ func (app *SimApp) InterfaceRegistry() types.InterfaceRegistry { return app.interfaceRegistry } +// GetTxConfig returns the app's TxConfig + func (app *SimApp) GetTxConfig() client.TxConfig { + return app.txConfig + } + // GetKey returns the KVStoreKey for the provided store key. // // NOTE: This is solely to be used for testing purposes. @@ -795,61 +801,89 @@ func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICon // Register new tx routes from grpc-gateway. authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register new tendermint queries routes from grpc-gateway. - tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) + cmtservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) + // Register node gRPC service for grpc-gateway. + nodeservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register grpc-gateway routes for all modules. - ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) - - // register swagger API from root so that other applications can override easily - if apiConfig.Swagger { - RegisterSwaggerAPI(clientCtx, apiSvr.Router) - } + app.BasicModuleManager.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) } // RegisterTxService implements the Application.RegisterTxService method. func (app *SimApp) RegisterTxService(clientCtx client.Context) { - authtx.RegisterTxService( - app.BaseApp.GRPCQueryRouter(), - clientCtx, - app.BaseApp.Simulate, - app.interfaceRegistry, - ) -} - -func (app *SimApp) RegisterNodeService(clientCtx client.Context) { - nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter()) + authtx.RegisterTxService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.BaseApp.Simulate, app.interfaceRegistry) } // RegisterTendermintService implements the Application.RegisterTendermintService method. func (app *SimApp) RegisterTendermintService(clientCtx client.Context) { - tmservice.RegisterTendermintService( + cmtApp := server.NewCometABCIWrapper(app) + cmtservice.RegisterTendermintService( clientCtx, app.BaseApp.GRPCQueryRouter(), app.interfaceRegistry, - app.Query, + cmtApp.Query, ) } -// RegisterSwaggerAPI registers swagger route with API Server -func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router) { - statikFS, err := fs.New() - if err != nil { +// RegisterNodeService implements the Application.RegisterNodeService method. +func (app *SimApp) RegisterNodeService(clientCtx client.Context, cfg config.Config) { + nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter(), cfg) +} + +// PreBlocker application updates every pre block +func (app *SimApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { + return app.ModuleManager.PreBlock(ctx) +} + +// BeginBlocker application updates every begin block +func (app *SimApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) { + return app.ModuleManager.BeginBlock(ctx) +} + +// EndBlocker application updates every end block +func (app *SimApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) { + return app.ModuleManager.EndBlock(ctx) +} + +// InitChainer application update at chain initialization +func (app *SimApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) { + var genesisState GenesisState + if err := json.Unmarshal(req.AppStateBytes, &genesisState); err != nil { panic(err) } - - staticServer := http.FileServer(statikFS) - rtr.PathPrefix("/swagger/").Handler(http.StripPrefix("/swagger/", staticServer)) + app.UpgradeKeeper.SetModuleVersionMap(ctx, app.ModuleManager.GetVersionMap()) + return app.ModuleManager.InitGenesis(ctx, app.appCodec, genesisState) } // GetMaccPerms returns a copy of the module account permissions +// +// NOTE: This is solely to be used for testing purposes. func GetMaccPerms() map[string][]string { dupMaccPerms := make(map[string][]string) for k, v := range maccPerms { dupMaccPerms[k] = v } + return dupMaccPerms } +// BlockedAddresses returns a map of all the blocked module account addresses. +// +// The blocked addresses are either set by the blockAccAddrs variable or if it is empty, +// it is inferred from the module account permissions set in the ModuleAccountAddrs method. +// BlockedAddresses returns all the app's blocked account addresses. +func BlockedAddresses() map[string]bool { + modAccAddrs := make(map[string]bool) + for acc := range GetMaccPerms() { + modAccAddrs[authtypes.NewModuleAddress(acc).String()] = true + } + + // allow the following addresses to receive funds + delete(modAccAddrs, authtypes.NewModuleAddress(govtypes.ModuleName).String()) + + return modAccAddrs +} + // initParamsKeeper init params keeper and its subspaces func initParamsKeeper( appCodec codec.BinaryCodec, @@ -865,7 +899,6 @@ func initParamsKeeper( paramsKeeper.Subspace(distrtypes.ModuleName) paramsKeeper.Subspace(slashingtypes.ModuleName) paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) - paramsKeeper.Subspace(crisistypes.ModuleName) paramsKeeper.Subspace(tibchost.ModuleName) return paramsKeeper diff --git a/simapp/export.go b/simapp/export.go index 27041e21..964f6278 100644 --- a/simapp/export.go +++ b/simapp/export.go @@ -2,10 +2,12 @@ package simapp import ( "encoding/json" + "fmt" "log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + storetypes "cosmossdk.io/store/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" @@ -16,10 +18,10 @@ import ( // ExportAppStateAndValidators exports the state of the application for a genesis // file. func (app *SimApp) ExportAppStateAndValidators( - forZeroHeight bool, jailAllowedAddrs []string, + forZeroHeight bool, jailAllowedAddrs, modulesToExport []string, ) (servertypes.ExportedApp, error) { // as if they could withdraw from the start of the next block - ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) + ctx := app.NewContextLegacy(true, tmproto.Header{Height: app.LastBlockHeight()}) // We export at last height + 1, because that's the height at which // Tendermint will start InitChain. @@ -29,7 +31,11 @@ func (app *SimApp) ExportAppStateAndValidators( app.prepForZeroHeightGenesis(ctx, jailAllowedAddrs) } - genState := app.mm.ExportGenesis(ctx, app.appCodec) + genState, err := app.ModuleManager.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) + if err != nil { + return servertypes.ExportedApp{}, err + } + appState, err := json.MarshalIndent(genState, "", " ") if err != nil { return servertypes.ExportedApp{}, err @@ -47,7 +53,7 @@ func (app *SimApp) ExportAppStateAndValidators( // prepare for fresh start at zero height // NOTE zero height genesis is a temporary feature which will be deprecated // -// in favour of export at a block height +// in favor of export at a block height func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs []string) { applyAllowedAddrs := false @@ -72,26 +78,32 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] /* Handle fee distribution state. */ // withdraw all validator commission - app.StakingKeeper.IterateValidators( - ctx, - func(_ int64, val stakingtypes.ValidatorI) (stop bool) { - _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator()) - return false - }, - ) + err := app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + valBz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + panic(err) + } + _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, valBz) + return false + }) + if err != nil { + panic(err) + } // withdraw all delegator rewards - dels := app.StakingKeeper.GetAllDelegations(ctx) + dels, err := app.StakingKeeper.GetAllDelegations(ctx) + if err != nil { + panic(err) + } + for _, delegation := range dels { valAddr, err := sdk.ValAddressFromBech32(delegation.ValidatorAddress) if err != nil { panic(err) } - delAddr, err := sdk.AccAddressFromBech32(delegation.DelegatorAddress) - if err != nil { - panic(err) - } + delAddr := sdk.MustAccAddressFromBech32(delegation.DelegatorAddress) + _, _ = app.DistrKeeper.WithdrawDelegationRewards(ctx, delAddr, valAddr) } @@ -106,38 +118,48 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] ctx = ctx.WithBlockHeight(0) // reinitialize all validators - app.StakingKeeper.IterateValidators( - ctx, - func(_ int64, val stakingtypes.ValidatorI) (stop bool) { - // donate any unwithdrawn outstanding reward fraction tokens to the community pool - scraps := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, val.GetOperator()) - feePool := app.DistrKeeper.GetFeePool(ctx) - feePool.CommunityPool = feePool.CommunityPool.Add(scraps...) - app.DistrKeeper.SetFeePool(ctx, feePool) - - err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()) - return err != nil - }, - ) - - // reinitialize all delegations - for _, del := range dels { - valAddr, err := sdk.ValAddressFromBech32(del.ValidatorAddress) + err = app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + valBz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) if err != nil { panic(err) } - delAddr, err := sdk.AccAddressFromBech32(del.DelegatorAddress) + // donate any unwithdrawn outstanding reward fraction tokens to the community pool + scraps, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valBz) if err != nil { panic(err) } - err = app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr) + feePool, err := app.DistrKeeper.FeePool.Get(ctx) if err != nil { panic(err) } - err = app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr) + feePool.CommunityPool = feePool.CommunityPool.Add(scraps...) + if err := app.DistrKeeper.FeePool.Set(ctx, feePool); err != nil { + panic(err) + } + + if err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, valBz); err != nil { + panic(err) + } + return false + }) + + // reinitialize all delegations + for _, del := range dels { + valAddr, err := sdk.ValAddressFromBech32(del.ValidatorAddress) if err != nil { panic(err) } + delAddr := sdk.MustAccAddressFromBech32(del.DelegatorAddress) + + if err := app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr); err != nil { + // never called as BeforeDelegationCreated always returns nil + panic(fmt.Errorf("error while incrementing period: %w", err)) + } + + if err := app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr); err != nil { + // never called as AfterDelegationModified always returns nil + panic(fmt.Errorf("error while creating a new delegation period record: %w", err)) + } } // reset context height @@ -146,39 +168,39 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] /* Handle staking state. */ // iterate through redelegations, reset creation height - app.StakingKeeper.IterateRedelegations( - ctx, - func(_ int64, red stakingtypes.Redelegation) (stop bool) { - for i := range red.Entries { - red.Entries[i].CreationHeight = 0 - } - app.StakingKeeper.SetRedelegation(ctx, red) - return false - }, - ) + app.StakingKeeper.IterateRedelegations(ctx, func(_ int64, red stakingtypes.Redelegation) (stop bool) { + for i := range red.Entries { + red.Entries[i].CreationHeight = 0 + } + err = app.StakingKeeper.SetRedelegation(ctx, red) + if err != nil { + panic(err) + } + return false + }) // iterate through unbonding delegations, reset creation height - app.StakingKeeper.IterateUnbondingDelegations( - ctx, - func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { - for i := range ubd.Entries { - ubd.Entries[i].CreationHeight = 0 - } - app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) - return false - }, - ) + app.StakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { + for i := range ubd.Entries { + ubd.Entries[i].CreationHeight = 0 + } + err = app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) + if err != nil { + panic(err) + } + return false + }) // Iterate through validators by power descending, reset bond heights, and // update bond intra-tx counters. - store := ctx.KVStore(app.keys[stakingtypes.StoreKey]) - iter := sdk.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) + store := ctx.KVStore(app.GetKey(stakingtypes.StoreKey)) + iter := storetypes.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) counter := int16(0) for ; iter.Valid(); iter.Next() { - addr := sdk.ValAddress(iter.Key()[1:]) - validator, found := app.StakingKeeper.GetValidator(ctx, addr) - if !found { + addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key())) + validator, err := app.StakingKeeper.GetValidator(ctx, addr) + if err != nil { panic("expected validator, not found") } @@ -191,9 +213,12 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] counter++ } - iter.Close() + if err := iter.Close(); err != nil { + app.Logger().Error("error while closing the key-value store reverse prefix iterator: ", err) + return + } - _, err := app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) + _, err = app.StakingKeeper.ApplyAndReturnValidatorSetUpdates(ctx) if err != nil { log.Fatal(err) } @@ -209,4 +234,4 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] return false }, ) -} +} \ No newline at end of file diff --git a/simapp/helpers/test_helpers.go b/simapp/helpers/test_helpers.go deleted file mode 100644 index 9ccecbd9..00000000 --- a/simapp/helpers/test_helpers.go +++ /dev/null @@ -1,80 +0,0 @@ -package helpers - -import ( - "math/rand" - "time" - - "github.com/cosmos/cosmos-sdk/client" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - authsign "github.com/cosmos/cosmos-sdk/x/auth/signing" -) - -// SimAppChainID hardcoded chainID for simulation -const ( - DefaultGenTxGas = 1000000 - SimAppChainID = "simulation-app" -) - -// GenTx generates a signed mock transaction. -func GenTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, accSeqs []uint64, priv ...cryptotypes.PrivKey) (sdk.Tx, error) { - sigs := make([]signing.SignatureV2, len(priv)) - - // create a random length memo - r := rand.New(rand.NewSource(time.Now().UnixNano())) - - memo := simulation.RandStringOfLength(r, simulation.RandIntBetween(r, 0, 100)) - - signMode := gen.SignModeHandler().DefaultMode() - - // 1st round: set SignatureV2 with empty signatures, to set correct - // signer infos. - for i, p := range priv { - sigs[i] = signing.SignatureV2{ - PubKey: p.PubKey(), - Data: &signing.SingleSignatureData{ - SignMode: signMode, - }, - Sequence: accSeqs[i], - } - } - - tx := gen.NewTxBuilder() - err := tx.SetMsgs(msgs...) - if err != nil { - return nil, err - } - err = tx.SetSignatures(sigs...) - if err != nil { - return nil, err - } - tx.SetMemo(memo) - tx.SetFeeAmount(feeAmt) - tx.SetGasLimit(gas) - - // 2nd round: once all signer infos are set, every signer can sign. - for i, p := range priv { - signerData := authsign.SignerData{ - ChainID: chainID, - AccountNumber: accNums[i], - Sequence: accSeqs[i], - } - signBytes, err := gen.SignModeHandler().GetSignBytes(signMode, signerData, tx.GetTx()) - if err != nil { - panic(err) - } - sig, err := p.Sign(signBytes) - if err != nil { - panic(err) - } - sigs[i].Data.(*signing.SingleSignatureData).Signature = sig - err = tx.SetSignatures(sigs...) - if err != nil { - panic(err) - } - } - - return tx.GetTx(), nil -} diff --git a/simapp/sim_bench_test.go b/simapp/sim_bench_test.go deleted file mode 100644 index 156c7141..00000000 --- a/simapp/sim_bench_test.go +++ /dev/null @@ -1,142 +0,0 @@ -package simapp - -import ( - "fmt" - "os" - "testing" - - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/simulation" -) - -// Profile with: -// /usr/local/go/bin/go test -benchmem -run=^$ github.com/bianjieai/tibc-go/simapp -bench ^BenchmarkFullAppSimulation$ -Commit=true -cpuprofile cpu.out -func BenchmarkFullAppSimulation(b *testing.B) { - config, db, dir, logger, _, err := SetupSimulation("goleveldb-app-sim", "Simulation") - if err != nil { - b.Fatalf("simulation setup failed: %s", err.Error()) - } - - defer func() { - db.Close() - err = os.RemoveAll(dir) - if err != nil { - b.Fatal(err) - } - }() - - app := NewSimApp( - logger, - db, - nil, - true, - map[int64]bool{}, - DefaultNodeHome, - FlagPeriodValue, - MakeTestEncodingConfig(), - EmptyAppOptions{}, - interBlockCacheOpt(), - ) - - // run randomized simulation - _, simParams, simErr := simulation.SimulateFromSeed( - b, - os.Stdout, - app.BaseApp, - AppStateFn(app.AppCodec(), app.SimulationManager()), - simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - SimulationOperations(app, app.AppCodec(), config), - app.ModuleAccountAddrs(), - config, - app.AppCodec(), - ) - - // export state and simParams before the simulation error is checked - if err = CheckExportSimulation(app, config, simParams); err != nil { - b.Fatal(err) - } - - if simErr != nil { - b.Fatal(simErr) - } - - if config.Commit { - PrintStats(db) - } -} - -func BenchmarkInvariants(b *testing.B) { - config, db, dir, logger, _, err := SetupSimulation("leveldb-app-invariant-bench", "Simulation") - if err != nil { - b.Fatalf("simulation setup failed: %s", err.Error()) - } - - config.AllInvariants = false - - defer func() { - db.Close() - err = os.RemoveAll(dir) - if err != nil { - b.Fatal(err) - } - }() - - app := NewSimApp( - logger, - db, - nil, - true, - map[int64]bool{}, - DefaultNodeHome, - FlagPeriodValue, - MakeTestEncodingConfig(), - EmptyAppOptions{}, - interBlockCacheOpt(), - ) - - // run randomized simulation - _, simParams, simErr := simulation.SimulateFromSeed( - b, - os.Stdout, - app.BaseApp, - AppStateFn(app.AppCodec(), app.SimulationManager()), - simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - SimulationOperations(app, app.AppCodec(), config), - app.ModuleAccountAddrs(), - config, - app.AppCodec(), - ) - - // export state and simParams before the simulation error is checked - if err = CheckExportSimulation(app, config, simParams); err != nil { - b.Fatal(err) - } - - if simErr != nil { - b.Fatal(simErr) - } - - if config.Commit { - PrintStats(db) - } - - ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight() + 1}) - - // 3. Benchmark each invariant separately - // - // NOTE: We use the crisis keeper as it has all the invariants registered with - // their respective metadata which makes it useful for testing/benchmarking. - for _, cr := range app.CrisisKeeper.Routes() { - cr := cr - b.Run(fmt.Sprintf("%s/%s", cr.ModuleName, cr.Route), func(b *testing.B) { - if res, stop := cr.Invar(ctx); stop { - b.Fatalf( - "broken invariant at block %d of %d\n%s", - ctx.BlockHeight()-1, config.NumBlocks, res, - ) - } - }) - } -} diff --git a/simapp/sim_test.go b/simapp/sim_test.go deleted file mode 100644 index 2fe95425..00000000 --- a/simapp/sim_test.go +++ /dev/null @@ -1,430 +0,0 @@ -package simapp - -import ( - "encoding/json" - "fmt" - "math/rand" - "os" - "testing" - - "github.com/stretchr/testify/require" - - dbm "github.com/cometbft/cometbft-db" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - - "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/cosmos/cosmos-sdk/x/simulation" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - - ibchost "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" - "github.com/bianjieai/tibc-go/simapp/helpers" -) - -// Get flags every time the simulator is run -func init() { - GetSimulatorFlags() -} - -type StoreKeysPrefixes struct { - A storetypes.StoreKey - B storetypes.StoreKey - Prefixes [][]byte -} - -// fauxMerkleModeOpt returns a BaseApp option to use a dbStoreAdapter instead of -// an IAVLStore for faster simulation speed. -func fauxMerkleModeOpt(bapp *baseapp.BaseApp) { - bapp.SetFauxMerkleMode() -} - -// interBlockCacheOpt returns a BaseApp option function that sets the persistent -// inter-block write-through cache. -func interBlockCacheOpt() func(*baseapp.BaseApp) { - return baseapp.SetInterBlockCache(store.NewCommitKVStoreCacheManager()) -} - -func TestFullAppSimulation(t *testing.T) { - config, db, dir, logger, skip, err := SetupSimulation("leveldb-app-sim", "Simulation") - if skip { - t.Skip("skipping application simulation") - } - require.NoError(t, err, "simulation setup failed") - - defer func() { - db.Close() - require.NoError(t, os.RemoveAll(dir)) - }() - - app := NewSimApp( - logger, - db, - nil, - true, - map[int64]bool{}, - DefaultNodeHome, - FlagPeriodValue, - MakeTestEncodingConfig(), - EmptyAppOptions{}, - fauxMerkleModeOpt, - ) - require.Equal(t, "SimApp", app.Name()) - - // run randomized simulation - _, simParams, simErr := simulation.SimulateFromSeed( - t, - os.Stdout, - app.BaseApp, - AppStateFn(app.AppCodec(), app.SimulationManager()), - simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - SimulationOperations(app, app.AppCodec(), config), - app.ModuleAccountAddrs(), - config, - app.AppCodec(), - ) - - // export state and simParams before the simulation error is checked - err = CheckExportSimulation(app, config, simParams) - require.NoError(t, err) - require.NoError(t, simErr) - - if config.Commit { - PrintStats(db) - } -} - -func TestAppImportExport(t *testing.T) { - config, db, dir, logger, skip, err := SetupSimulation("leveldb-app-sim", "Simulation") - if skip { - t.Skip("skipping application import/export simulation") - } - require.NoError(t, err, "simulation setup failed") - - defer func() { - db.Close() - require.NoError(t, os.RemoveAll(dir)) - }() - - app := NewSimApp( - logger, - db, - nil, - true, - map[int64]bool{}, - DefaultNodeHome, - FlagPeriodValue, - MakeTestEncodingConfig(), - EmptyAppOptions{}, - fauxMerkleModeOpt, - ) - require.Equal(t, "SimApp", app.Name()) - - // Run randomized simulation - _, simParams, simErr := simulation.SimulateFromSeed( - t, - os.Stdout, - app.BaseApp, - AppStateFn(app.AppCodec(), app.SimulationManager()), - simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - SimulationOperations(app, app.AppCodec(), config), - app.ModuleAccountAddrs(), - config, - app.AppCodec(), - ) - - // export state and simParams before the simulation error is checked - err = CheckExportSimulation(app, config, simParams) - require.NoError(t, err) - require.NoError(t, simErr) - - if config.Commit { - PrintStats(db) - } - - fmt.Printf("exporting genesis...\n") - - exported, err := app.ExportAppStateAndValidators(false, []string{}) - require.NoError(t, err) - - fmt.Printf("importing genesis...\n") - - _, newDB, newDir, _, _, err := SetupSimulation("leveldb-app-sim-2", "Simulation-2") - require.NoError(t, err, "simulation setup failed") - - defer func() { - newDB.Close() - require.NoError(t, os.RemoveAll(newDir)) - }() - - newApp := NewSimApp( - log.NewNopLogger(), - newDB, - nil, - true, - map[int64]bool{}, - DefaultNodeHome, - FlagPeriodValue, - MakeTestEncodingConfig(), - EmptyAppOptions{}, - fauxMerkleModeOpt, - ) - require.Equal(t, "SimApp", newApp.Name()) - - var genesisState GenesisState - err = json.Unmarshal(exported.AppState, &genesisState) - require.NoError(t, err) - - ctxA := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) - ctxB := newApp.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) - newApp.mm.InitGenesis(ctxB, app.AppCodec(), genesisState) - newApp.StoreConsensusParams(ctxB, exported.ConsensusParams) - - fmt.Printf("comparing stores...\n") - - storeKeysPrefixes := []StoreKeysPrefixes{ - {app.keys[authtypes.StoreKey], newApp.keys[authtypes.StoreKey], [][]byte{}}, - {app.keys[stakingtypes.StoreKey], newApp.keys[stakingtypes.StoreKey], - [][]byte{ - stakingtypes.UnbondingQueueKey, stakingtypes.RedelegationQueueKey, stakingtypes.ValidatorQueueKey, - stakingtypes.HistoricalInfoKey, - }}, // ordering may change but it doesn't matter - {app.keys[slashingtypes.StoreKey], newApp.keys[slashingtypes.StoreKey], [][]byte{}}, - {app.keys[minttypes.StoreKey], newApp.keys[minttypes.StoreKey], [][]byte{}}, - {app.keys[distrtypes.StoreKey], newApp.keys[distrtypes.StoreKey], [][]byte{}}, - { - app.keys[banktypes.StoreKey], - newApp.keys[banktypes.StoreKey], - [][]byte{banktypes.BalancesPrefix}, - }, - {app.keys[paramtypes.StoreKey], newApp.keys[paramtypes.StoreKey], [][]byte{}}, - {app.keys[govtypes.StoreKey], newApp.keys[govtypes.StoreKey], [][]byte{}}, - {app.keys[evidencetypes.StoreKey], newApp.keys[evidencetypes.StoreKey], [][]byte{}}, - {app.keys[capabilitytypes.StoreKey], newApp.keys[capabilitytypes.StoreKey], [][]byte{}}, - {app.keys[ibchost.StoreKey], newApp.keys[ibchost.StoreKey], [][]byte{}}, - } - - for _, skp := range storeKeysPrefixes { - storeA := ctxA.KVStore(skp.A) - storeB := ctxB.KVStore(skp.B) - - failedKVAs, failedKVBs := sdk.DiffKVStores(storeA, storeB, skp.Prefixes) - require.Equal(t, len(failedKVAs), len(failedKVBs), "unequal sets of key-values to compare") - - fmt.Printf( - "compared %d different key/value pairs between %s and %s\n", - len(failedKVAs), - skp.A, - skp.B, - ) - require.Equal( - t, - len(failedKVAs), - 0, - GetSimulationLog( - skp.A.Name(), - app.SimulationManager().StoreDecoders, - failedKVAs, - failedKVBs, - ), - ) - } -} - -func TestAppSimulationAfterImport(t *testing.T) { - config, db, dir, logger, skip, err := SetupSimulation("leveldb-app-sim", "Simulation") - if skip { - t.Skip("skipping application simulation after import") - } - require.NoError(t, err, "simulation setup failed") - - defer func() { - db.Close() - require.NoError(t, os.RemoveAll(dir)) - }() - - app := NewSimApp( - logger, - db, - nil, - true, - map[int64]bool{}, - DefaultNodeHome, - FlagPeriodValue, - MakeTestEncodingConfig(), - EmptyAppOptions{}, - fauxMerkleModeOpt, - ) - require.Equal(t, "SimApp", app.Name()) - - // Run randomized simulation - stopEarly, simParams, simErr := simulation.SimulateFromSeed( - t, - os.Stdout, - app.BaseApp, - AppStateFn(app.AppCodec(), app.SimulationManager()), - simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - SimulationOperations(app, app.AppCodec(), config), - app.ModuleAccountAddrs(), - config, - app.AppCodec(), - ) - - // export state and simParams before the simulation error is checked - err = CheckExportSimulation(app, config, simParams) - require.NoError(t, err) - require.NoError(t, simErr) - - if config.Commit { - PrintStats(db) - } - - if stopEarly { - fmt.Println("can't export or import a zero-validator genesis, exiting test...") - return - } - - fmt.Printf("exporting genesis...\n") - - exported, err := app.ExportAppStateAndValidators(true, []string{}) - require.NoError(t, err) - - fmt.Printf("importing genesis...\n") - - _, newDB, newDir, _, _, err := SetupSimulation("leveldb-app-sim-2", "Simulation-2") - require.NoError(t, err, "simulation setup failed") - - defer func() { - newDB.Close() - require.NoError(t, os.RemoveAll(newDir)) - }() - - newApp := NewSimApp( - log.NewNopLogger(), - newDB, - nil, - true, - map[int64]bool{}, - DefaultNodeHome, - FlagPeriodValue, - MakeTestEncodingConfig(), - EmptyAppOptions{}, - fauxMerkleModeOpt, - ) - require.Equal(t, "SimApp", newApp.Name()) - - newApp.InitChain(abci.RequestInitChain{ - AppStateBytes: exported.AppState, - }) - - _, _, err = simulation.SimulateFromSeed( - t, - os.Stdout, - newApp.BaseApp, - AppStateFn(app.AppCodec(), app.SimulationManager()), - simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - SimulationOperations(newApp, newApp.AppCodec(), config), - app.ModuleAccountAddrs(), - config, - app.AppCodec(), - ) - require.NoError(t, err) -} - -// TODO: Make another test for the fuzzer itself, which just has noOp txs -// and doesn't depend on the application. -func TestAppStateDeterminism(t *testing.T) { - if !FlagEnabledValue { - t.Skip("skipping application simulation") - } - - config := NewConfigFromFlags() - config.InitialBlockHeight = 1 - config.ExportParamsPath = "" - config.OnOperation = false - config.AllInvariants = false - config.ChainID = helpers.SimAppChainID - - numSeeds := 3 - numTimesToRunPerSeed := 5 - appHashList := make([]json.RawMessage, numTimesToRunPerSeed) - - for i := 0; i < numSeeds; i++ { - config.Seed = rand.Int63() - - for j := 0; j < numTimesToRunPerSeed; j++ { - var logger log.Logger - if FlagVerboseValue { - logger = log.TestingLogger() - } else { - logger = log.NewNopLogger() - } - - db := dbm.NewMemDB() - app := NewSimApp( - logger, - db, - nil, - true, - map[int64]bool{}, - DefaultNodeHome, - FlagPeriodValue, - MakeTestEncodingConfig(), - EmptyAppOptions{}, - interBlockCacheOpt(), - ) - - fmt.Printf( - "running non-determinism simulation; seed %d: %d/%d, attempt: %d/%d\n", - config.Seed, i+1, numSeeds, j+1, numTimesToRunPerSeed, - ) - - _, _, err := simulation.SimulateFromSeed( - t, - os.Stdout, - app.BaseApp, - AppStateFn(app.AppCodec(), app.SimulationManager()), - simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - SimulationOperations(app, app.AppCodec(), config), - app.ModuleAccountAddrs(), - config, - app.AppCodec(), - ) - require.NoError(t, err) - - if config.Commit { - PrintStats(db) - } - - appHash := app.LastCommitID().Hash - appHashList[j] = appHash - - if j != 0 { - require.Equal( - t, - string(appHashList[0]), - string(appHashList[j]), - "non-determinism in seed %d: %d/%d, attempt: %d/%d\n", - config.Seed, - i+1, - numSeeds, - j+1, - numTimesToRunPerSeed, - ) - } - } - } -} diff --git a/simapp/state.go b/simapp/state.go deleted file mode 100644 index 0b8165a7..00000000 --- a/simapp/state.go +++ /dev/null @@ -1,210 +0,0 @@ -package simapp - -import ( - "encoding/json" - "fmt" - "io" - "io/ioutil" - "math/rand" - "time" - - tmjson "github.com/cometbft/cometbft/libs/json" - tmtypes "github.com/cometbft/cometbft/types" - - sdkmath "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - "github.com/cosmos/cosmos-sdk/types/module" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - - simappparams "github.com/bianjieai/tibc-go/simapp/params" -) - -// AppStateFn returns the initial application state using a genesis or the simulation parameters. -// It panics if the user provides files for both of them. -// If a file is not given for the genesis or the sim params, it creates a randomized one. -func AppStateFn(cdc codec.JSONCodec, simManager *module.SimulationManager) simtypes.AppStateFn { - return func( - r *rand.Rand, accs []simtypes.Account, config simtypes.Config, - ) ( - appState json.RawMessage, simAccs []simtypes.Account, chainID string, genesisTimestamp time.Time, - ) { - if FlagGenesisTimeValue == 0 { - genesisTimestamp = simtypes.RandTimestamp(r) - } else { - genesisTimestamp = time.Unix(FlagGenesisTimeValue, 0) - } - - chainID = config.ChainID - switch { - case config.ParamsFile != "" && config.GenesisFile != "": - panic("cannot provide both a genesis file and a params file") - - case config.GenesisFile != "": - // override the default chain-id from simapp to set it later to the config - genesisDoc, accounts := AppStateFromGenesisFileFn(r, cdc, config.GenesisFile) - - if FlagGenesisTimeValue == 0 { - // use genesis timestamp if no custom timestamp is provided (i.e no random timestamp) - genesisTimestamp = genesisDoc.GenesisTime - } - - appState = genesisDoc.AppState - chainID = genesisDoc.ChainID - simAccs = accounts - - case config.ParamsFile != "": - appParams := make(simtypes.AppParams) - bz, err := ioutil.ReadFile(config.ParamsFile) - if err != nil { - panic(err) - } - - err = json.Unmarshal(bz, &appParams) - if err != nil { - panic(err) - } - appState, simAccs = AppStateRandomizedFn( - simManager, - r, - cdc, - accs, - genesisTimestamp, - appParams, - ) - - default: - appParams := make(simtypes.AppParams) - appState, simAccs = AppStateRandomizedFn( - simManager, - r, - cdc, - accs, - genesisTimestamp, - appParams, - ) - } - - return appState, simAccs, chainID, genesisTimestamp - } -} - -// AppStateRandomizedFn creates calls each module's GenesisState generator function -// and creates the simulation params -func AppStateRandomizedFn( - simManager *module.SimulationManager, r *rand.Rand, cdc codec.JSONCodec, - accs []simtypes.Account, genesisTimestamp time.Time, appParams simtypes.AppParams, -) ( - json.RawMessage, []simtypes.Account, -) { - numAccs := int64(len(accs)) - genesisState := NewDefaultGenesisState(cdc) - - // generate a random amount of initial stake coins and a random initial - // number of bonded accounts - var ( - numInitiallyBonded int64 - initialStake sdkmath.Int - ) - appParams.GetOrGenerate( - cdc, simappparams.StakePerAccount, &initialStake, r, - func(r *rand.Rand) { initialStake = sdkmath.NewInt(r.Int63n(1e12)) }, - ) - appParams.GetOrGenerate( - cdc, simappparams.InitiallyBondedValidators, &numInitiallyBonded, r, - func(r *rand.Rand) { numInitiallyBonded = int64(r.Intn(300)) }, - ) - - if numInitiallyBonded > numAccs { - numInitiallyBonded = numAccs - } - - fmt.Printf( - `Selected randomly generated parameters for simulated genesis: -{ - stake_per_account: "%d", - initially_bonded_validators: "%d" -} -`, initialStake, numInitiallyBonded, - ) - - simState := &module.SimulationState{ - AppParams: appParams, - Cdc: cdc, - Rand: r, - GenState: genesisState, - Accounts: accs, - InitialStake: initialStake, - NumBonded: numInitiallyBonded, - GenTimestamp: genesisTimestamp, - } - - simManager.GenerateGenesisStates(simState) - - appState, err := json.Marshal(genesisState) - if err != nil { - panic(err) - } - - return appState, accs -} - -// AppStateFromGenesisFileFn util function to generate the genesis AppState -// from a genesis.json file. -func AppStateFromGenesisFileFn( - r io.Reader, - cdc codec.JSONCodec, - genesisFile string, -) (tmtypes.GenesisDoc, []simtypes.Account) { - bytes, err := ioutil.ReadFile(genesisFile) - if err != nil { - panic(err) - } - - var genesis tmtypes.GenesisDoc - // NOTE: Tendermint uses a custom JSON decoder for GenesisDoc - err = tmjson.Unmarshal(bytes, &genesis) - if err != nil { - panic(err) - } - - var appState GenesisState - err = json.Unmarshal(genesis.AppState, &appState) - if err != nil { - panic(err) - } - - var authGenesis authtypes.GenesisState - if appState[authtypes.ModuleName] != nil { - cdc.MustUnmarshalJSON(appState[authtypes.ModuleName], &authGenesis) - } - - newAccs := make([]simtypes.Account, len(authGenesis.Accounts)) - for i, acc := range authGenesis.Accounts { - // Pick a random private key, since we don't know the actual key - // This should be fine as it's only used for mock Tendermint validators - // and these keys are never actually used to sign by mock Tendermint. - privkeySeed := make([]byte, 15) - if _, err := r.Read(privkeySeed); err != nil { - panic(err) - } - - privKey := secp256k1.GenPrivKeyFromSecret(privkeySeed) - - a, ok := acc.GetCachedValue().(authtypes.AccountI) - if !ok { - panic("expected account") - } - - // create simulator accounts - simAcc := simtypes.Account{ - PrivKey: privKey, - PubKey: privKey.PubKey(), - Address: a.GetAddress(), - } - newAccs[i] = simAcc - } - - return genesis, newAccs -} diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index 6543785d..93cc0568 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -1,38 +1,30 @@ package simapp import ( - "bytes" - "encoding/hex" "encoding/json" - "fmt" - "strconv" + "math/rand" "testing" "time" "github.com/stretchr/testify/require" - dbm "github.com/cometbft/cometbft-db" + "cosmossdk.io/log" + "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" tmtypes "github.com/cometbft/cometbft/types" + dbm "github.com/cosmos/cosmos-db" bam "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/bianjieai/tibc-go/modules/tibc/testing/mock" - "github.com/bianjieai/tibc-go/simapp/helpers" ) // DefaultConsensusParams defines the default Tendermint consensus params used in @@ -40,7 +32,7 @@ import ( var DefaultConsensusParams = &tmproto.ConsensusParams{ Block: &tmproto.BlockParams{ MaxBytes: 200000, - MaxGas: 2000000, + MaxGas: -1, // no limit }, Evidence: &tmproto.EvidenceParams{ MaxAgeNumBlocks: 302400, @@ -62,10 +54,6 @@ func setup(withGenesis bool, invCheckPeriod uint) (*SimApp, GenesisState) { db, nil, true, - map[int64]bool{}, - DefaultNodeHome, - invCheckPeriod, - encCdc, EmptyAppOptions{}, ) if withGenesis { @@ -75,7 +63,7 @@ func setup(withGenesis bool, invCheckPeriod uint) (*SimApp, GenesisState) { } // Setup initializes a new SimApp. A Nop logger is set in SimApp. -func Setup(_ bool) *SimApp { +func Setup(t *testing.T) *SimApp { privVal := mock.NewPV() pubKey, _ := privVal.GetPubKey() @@ -93,10 +81,10 @@ func Setup(_ bool) *SimApp { ) balance := banktypes.Balance{ Address: acc.GetAddress().String(), - Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000000000))), + Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(100000000000000))), } - app := SetupWithGenesisValSet(valSet, []authtypes.GenesisAccount{acc}, balance) + app := SetupWithGenesisValSet(t, valSet, []authtypes.GenesisAccount{acc}, balance) return app } @@ -106,230 +94,34 @@ func Setup(_ bool) *SimApp { // of one consensus engine unit in the default token of the simapp from first genesis // account. A Nop logger is set in SimApp. func SetupWithGenesisValSet( + t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance, ) *SimApp { - app, genesisState := setup(true, 5) - genesisState = genesisStateWithValSet(app, genesisState, valSet, genAccs, balances...) + genesisState, err := simtestutil.GenesisStateWithValSet(app.AppCodec(), genesisState, valSet, genAccs, balances...) - stateBytes, _ := json.MarshalIndent(genesisState, "", " ") + stateBytes, err := json.MarshalIndent(genesisState, "", " ") + require.NoError(t, err) // init chain will set the validator set and initialize the genesis accounts - app.InitChain( - abci.RequestInitChain{ + _, err = app.InitChain( + &abci.RequestInitChain{ Validators: []abci.ValidatorUpdate{}, ConsensusParams: DefaultConsensusParams, AppStateBytes: stateBytes, }, ) + require.NoError(t, err) - // commit genesis changes - app.Commit() - app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{ + _, err = app.FinalizeBlock(&abci.RequestFinalizeBlock{ Height: app.LastBlockHeight() + 1, - AppHash: app.LastCommitID().Hash, - ValidatorsHash: valSet.Hash(), + Hash: app.LastCommitID().Hash, NextValidatorsHash: valSet.Hash(), - }}) - - return app -} - -func genesisStateWithValSet(app *SimApp, genesisState GenesisState, - valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, - balances ...banktypes.Balance) GenesisState { - // set genesis accounts - authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) - genesisState[authtypes.ModuleName] = app.AppCodec().MustMarshalJSON(authGenesis) - - validators := make([]stakingtypes.Validator, 0, len(valSet.Validators)) - delegations := make([]stakingtypes.Delegation, 0, len(valSet.Validators)) - - bondAmt := sdk.DefaultPowerReduction - - for _, val := range valSet.Validators { - pk, _ := cryptocodec.FromTmPubKeyInterface(val.PubKey) - pkAny, _ := codectypes.NewAnyWithValue(pk) - validator := stakingtypes.Validator{ - OperatorAddress: sdk.ValAddress(val.Address).String(), - ConsensusPubkey: pkAny, - Jailed: false, - Status: stakingtypes.Bonded, - Tokens: bondAmt, - DelegatorShares: sdk.OneDec(), - Description: stakingtypes.Description{}, - UnbondingHeight: int64(0), - UnbondingTime: time.Unix(0, 0).UTC(), - Commission: stakingtypes.NewCommission( - sdk.ZeroDec(), - sdk.ZeroDec(), - sdk.ZeroDec(), - ), - MinSelfDelegation: sdk.ZeroInt(), - } - validators = append(validators, validator) - delegations = append( - delegations, - stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec()), - ) - - } - // set validators and delegations - stakingGenesis := stakingtypes.NewGenesisState( - stakingtypes.DefaultParams(), - validators, - delegations, - ) - genesisState[stakingtypes.ModuleName] = app.AppCodec().MustMarshalJSON(stakingGenesis) - - totalSupply := sdk.NewCoins() - for _, b := range balances { - // add genesis acc tokens to total supply - totalSupply = totalSupply.Add(b.Coins...) - } - - for range delegations { - // add delegated tokens to total supply - totalSupply = totalSupply.Add(sdk.NewCoin(sdk.DefaultBondDenom, bondAmt)) - } - - // add bonded amount to bonded pool module account - balances = append(balances, banktypes.Balance{ - Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(), - Coins: sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, bondAmt)}, }) - - // update total supply - bankGenesis := banktypes.NewGenesisState( - banktypes.DefaultGenesisState().Params, - balances, - totalSupply, - []banktypes.Metadata{}, - []banktypes.SendEnabled{}, - ) - genesisState[banktypes.ModuleName] = app.AppCodec().MustMarshalJSON(bankGenesis) - - return genesisState -} - -type GenerateAccountStrategy func(int) []sdk.AccAddress - -// createRandomAccounts is a strategy used by addTestAddrs() in order to generated addresses in random order. -func createRandomAccounts(accNum int) []sdk.AccAddress { - testAddrs := make([]sdk.AccAddress, accNum) - for i := 0; i < accNum; i++ { - pk := ed25519.GenPrivKey().PubKey() - testAddrs[i] = sdk.AccAddress(pk.Address()) - } - - return testAddrs -} - -// createIncrementalAccounts is a strategy used by addTestAddrs() in order to generated addresses in ascending order. -func createIncrementalAccounts(accNum int) []sdk.AccAddress { - var addresses []sdk.AccAddress - var buffer bytes.Buffer - - // start at 100 so we can make up to 999 test addresses with valid test addresses - for i := 100; i < (accNum + 100); i++ { - numString := strconv.Itoa(i) - buffer.WriteString("A58856F0FD53BF058B4909A21AEC019107BA6") // base address string - - buffer.WriteString(numString) // adding on final two digits to make addresses unique - res, _ := sdk.AccAddressFromHexUnsafe(buffer.String()) - bech := res.String() - addr, _ := TestAddr(buffer.String(), bech) - - addresses = append(addresses, addr) - buffer.Reset() - } - - return addresses -} - -// AddTestAddrs constructs and returns accNum amount of accounts with an -// initial balance of accAmt in random order -func AddTestAddrs(app *SimApp, ctx sdk.Context, accNum int, accAmt sdk.Int) []sdk.AccAddress { - return addTestAddrs(app, ctx, accNum, accAmt, createRandomAccounts) -} - -// AddTestAddrs constructs and returns accNum amount of accounts with an -// initial balance of accAmt in random order -func AddTestAddrsIncremental( - app *SimApp, - ctx sdk.Context, - accNum int, - accAmt sdk.Int, -) []sdk.AccAddress { - return addTestAddrs(app, ctx, accNum, accAmt, createIncrementalAccounts) -} - -func addTestAddrs( - app *SimApp, - ctx sdk.Context, - accNum int, - accAmt sdk.Int, - strategy GenerateAccountStrategy, -) []sdk.AccAddress { - testAddrs := strategy(accNum) - - initCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, accAmt)) - - for _, addr := range testAddrs { - initAccountWithCoins(app, ctx, addr, initCoins) - } - - return testAddrs -} - -func initAccountWithCoins(app *SimApp, ctx sdk.Context, addr sdk.AccAddress, coins sdk.Coins) { - if err := app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, coins); err != nil { - panic(err) - } - - if err := app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, addr, coins); err != nil { - panic(err) - } -} - -// ConvertAddrsToValAddrs converts the provided addresses to ValAddress. -func ConvertAddrsToValAddrs(addrs []sdk.AccAddress) []sdk.ValAddress { - valAddrs := make([]sdk.ValAddress, len(addrs)) - - for i, addr := range addrs { - valAddrs[i] = sdk.ValAddress(addr) - } - - return valAddrs -} - -func TestAddr(addr string, bech string) (sdk.AccAddress, error) { - res, err := sdk.AccAddressFromHexUnsafe(addr) - if err != nil { - return nil, err - } - bechexpected := res.String() - if bech != bechexpected { - return nil, fmt.Errorf("bech encoding doesn't match reference") - } - - bechres, err := sdk.AccAddressFromBech32(bech) - if err != nil { - return nil, err - } - if !bytes.Equal(bechres, res) { - return nil, err - } - - return res, nil -} - -// CheckBalance checks the balance of an account. -func CheckBalance(t *testing.T, app *SimApp, addr sdk.AccAddress, balances sdk.Coins) { - ctxCheck := app.BaseApp.NewContext(true, tmproto.Header{}) - require.True(t, balances.IsEqual(app.BankKeeper.GetAllBalances(ctxCheck, addr))) + require.NoError(t, err) + return app } // SignAndDeliver signs and delivers a transaction. No simulation occurs as the @@ -340,19 +132,20 @@ func SignAndDeliver( t *testing.T, txCfg client.TxConfig, app *bam.BaseApp, - _ tmproto.Header, msgs []sdk.Msg, chainID string, accNums, accSeqs []uint64, - _, expPass bool, + expPass bool, + blockTime time.Time, + nextValHash []byte, priv ...cryptotypes.PrivKey, -) (sdk.GasInfo, *sdk.Result, error) { - - tx, err := helpers.GenTx( +) (*abci.ResponseFinalizeBlock, error) { + tx, err := simtestutil.GenSignedMockTx( + rand.New(rand.NewSource(time.Now().UnixNano())), txCfg, msgs, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)}, - helpers.DefaultGenTxGas, + simtestutil.DefaultGenTxGas, chainID, accNums, accSeqs, @@ -360,90 +153,15 @@ func SignAndDeliver( ) require.NoError(t, err) - // Simulate a sending a transaction - gInfo, res, err := app.SimDeliver(txCfg.TxEncoder(), tx) - - if expPass { - require.NoError(t, err) - require.NotNil(t, res) - } else { - require.Error(t, err) - require.Nil(t, res) - } - - return gInfo, res, err -} - -// GenSequenceOfTxs generates a set of signed transactions of messages, such -// that they differ only by having the sequence numbers incremented between -// every transaction. -func GenSequenceOfTxs( - txGen client.TxConfig, - msgs []sdk.Msg, - accNums []uint64, - initSeqNums []uint64, - numToGenerate int, - priv ...cryptotypes.PrivKey, -) ([]sdk.Tx, error) { - txs := make([]sdk.Tx, numToGenerate) - var err error - for i := 0; i < numToGenerate; i++ { - txs[i], err = helpers.GenTx( - txGen, - msgs, - sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)}, - helpers.DefaultGenTxGas, - "", - accNums, - initSeqNums, - priv..., - ) - if err != nil { - break - } - incrementAllSequenceNumbers(initSeqNums) - } - - return txs, err -} - -func incrementAllSequenceNumbers(initSeqNums []uint64) { - for i := 0; i < len(initSeqNums); i++ { - initSeqNums[i]++ - } -} - -// CreateTestPubKeys returns a total of numPubKeys public keys in ascending order. -func CreateTestPubKeys(numPubKeys int) []cryptotypes.PubKey { - var publicKeys []cryptotypes.PubKey - var buffer bytes.Buffer - - // start at 10 to avoid changing 1 to 01, 2 to 02, etc - for i := 100; i < (numPubKeys + 100); i++ { - numString := strconv.Itoa(i) - buffer.WriteString( - "0B485CFC0EECC619440448436F8FC9DF40566F2369E72400281454CB552AF", - ) // base pubkey string - buffer.WriteString( - numString, - ) // adding on final two digits to make pubkeys unique - publicKeys = append(publicKeys, NewPubKeyFromHex(buffer.String())) - buffer.Reset() - } - - return publicKeys -} + txBytes, err := txCfg.TxEncoder()(tx) + require.NoError(t, err) -// NewPubKeyFromHex returns a PubKey from a hex string. -func NewPubKeyFromHex(pk string) (res cryptotypes.PubKey) { - pkBytes, err := hex.DecodeString(pk) - if err != nil { - panic(err) - } - if len(pkBytes) != ed25519.PubKeySize { - panic(errors.Wrap(errors.ErrInvalidPubKey, "invalid pubkey size")) - } - return &ed25519.PubKey{Key: pkBytes} + return app.FinalizeBlock(&abci.RequestFinalizeBlock{ + Height: app.LastBlockHeight() + 1, + Time: blockTime, + NextValidatorsHash: nextValHash, + Txs: [][]byte{txBytes}, + }) } // EmptyAppOptions is a stub implementing AppOptions diff --git a/simapp/types.go b/simapp/types.go deleted file mode 100644 index 5150f1a4..00000000 --- a/simapp/types.go +++ /dev/null @@ -1,44 +0,0 @@ -package simapp - -import ( - abci "github.com/cometbft/cometbft/abci/types" - - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/server/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" -) - -// App implements the common methods for a Cosmos SDK-based application -// specific blockchain. -type App interface { - // The assigned name of the app. - Name() string - - // The application types codec. - // NOTE: This shoult be sealed before being returned. - LegacyAmino() *codec.LegacyAmino - - // Application updates every begin block. - BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock - - // Application updates every end block. - EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock - - // Application update at chain (i.e app) initialization. - InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain - - // Loads the app at a given height. - LoadHeight(height int64) error - - // Exports the state of the application for a genesis file. - ExportAppStateAndValidators( - forZeroHeight bool, jailAllowedAddrs []string, - ) (types.ExportedApp, error) - - // All the registered module account addreses. - ModuleAccountAddrs() map[string]bool - - // Helper for the simulation framework. - SimulationManager() *module.SimulationManager -} diff --git a/simapp/utils.go b/simapp/utils.go deleted file mode 100644 index 579e2dcf..00000000 --- a/simapp/utils.go +++ /dev/null @@ -1,138 +0,0 @@ -package simapp - -import ( - "encoding/json" - "fmt" - "io/ioutil" - - dbm "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" - - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/kv" - "github.com/cosmos/cosmos-sdk/types/module" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - - "github.com/bianjieai/tibc-go/simapp/helpers" -) - -// SetupSimulation creates the config, db (levelDB), temporary directory and logger for -// the simulation tests. If `FlagEnabledValue` is false it skips the current test. -// Returns error on an invalid db intantiation or temp dir creation. -func SetupSimulation( - dirPrefix, dbName string, -) (simtypes.Config, dbm.DB, string, log.Logger, bool, error) { - if !FlagEnabledValue { - return simtypes.Config{}, nil, "", nil, true, nil - } - - config := NewConfigFromFlags() - config.ChainID = helpers.SimAppChainID - - var logger log.Logger - if FlagVerboseValue { - logger = log.TestingLogger() - } else { - logger = log.NewNopLogger() - } - - dir, err := ioutil.TempDir("", dirPrefix) - if err != nil { - return simtypes.Config{}, nil, "", nil, false, err - } - - db, err := dbm.NewDB(dbName, dbm.BackendType(config.DBBackend), dir) - if err != nil { - return config, nil, "", nil, false, err - } - - return config, db, dir, logger, false, nil -} - -// SimulationOperations retrieves the simulation params from the provided file path -// and returns all the modules weighted operations -func SimulationOperations( - app App, - cdc codec.JSONCodec, - config simtypes.Config, -) []simtypes.WeightedOperation { - simState := module.SimulationState{ - AppParams: make(simtypes.AppParams), - Cdc: cdc, - } - - if config.ParamsFile != "" { - bz, err := ioutil.ReadFile(config.ParamsFile) - if err != nil { - panic(err) - } - - err = json.Unmarshal(bz, &simState.AppParams) - if err != nil { - panic(err) - } - } - - return app.SimulationManager().WeightedOperations(simState) -} - -// CheckExportSimulation exports the app state and simulation parameters to JSON -// if the export paths are defined. -func CheckExportSimulation(app App, config simtypes.Config, params simtypes.Params) error { - if config.ExportStatePath != "" { - fmt.Println("exporting app state...") - exported, err := app.ExportAppStateAndValidators(false, nil) - if err != nil { - return err - } - - if err := ioutil.WriteFile(config.ExportStatePath, []byte(exported.AppState), 0600); err != nil { - return err - } - } - - if config.ExportParamsPath != "" { - fmt.Println("exporting simulation params...") - paramsBz, err := json.MarshalIndent(params, "", " ") - if err != nil { - return err - } - - if err := ioutil.WriteFile(config.ExportParamsPath, paramsBz, 0600); err != nil { - return err - } - } - return nil -} - -// PrintStats prints the corresponding statistics from the app DB. -func PrintStats(db dbm.DB) { - fmt.Println("\nLevelDB Stats") - fmt.Println(db.Stats()["leveldb.stats"]) - fmt.Println("LevelDB cached block size", db.Stats()["leveldb.cachedblock"]) -} - -// GetSimulationLog unmarshals the KVPair's Value to the corresponding type based on the -// each's module store key and the prefix bytes of the KVPair's key. -func GetSimulationLog( - storeName string, - sdr sdk.StoreDecoderRegistry, - kvAs, kvBs []kv.Pair, -) (log string) { - for i := 0; i < len(kvAs); i++ { - if len(kvAs[i].Value) == 0 && len(kvBs[i].Value) == 0 { - // skip if the value doesn't have any bytes - continue - } - - decoder, ok := sdr[storeName] - if ok { - log += decoder(kvAs[i], kvBs[i]) - } else { - log += fmt.Sprintf("store A %X => %X\nstore B %X => %X\n", kvAs[i].Key, kvAs[i].Value, kvBs[i].Key, kvBs[i].Value) - } - } - - return log -} diff --git a/simapp/utils_test.go b/simapp/utils_test.go deleted file mode 100644 index 86c3d87d..00000000 --- a/simapp/utils_test.go +++ /dev/null @@ -1,56 +0,0 @@ -package simapp - -import ( - "fmt" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/std" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/kv" - "github.com/cosmos/cosmos-sdk/types/module" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" -) - -func makeCodec(bm module.BasicManager) *codec.LegacyAmino { - cdc := codec.NewLegacyAmino() - - bm.RegisterLegacyAminoCodec(cdc) - std.RegisterLegacyAminoCodec(cdc) - - return cdc -} - -func TestGetSimulationLog(t *testing.T) { - cdc := makeCodec(ModuleBasics) - - decoders := make(sdk.StoreDecoderRegistry) - decoders[authtypes.StoreKey] = func(kvAs, kvBs kv.Pair) string { return "10" } - - tests := []struct { - store string - kvPairs []kv.Pair - expectedLog string - }{{ - "Empty", - []kv.Pair{{}}, - "", - }, { - authtypes.StoreKey, - []kv.Pair{{Key: authtypes.GlobalAccountNumberKey, Value: cdc.MustMarshal(uint64(10))}}, - "10", - }, { - "OtherStore", - []kv.Pair{{Key: []byte("key"), Value: []byte("value")}}, - fmt.Sprintf("store A %X => %X\nstore B %X => %X\n", []byte("key"), []byte("value"), []byte("key"), []byte("value")), - }} - - for _, tt := range tests { - tt := tt - t.Run(tt.store, func(t *testing.T) { - require.Equal(t, tt.expectedLog, GetSimulationLog(tt.store, decoders, tt.kvPairs, tt.kvPairs), tt.store) - }) - } -}