feat(x/auth): define simplified account query service (#13210)
This commit is contained in:
parent
b37ddcafb3
commit
d9ef976412
@ -49,6 +49,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
* (cli) [#12742](https://github.com/cosmos/cosmos-sdk/pull/12742) Add the `prune` CLI cmd to manually prune app store history versions based on the pruning options.
|
||||
* (ledger) [#12935](https://github.com/cosmos/cosmos-sdk/pull/12935) Generalize Ledger integration to allow for different apps or keytypes that use SECP256k1.
|
||||
* (x/bank) [#11981](https://github.com/cosmos/cosmos-sdk/pull/11981) Create the `SetSendEnabled` endpoint for managing the bank's SendEnabled settings.
|
||||
* (x/auth) [#13210](https://github.com/cosmos/cosmos-sdk/pull/13210) Add `Query/AccountInfo` endpoint for simplified access to basic account info.
|
||||
|
||||
### Improvements
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -51,6 +51,10 @@ type QueryClient interface {
|
||||
//
|
||||
// Since: cosmos-sdk 0.46
|
||||
AddressStringToBytes(ctx context.Context, in *AddressStringToBytesRequest, opts ...grpc.CallOption) (*AddressStringToBytesResponse, error)
|
||||
// AccountInfo queries account info which is common to all account types.
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
AccountInfo(ctx context.Context, in *QueryAccountInfoRequest, opts ...grpc.CallOption) (*QueryAccountInfoResponse, error)
|
||||
}
|
||||
|
||||
type queryClient struct {
|
||||
@ -133,6 +137,15 @@ func (c *queryClient) AddressStringToBytes(ctx context.Context, in *AddressStrin
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) AccountInfo(ctx context.Context, in *QueryAccountInfoRequest, opts ...grpc.CallOption) (*QueryAccountInfoResponse, error) {
|
||||
out := new(QueryAccountInfoResponse)
|
||||
err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/AccountInfo", in, out, opts...)
|
||||
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
|
||||
@ -166,6 +179,10 @@ type QueryServer interface {
|
||||
//
|
||||
// Since: cosmos-sdk 0.46
|
||||
AddressStringToBytes(context.Context, *AddressStringToBytesRequest) (*AddressStringToBytesResponse, error)
|
||||
// AccountInfo queries account info which is common to all account types.
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
AccountInfo(context.Context, *QueryAccountInfoRequest) (*QueryAccountInfoResponse, error)
|
||||
mustEmbedUnimplementedQueryServer()
|
||||
}
|
||||
|
||||
@ -197,6 +214,9 @@ func (UnimplementedQueryServer) AddressBytesToString(context.Context, *AddressBy
|
||||
func (UnimplementedQueryServer) AddressStringToBytes(context.Context, *AddressStringToBytesRequest) (*AddressStringToBytesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddressStringToBytes not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) AccountInfo(context.Context, *QueryAccountInfoRequest) (*QueryAccountInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AccountInfo not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||
|
||||
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||
@ -354,6 +374,24 @@ func _Query_AddressStringToBytes_Handler(srv interface{}, ctx context.Context, d
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_AccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryAccountInfoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).AccountInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/cosmos.auth.v1beta1.Query/AccountInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).AccountInfo(ctx, req.(*QueryAccountInfoRequest))
|
||||
}
|
||||
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)
|
||||
@ -393,6 +431,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "AddressStringToBytes",
|
||||
Handler: _Query_AddressStringToBytes_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AccountInfo",
|
||||
Handler: _Query_AccountInfo_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/auth/v1beta1/query.proto",
|
||||
|
||||
@ -73,6 +73,15 @@ service Query {
|
||||
option (cosmos.query.v1.module_query_safe) = true;
|
||||
option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_string}";
|
||||
}
|
||||
|
||||
|
||||
// AccountInfo queries account info which is common to all account types.
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
rpc AccountInfo(QueryAccountInfoRequest) returns (QueryAccountInfoResponse) {
|
||||
option (cosmos.query.v1.module_query_safe) = true;
|
||||
option (google.api.http).get = "/cosmos/auth/v1beta1/account_info/{address}";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryAccountsRequest is the request type for the Query/Accounts RPC method.
|
||||
@ -179,3 +188,17 @@ message QueryAccountAddressByIDRequest {
|
||||
message QueryAccountAddressByIDResponse {
|
||||
string account_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
}
|
||||
|
||||
// QueryAccountInfoRequest is the Query/AccountInfo request type.
|
||||
message QueryAccountInfoRequest {
|
||||
|
||||
// address is the account address string.
|
||||
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
}
|
||||
|
||||
// QueryAccountInfoResponse is the Query/AccountInfo response type.
|
||||
message QueryAccountInfoResponse {
|
||||
|
||||
// info is the account info which is represented by BaseAccount.
|
||||
BaseAccount info = 1;
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@ package cosmos.autocli.v1;
|
||||
|
||||
import "google/protobuf/descriptor.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/api/cosmos/base/cli/v1;cliv1";
|
||||
option go_package = "cosmossdk.io/api/cosmos/base/cli/v1;cliv1";
|
||||
|
||||
// ModuleOptions describes the CLI options for a Cosmos SDK module.
|
||||
message ModuleOptions {
|
||||
|
||||
@ -4,14 +4,17 @@
|
||||
# docker build --pull --rm -f "contrib/devtools/Dockerfile" -t cosmossdk-proto:latest "contrib/devtools"
|
||||
# docker run --rm -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh
|
||||
|
||||
set -eo pipefail
|
||||
set -e
|
||||
|
||||
echo "Generating gogo proto code"
|
||||
cd proto
|
||||
proto_dirs=$(find ./cosmos -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
|
||||
if grep "option go_package.*(?!cosmos-sdk/api)" $file &> /dev/null ; then
|
||||
# this regex checks if a proto file has its go_package set to cosmossdk.io/api/...
|
||||
# gogo proto files SHOULD ONLY be generated if this is false
|
||||
# we don't want gogo proto to run for proto files which are natively built for google.golang.org/protobuf
|
||||
if grep -q "option go_package" "$file" && grep -H -o -c 'option go_package.*cosmossdk.io/api' "$file" | grep -q ':0$'; then
|
||||
buf generate --template buf.gen.gogo.yaml $file
|
||||
fi
|
||||
done
|
||||
|
||||
@ -182,3 +182,39 @@ func (ak AccountKeeper) AddressStringToBytes(ctx context.Context, req *types.Add
|
||||
|
||||
return &types.AddressStringToBytesResponse{AddressBytes: bz}, nil
|
||||
}
|
||||
|
||||
// AccountInfo implements the AccountInfo query.
|
||||
func (ak AccountKeeper) AccountInfo(goCtx context.Context, req *types.QueryAccountInfoRequest) (*types.QueryAccountInfoResponse, error) {
|
||||
if req == nil {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "empty request")
|
||||
}
|
||||
|
||||
if req.Address == "" {
|
||||
return nil, status.Error(codes.InvalidArgument, "address cannot be empty")
|
||||
}
|
||||
|
||||
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
addr, err := sdk.AccAddressFromBech32(req.Address)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
account := ak.GetAccount(ctx, addr)
|
||||
if account == nil {
|
||||
return nil, status.Errorf(codes.NotFound, "account %s not found", req.Address)
|
||||
}
|
||||
|
||||
pkAny, err := codectypes.NewAnyWithValue(account.GetPubKey())
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
return &types.QueryAccountInfoResponse{
|
||||
Info: &types.BaseAccount{
|
||||
Address: addr.String(),
|
||||
PubKey: pkAny,
|
||||
AccountNumber: account.GetAccountNumber(),
|
||||
Sequence: account.GetSequence(),
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
@ -7,6 +7,8 @@ import (
|
||||
"math"
|
||||
"sort"
|
||||
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/testutil/testdata"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
@ -443,3 +445,25 @@ func (suite *KeeperTestSuite) TestAddressStringToBytes() {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestQueryAccountInfo() {
|
||||
_, pk, addr := testdata.KeyTestPubAddr()
|
||||
acc := suite.accountKeeper.NewAccountWithAddress(suite.ctx, addr)
|
||||
suite.Require().NoError(acc.SetPubKey(pk))
|
||||
suite.Require().NoError(acc.SetSequence(10))
|
||||
suite.accountKeeper.SetAccount(suite.ctx, acc)
|
||||
|
||||
res, err := suite.queryClient.AccountInfo(context.Background(), &types.QueryAccountInfoRequest{
|
||||
Address: addr.String(),
|
||||
})
|
||||
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().NotNil(res.Info)
|
||||
suite.Require().Equal(addr.String(), res.Info.Address)
|
||||
suite.Require().Equal(acc.GetAccountNumber(), res.Info.AccountNumber)
|
||||
suite.Require().Equal(acc.GetSequence(), res.Info.Sequence)
|
||||
suite.Require().Equal("/"+proto.MessageName(pk), res.Info.PubKey.TypeUrl)
|
||||
pkBz, err := proto.Marshal(pk)
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().Equal(pkBz, res.Info.PubKey.Value)
|
||||
}
|
||||
|
||||
@ -5,6 +5,8 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
"github.com/cosmos/cosmos-sdk/testutil"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
@ -12,7 +14,6 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@ -5,13 +5,12 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
"github.com/spf13/cobra"
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
|
||||
modulev1 "cosmossdk.io/api/cosmos/auth/module/v1"
|
||||
"cosmossdk.io/core/appmodule"
|
||||
"cosmossdk.io/depinject"
|
||||
gwruntime "github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
"github.com/spf13/cobra"
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
@ -123,6 +122,7 @@ func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {}
|
||||
func (am AppModule) RegisterServices(cfg module.Configurator) {
|
||||
types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.accountKeeper))
|
||||
types.RegisterQueryServer(cfg.QueryServer(), am.accountKeeper)
|
||||
|
||||
m := keeper.NewMigrator(am.accountKeeper, cfg.QueryServer(), am.legacySubspace)
|
||||
if err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2); err != nil {
|
||||
panic(err)
|
||||
|
||||
@ -755,6 +755,98 @@ func (m *QueryAccountAddressByIDResponse) GetAccountAddress() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// QueryAccountInfoRequest is the Query/AccountInfo request type.
|
||||
type QueryAccountInfoRequest struct {
|
||||
// address is the account address string.
|
||||
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryAccountInfoRequest) Reset() { *m = QueryAccountInfoRequest{} }
|
||||
func (m *QueryAccountInfoRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryAccountInfoRequest) ProtoMessage() {}
|
||||
func (*QueryAccountInfoRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c451370b3929a27c, []int{16}
|
||||
}
|
||||
func (m *QueryAccountInfoRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryAccountInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryAccountInfoRequest.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *QueryAccountInfoRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryAccountInfoRequest.Merge(m, src)
|
||||
}
|
||||
func (m *QueryAccountInfoRequest) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryAccountInfoRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryAccountInfoRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryAccountInfoRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *QueryAccountInfoRequest) GetAddress() string {
|
||||
if m != nil {
|
||||
return m.Address
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// QueryAccountInfoResponse is the Query/AccountInfo response type.
|
||||
type QueryAccountInfoResponse struct {
|
||||
// info is the account info which is represented by BaseAccount.
|
||||
Info *BaseAccount `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryAccountInfoResponse) Reset() { *m = QueryAccountInfoResponse{} }
|
||||
func (m *QueryAccountInfoResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryAccountInfoResponse) ProtoMessage() {}
|
||||
func (*QueryAccountInfoResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c451370b3929a27c, []int{17}
|
||||
}
|
||||
func (m *QueryAccountInfoResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryAccountInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryAccountInfoResponse.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *QueryAccountInfoResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryAccountInfoResponse.Merge(m, src)
|
||||
}
|
||||
func (m *QueryAccountInfoResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryAccountInfoResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryAccountInfoResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryAccountInfoResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *QueryAccountInfoResponse) GetInfo() *BaseAccount {
|
||||
if m != nil {
|
||||
return m.Info
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*QueryAccountsRequest)(nil), "cosmos.auth.v1beta1.QueryAccountsRequest")
|
||||
proto.RegisterType((*QueryAccountsResponse)(nil), "cosmos.auth.v1beta1.QueryAccountsResponse")
|
||||
@ -772,69 +864,75 @@ func init() {
|
||||
proto.RegisterType((*AddressStringToBytesResponse)(nil), "cosmos.auth.v1beta1.AddressStringToBytesResponse")
|
||||
proto.RegisterType((*QueryAccountAddressByIDRequest)(nil), "cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")
|
||||
proto.RegisterType((*QueryAccountAddressByIDResponse)(nil), "cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")
|
||||
proto.RegisterType((*QueryAccountInfoRequest)(nil), "cosmos.auth.v1beta1.QueryAccountInfoRequest")
|
||||
proto.RegisterType((*QueryAccountInfoResponse)(nil), "cosmos.auth.v1beta1.QueryAccountInfoResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("cosmos/auth/v1beta1/query.proto", fileDescriptor_c451370b3929a27c) }
|
||||
|
||||
var fileDescriptor_c451370b3929a27c = []byte{
|
||||
// 902 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x95, 0xcf, 0x6f, 0x1b, 0x45,
|
||||
0x14, 0xc7, 0xbd, 0x29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0x91, 0xa9, 0x9e, 0x32, 0x5d,
|
||||
0x23, 0x55, 0x29, 0x93, 0xf0, 0x50, 0xf2, 0xb3, 0x02, 0x79, 0x3f, 0x62, 0xc4, 0x9c, 0x5f, 0x46,
|
||||
0xea, 0xec, 0xea, 0xad, 0xe2, 0x09, 0xc8, 0xd7, 0x4c, 0xf9, 0x6e, 0x92, 0xb7, 0xa5, 0x7c, 0x03,
|
||||
0x9e, 0xd9, 0x4b, 0xee, 0xdf, 0x33, 0x05, 0xca, 0x59, 0x17, 0x9c, 0x73, 0x09, 0x25, 0xfe, 0x39,
|
||||
0xe7, 0x12, 0xca, 0x2c, 0xb5, 0x48, 0xe3, 0x84, 0xbb, 0xce, 0x2e, 0x5e, 0x45, 0x66, 0x8a, 0x44,
|
||||
0xde, 0x8d, 0x05, 0x1e, 0xac, 0x36, 0x2f, 0x90, 0x81, 0x9c, 0xef, 0xa7, 0x9c, 0x0d, 0xf2, 0xee,
|
||||
0x02, 0xce, 0xe4, 0x55, 0x11, 0x66, 0x38, 0x25, 0xbf, 0xa5, 0xdc, 0x39, 0xff, 0x5c, 0xcc, 0x2d,
|
||||
0x33, 0xec, 0xc5, 0xdc, 0x52, 0x73, 0xd6, 0xef, 0xa4, 0xdc, 0x06, 0x79, 0xaf, 0x10, 0xb7, 0xf8,
|
||||
0x16, 0x4c, 0x3b, 0x77, 0x9f, 0x9f, 0x6a, 0xca, 0xcb, 0x53, 0x4d, 0xf9, 0xfb, 0x54, 0x53, 0xbe,
|
||||
0x3f, 0xd3, 0x4a, 0x2f, 0xcf, 0xb4, 0xd2, 0x9f, 0x67, 0x5a, 0xe9, 0xcb, 0x5d, 0x3f, 0x88, 0x8e,
|
||||
0xc6, 0x8e, 0xd1, 0xa7, 0x83, 0x58, 0x51, 0xfc, 0x34, 0x98, 0xfb, 0xb5, 0xf9, 0x58, 0xc8, 0x47,
|
||||
0x93, 0xa1, 0xc7, 0x9c, 0x55, 0xfe, 0x35, 0xde, 0xff, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x5f, 0xf3,
|
||||
0xd7, 0xc3, 0x0c, 0x0b, 0x00, 0x00,
|
||||
// 971 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0xcf, 0x6f, 0x1b, 0x45,
|
||||
0x14, 0xc7, 0xbd, 0x69, 0x49, 0xc2, 0x8b, 0x1b, 0xa4, 0x89, 0x2b, 0xc2, 0x3a, 0xb5, 0xa3, 0x2d,
|
||||
0x34, 0x4e, 0xa8, 0x77, 0x1b, 0x27, 0x07, 0x0a, 0x08, 0x29, 0x6e, 0x00, 0xe5, 0x50, 0xc9, 0x6c,
|
||||
0x73, 0xe2, 0x80, 0xb5, 0xf6, 0x6e, 0x36, 0x2b, 0x9a, 0x1d, 0xd7, 0xb3, 0x46, 0x8d, 0xaa, 0x5c,
|
||||
0x90, 0x90, 0x7a, 0xa9, 0x84, 0x04, 0x7f, 0x40, 0x0e, 0x88, 0x33, 0x87, 0xc0, 0x95, 0x6b, 0xd5,
|
||||
0x53, 0x04, 0x17, 0x4e, 0x08, 0x25, 0x48, 0xf0, 0x67, 0x20, 0xcf, 0xbc, 0xd9, 0x1f, 0xc9, 0xd8,
|
||||
0xde, 0x88, 0x53, 0xbc, 0x33, 0xef, 0x7d, 0xdf, 0x67, 0xde, 0x7b, 0xf3, 0x26, 0x50, 0xed, 0x52,
|
||||
0x76, 0x40, 0x99, 0xe5, 0x0c, 0xa2, 0x7d, 0xeb, 0xab, 0xf5, 0x8e, 0x17, 0x39, 0xeb, 0xd6, 0x93,
|
||||
0x81, 0xd7, 0x3f, 0x34, 0x7b, 0x7d, 0x1a, 0x51, 0xb2, 0x20, 0x0c, 0xcc, 0xa1, 0x81, 0x89, 0x06,
|
||||
0xfa, 0x1a, 0x7a, 0x75, 0x1c, 0xe6, 0x09, 0xeb, 0xd8, 0xb7, 0xe7, 0xf8, 0x41, 0xe8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, 0x81, 0x44, 0xf8, 0x5e, 0x83, 0x19, 0x14, 0x20, 0xb5,
|
||||
0x89, 0x31, 0x24, 0xcd, 0x6a, 0x0e, 0x4b, 0x84, 0xd9, 0x4c, 0x60, 0x56, 0xc9, 0xca, 0x58, 0x18,
|
||||
0xeb, 0x19, 0x56, 0xe0, 0x88, 0xfc, 0xac, 0x01, 0xb9, 0xdc, 0x33, 0x64, 0x63, 0x62, 0xdc, 0xcb,
|
||||
0x3d, 0xa9, 0x6f, 0x5e, 0xcd, 0xe9, 0x0a, 0xdc, 0xf1, 0x85, 0x69, 0x07, 0xae, 0xf5, 0x2c, 0x70,
|
||||
0x8f, 0xc8, 0x37, 0x1a, 0x4c, 0x8b, 0x11, 0x48, 0x56, 0x46, 0x87, 0xcd, 0x0c, 0x49, 0xbd, 0x36,
|
||||
0xd9, 0x10, 0x99, 0x6a, 0x09, 0xd3, 0x2d, 0x52, 0x56, 0x32, 0x89, 0x21, 0x4f, 0x7e, 0xd4, 0x20,
|
||||
0x3b, 0x30, 0x19, 0xb1, 0x46, 0x87, 0x51, 0x3e, 0x3d, 0xfa, 0xbd, 0xfc, 0x0e, 0xc8, 0xb7, 0x9e,
|
||||
0xf0, 0xdd, 0x21, 0x6f, 0x2b, 0xf9, 0x0e, 0xb8, 0x67, 0x3b, 0xee, 0xbf, 0x17, 0x1a, 0x14, 0xd3,
|
||||
0x63, 0x7a, 0x44, 0x13, 0x2a, 0x06, 0xfc, 0x88, 0x26, 0x54, 0xcd, 0xfc, 0x3c, 0x89, 0x13, 0xe3,
|
||||
0x7f, 0xd8, 0x78, 0x25, 0xd5, 0xd4, 0x26, 0xea, 0x6c, 0x8c, 0x79, 0x24, 0xf4, 0xf5, 0x2b, 0x78,
|
||||
0x20, 0xe7, 0x7b, 0x09, 0x67, 0x9d, 0xbc, 0x3b, 0x86, 0x33, 0xbe, 0x2a, 0x62, 0x5a, 0x1f, 0x91,
|
||||
0x5f, 0x12, 0xee, 0xcc, 0x80, 0x1f, 0xcf, 0xad, 0x7a, 0x51, 0xc6, 0x73, 0x2b, 0x5f, 0x0f, 0xe3,
|
||||
0x7e, 0xc2, 0x6d, 0x92, 0xbb, 0xb9, 0xb8, 0xc5, 0x63, 0x75, 0x44, 0x7e, 0xd0, 0x60, 0x2e, 0x35,
|
||||
0x68, 0xc9, 0xdd, 0x89, 0xb7, 0x35, 0x35, 0xde, 0xf5, 0x7a, 0x4e, 0xeb, 0xfc, 0xf9, 0x95, 0x6f,
|
||||
0xd1, 0x70, 0x6e, 0x27, 0x03, 0xa9, 0xf9, 0xe0, 0xe5, 0x59, 0x45, 0x3b, 0x3d, 0xab, 0x68, 0x7f,
|
||||
0x9d, 0x55, 0xb4, 0x6f, 0xcf, 0x2b, 0x85, 0xd3, 0xf3, 0x4a, 0xe1, 0x8f, 0xf3, 0x4a, 0xe1, 0xf3,
|
||||
0x55, 0x3f, 0x88, 0xf6, 0x07, 0x1d, 0xb3, 0x4b, 0x0f, 0xa4, 0xa0, 0xf8, 0x53, 0x67, 0xee, 0x97,
|
||||
0xd6, 0x53, 0xa1, 0x1e, 0x1d, 0xf6, 0x3c, 0xd6, 0x99, 0xe6, 0xff, 0xd5, 0x6c, 0xfc, 0x17, 0x00,
|
||||
0x00, 0xff, 0xff, 0x83, 0xfa, 0x46, 0x09, 0x54, 0x0c, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -875,6 +973,10 @@ type QueryClient interface {
|
||||
//
|
||||
// Since: cosmos-sdk 0.46
|
||||
AddressStringToBytes(ctx context.Context, in *AddressStringToBytesRequest, opts ...grpc.CallOption) (*AddressStringToBytesResponse, error)
|
||||
// AccountInfo queries account info which is common to all account types.
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
AccountInfo(ctx context.Context, in *QueryAccountInfoRequest, opts ...grpc.CallOption) (*QueryAccountInfoResponse, error)
|
||||
}
|
||||
|
||||
type queryClient struct {
|
||||
@ -957,6 +1059,15 @@ func (c *queryClient) AddressStringToBytes(ctx context.Context, in *AddressStrin
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) AccountInfo(ctx context.Context, in *QueryAccountInfoRequest, opts ...grpc.CallOption) (*QueryAccountInfoResponse, error) {
|
||||
out := new(QueryAccountInfoResponse)
|
||||
err := c.cc.Invoke(ctx, "/cosmos.auth.v1beta1.Query/AccountInfo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
type QueryServer interface {
|
||||
// Accounts returns all the existing accounts
|
||||
@ -985,6 +1096,10 @@ type QueryServer interface {
|
||||
//
|
||||
// Since: cosmos-sdk 0.46
|
||||
AddressStringToBytes(context.Context, *AddressStringToBytesRequest) (*AddressStringToBytesResponse, error)
|
||||
// AccountInfo queries account info which is common to all account types.
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
AccountInfo(context.Context, *QueryAccountInfoRequest) (*QueryAccountInfoResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
|
||||
@ -1015,6 +1130,9 @@ func (*UnimplementedQueryServer) AddressBytesToString(ctx context.Context, req *
|
||||
func (*UnimplementedQueryServer) AddressStringToBytes(ctx context.Context, req *AddressStringToBytesRequest) (*AddressStringToBytesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddressStringToBytes not implemented")
|
||||
}
|
||||
func (*UnimplementedQueryServer) AccountInfo(ctx context.Context, req *QueryAccountInfoRequest) (*QueryAccountInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AccountInfo not implemented")
|
||||
}
|
||||
|
||||
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
|
||||
s.RegisterService(&_Query_serviceDesc, srv)
|
||||
@ -1164,6 +1282,24 @@ func _Query_AddressStringToBytes_Handler(srv interface{}, ctx context.Context, d
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_AccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryAccountInfoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).AccountInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/cosmos.auth.v1beta1.Query/AccountInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).AccountInfo(ctx, req.(*QueryAccountInfoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Query_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cosmos.auth.v1beta1.Query",
|
||||
HandlerType: (*QueryServer)(nil),
|
||||
@ -1200,6 +1336,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "AddressStringToBytes",
|
||||
Handler: _Query_AddressStringToBytes_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AccountInfo",
|
||||
Handler: _Query_AccountInfo_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cosmos/auth/v1beta1/query.proto",
|
||||
@ -1701,6 +1841,71 @@ func (m *QueryAccountAddressByIDResponse) MarshalToSizedBuffer(dAtA []byte) (int
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryAccountInfoRequest) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *QueryAccountInfoRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryAccountInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Address) > 0 {
|
||||
i -= len(m.Address)
|
||||
copy(dAtA[i:], m.Address)
|
||||
i = encodeVarintQuery(dAtA, i, uint64(len(m.Address)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryAccountInfoResponse) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *QueryAccountInfoResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryAccountInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Info != nil {
|
||||
{
|
||||
size, err := m.Info.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintQuery(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovQuery(v)
|
||||
base := offset
|
||||
@ -1913,6 +2118,32 @@ func (m *QueryAccountAddressByIDResponse) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryAccountInfoRequest) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Address)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryAccountInfoResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Info != nil {
|
||||
l = m.Info.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func sovQuery(x uint64) (n int) {
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
}
|
||||
@ -3175,6 +3406,174 @@ func (m *QueryAccountAddressByIDResponse) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *QueryAccountInfoRequest) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 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 fmt.Errorf("proto: QueryAccountInfoRequest: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryAccountInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Address = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *QueryAccountInfoResponse) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 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 fmt.Errorf("proto: QueryAccountInfoResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryAccountInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Info == nil {
|
||||
m.Info = &BaseAccount{}
|
||||
}
|
||||
if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipQuery(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
||||
@ -339,6 +339,60 @@ func local_request_Query_AddressStringToBytes_0(ctx context.Context, marshaler r
|
||||
|
||||
}
|
||||
|
||||
func request_Query_AccountInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryAccountInfoRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["address"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address")
|
||||
}
|
||||
|
||||
protoReq.Address, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err)
|
||||
}
|
||||
|
||||
msg, err := client.AccountInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Query_AccountInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryAccountInfoRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["address"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address")
|
||||
}
|
||||
|
||||
protoReq.Address, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err)
|
||||
}
|
||||
|
||||
msg, err := server.AccountInfo(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
|
||||
// UnaryRPC :call QueryServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
@ -529,6 +583,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_AccountInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_AccountInfo_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Query_AccountInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -730,6 +807,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_AccountInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Query_AccountInfo_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Query_AccountInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -749,6 +846,8 @@ var (
|
||||
pattern_Query_AddressBytesToString_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "auth", "v1beta1", "bech32", "address_bytes"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_AddressStringToBytes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "auth", "v1beta1", "bech32", "address_string"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_AccountInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "auth", "v1beta1", "account_info", "address"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
)
|
||||
|
||||
var (
|
||||
@ -767,4 +866,6 @@ var (
|
||||
forward_Query_AddressBytesToString_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_AddressStringToBytes_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_AccountInfo_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user