diff --git a/changelog.md b/changelog.md index 0e08931d37..598ce8dd6a 100644 --- a/changelog.md +++ b/changelog.md @@ -24,6 +24,7 @@ * [2289](https://github.com/zeta-chain/node/pull/2289) - add an authorization list to keep track of all authorizations on the chain * [2305](https://github.com/zeta-chain/node/pull/2305) - add new messages `MsgAddAuthorization` and `MsgRemoveAuthorization` that can be used to update the authorization list * [2313](https://github.com/zeta-chain/node/pull/2313) - add `CheckAuthorization` function to replace the `IsAuthorized` function. The new function uses the authorization list to verify the signer's authorization. +* [2312](https://github.com/zeta-chain/node/pull/2312) - add queries `ShowAuthorization` and `ListAuthorizations` ### Refactor diff --git a/docs/cli/zetacored/zetacored_query_authority.md b/docs/cli/zetacored/zetacored_query_authority.md index f1e6bd9b69..75265b3195 100644 --- a/docs/cli/zetacored/zetacored_query_authority.md +++ b/docs/cli/zetacored/zetacored_query_authority.md @@ -26,6 +26,8 @@ zetacored query authority [flags] ### SEE ALSO * [zetacored query](zetacored_query.md) - Querying subcommands +* [zetacored query authority list-authorizations](zetacored_query_authority_list-authorizations.md) - lists all authorizations +* [zetacored query authority show-authorization](zetacored_query_authority_show-authorization.md) - shows the authorization for a given message URL * [zetacored query authority show-chain-info](zetacored_query_authority_show-chain-info.md) - show the chain info * [zetacored query authority show-policies](zetacored_query_authority_show-policies.md) - show the policies diff --git a/docs/cli/zetacored/zetacored_query_authority_list-authorizations.md b/docs/cli/zetacored/zetacored_query_authority_list-authorizations.md new file mode 100644 index 0000000000..32443ff20c --- /dev/null +++ b/docs/cli/zetacored/zetacored_query_authority_list-authorizations.md @@ -0,0 +1,34 @@ +# query authority list-authorizations + +lists all authorizations + +``` +zetacored query authority list-authorizations [flags] +``` + +### Options + +``` + --grpc-addr string the gRPC endpoint to use for this chain + --grpc-insecure allow gRPC over insecure channels, if not TLS the server must use TLS + --height int Use a specific height to query state at (this can error if the node is pruning state) + -h, --help help for list-authorizations + --node string [host]:[port] to Tendermint RPC interface for this chain + -o, --output string Output format (text|json) +``` + +### Options inherited from parent commands + +``` + --chain-id string The network chain ID + --home string directory for config and data + --log_format string The logging format (json|plain) + --log_level string The logging level (trace|debug|info|warn|error|fatal|panic) + --log_no_color Disable colored logs + --trace print out full stack trace on errors +``` + +### SEE ALSO + +* [zetacored query authority](zetacored_query_authority.md) - Querying commands for the authority module + diff --git a/docs/cli/zetacored/zetacored_query_authority_show-authorization.md b/docs/cli/zetacored/zetacored_query_authority_show-authorization.md new file mode 100644 index 0000000000..336129f1a1 --- /dev/null +++ b/docs/cli/zetacored/zetacored_query_authority_show-authorization.md @@ -0,0 +1,34 @@ +# query authority show-authorization + +shows the authorization for a given message URL + +``` +zetacored query authority show-authorization [msg-url] [flags] +``` + +### Options + +``` + --grpc-addr string the gRPC endpoint to use for this chain + --grpc-insecure allow gRPC over insecure channels, if not TLS the server must use TLS + --height int Use a specific height to query state at (this can error if the node is pruning state) + -h, --help help for show-authorization + --node string [host]:[port] to Tendermint RPC interface for this chain + -o, --output string Output format (text|json) +``` + +### Options inherited from parent commands + +``` + --chain-id string The network chain ID + --home string directory for config and data + --log_format string The logging format (json|plain) + --log_level string The logging level (trace|debug|info|warn|error|fatal|panic) + --log_no_color Disable colored logs + --trace print out full stack trace on errors +``` + +### SEE ALSO + +* [zetacored query authority](zetacored_query_authority.md) - Querying commands for the authority module + diff --git a/docs/openapi/openapi.swagger.yaml b/docs/openapi/openapi.swagger.yaml index 8bb38c8a67..ac40f0b45a 100644 --- a/docs/openapi/openapi.swagger.yaml +++ b/docs/openapi/openapi.swagger.yaml @@ -28254,6 +28254,39 @@ paths: type: boolean tags: - Query + /zeta-chain/authority/authorization/{msg_url}: + get: + operationId: Query_Authorization + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/authorityQueryAuthorizationResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: msg_url + in: path + required: true + type: string + tags: + - Query + /zeta-chain/authority/authorizations: + get: + operationId: Query_AuthorizationList + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/authorityQueryAuthorizationListResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + tags: + - Query /zeta-chain/authority/chainInfo: get: summary: Queries ChainInfo @@ -56718,6 +56751,27 @@ definitions: format: int64 balance: type: string + authorityAuthorization: + type: object + properties: + msg_url: + type: string + title: The URL of the message that needs to be authorized + authorized_policy: + $ref: '#/definitions/authorityPolicyType' + title: The policy that is authorized to access the message + title: |- + Authorization defines the authorization required to access use a message + which needs special permissions + authorityAuthorizationList: + type: object + properties: + authorizations: + type: array + items: + type: object + $ref: '#/definitions/authorityAuthorization' + title: AuthorizationList holds the list of authorizations on zetachain authorityChainInfo: type: object properties: @@ -56778,6 +56832,22 @@ definitions: Used for empty policy, no action is allowed title: PolicyType defines the type of policy + authorityQueryAuthorizationListResponse: + type: object + properties: + authorization_list: + $ref: '#/definitions/authorityAuthorizationList' + title: |- + QueryAuthorizationListResponse is the response type for the + Query/AuthorizationList RPC + authorityQueryAuthorizationResponse: + type: object + properties: + authorization: + $ref: '#/definitions/authorityAuthorization' + description: |- + QueryAuthorizationResponse is the response type for the Query/Authorization + RPC method. authorityQueryGetChainInfoResponse: type: object properties: diff --git a/proto/zetachain/zetacore/authority/query.proto b/proto/zetachain/zetacore/authority/query.proto index c5cb89d47a..33431783a0 100644 --- a/proto/zetachain/zetacore/authority/query.proto +++ b/proto/zetachain/zetacore/authority/query.proto @@ -3,6 +3,7 @@ package zetachain.zetacore.authority; import "zetachain/zetacore/authority/policies.proto"; import "zetachain/zetacore/authority/chain_info.proto"; +import "zetachain/zetacore/authority/authorization.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; @@ -20,6 +21,36 @@ service Query { rpc ChainInfo(QueryGetChainInfoRequest) returns (QueryGetChainInfoResponse) { option (google.api.http).get = "/zeta-chain/authority/chainInfo"; } + + rpc AuthorizationList(QueryAuthorizationListRequest) + returns (QueryAuthorizationListResponse) { + option (google.api.http).get = "/zeta-chain/authority/authorizations"; + } + + rpc Authorization(QueryAuthorizationRequest) + returns (QueryAuthorizationResponse) { + option (google.api.http).get = + "/zeta-chain/authority/authorization/{msg_url}"; + } +} + +// QueryAuthorizationListRequest is the request type for the +// Query/AuthorizationList RPC method. +message QueryAuthorizationListRequest {} +// QueryAuthorizationListResponse is the response type for the +// Query/AuthorizationList RPC +message QueryAuthorizationListResponse { + AuthorizationList authorization_list = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryAuthorizationRequest is the request type for the Query/Authorization RPC +// method. +message QueryAuthorizationRequest { string msg_url = 1; } + +// QueryAuthorizationResponse is the response type for the Query/Authorization +// RPC method. +message QueryAuthorizationResponse { + Authorization authorization = 1 [ (gogoproto.nullable) = false ]; } // QueryGetPoliciesRequest is the request type for the Query/Policies RPC diff --git a/typescript/zetachain/zetacore/authority/query_pb.d.ts b/typescript/zetachain/zetacore/authority/query_pb.d.ts index 13192f4592..df4d0e5c9e 100644 --- a/typescript/zetachain/zetacore/authority/query_pb.d.ts +++ b/typescript/zetachain/zetacore/authority/query_pb.d.ts @@ -5,9 +5,113 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3 } from "@bufbuild/protobuf"; +import type { Authorization, AuthorizationList } from "./authorization_pb.js"; import type { Policies } from "./policies_pb.js"; import type { ChainInfo } from "./chain_info_pb.js"; +/** + * QueryAuthorizationListRequest is the request type for the + * Query/AuthorizationList RPC method. + * + * @generated from message zetachain.zetacore.authority.QueryAuthorizationListRequest + */ +export declare class QueryAuthorizationListRequest extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "zetachain.zetacore.authority.QueryAuthorizationListRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryAuthorizationListRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryAuthorizationListRequest; + + static fromJsonString(jsonString: string, options?: Partial): QueryAuthorizationListRequest; + + static equals(a: QueryAuthorizationListRequest | PlainMessage | undefined, b: QueryAuthorizationListRequest | PlainMessage | undefined): boolean; +} + +/** + * QueryAuthorizationListResponse is the response type for the + * Query/AuthorizationList RPC + * + * @generated from message zetachain.zetacore.authority.QueryAuthorizationListResponse + */ +export declare class QueryAuthorizationListResponse extends Message { + /** + * @generated from field: zetachain.zetacore.authority.AuthorizationList authorization_list = 1; + */ + authorizationList?: AuthorizationList; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "zetachain.zetacore.authority.QueryAuthorizationListResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryAuthorizationListResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryAuthorizationListResponse; + + static fromJsonString(jsonString: string, options?: Partial): QueryAuthorizationListResponse; + + static equals(a: QueryAuthorizationListResponse | PlainMessage | undefined, b: QueryAuthorizationListResponse | PlainMessage | undefined): boolean; +} + +/** + * QueryAuthorizationRequest is the request type for the Query/Authorization RPC + * method. + * + * @generated from message zetachain.zetacore.authority.QueryAuthorizationRequest + */ +export declare class QueryAuthorizationRequest extends Message { + /** + * @generated from field: string msg_url = 1; + */ + msgUrl: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "zetachain.zetacore.authority.QueryAuthorizationRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryAuthorizationRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryAuthorizationRequest; + + static fromJsonString(jsonString: string, options?: Partial): QueryAuthorizationRequest; + + static equals(a: QueryAuthorizationRequest | PlainMessage | undefined, b: QueryAuthorizationRequest | PlainMessage | undefined): boolean; +} + +/** + * QueryAuthorizationResponse is the response type for the Query/Authorization + * RPC method. + * + * @generated from message zetachain.zetacore.authority.QueryAuthorizationResponse + */ +export declare class QueryAuthorizationResponse extends Message { + /** + * @generated from field: zetachain.zetacore.authority.Authorization authorization = 1; + */ + authorization?: Authorization; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "zetachain.zetacore.authority.QueryAuthorizationResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): QueryAuthorizationResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): QueryAuthorizationResponse; + + static fromJsonString(jsonString: string, options?: Partial): QueryAuthorizationResponse; + + static equals(a: QueryAuthorizationResponse | PlainMessage | undefined, b: QueryAuthorizationResponse | PlainMessage | undefined): boolean; +} + /** * QueryGetPoliciesRequest is the request type for the Query/Policies RPC * method. diff --git a/x/authority/client/cli/query.go b/x/authority/client/cli/query.go index ec6f965b7f..687158d917 100644 --- a/x/authority/client/cli/query.go +++ b/x/authority/client/cli/query.go @@ -23,6 +23,8 @@ func GetQueryCmd(_ string) *cobra.Command { cmd.AddCommand( CmdShowPolicies(), CmdShowChainInfo(), + CmdAuthorizationsList(), + CmdAuthorization(), ) return cmd diff --git a/x/authority/client/cli/query_authorization_list.go b/x/authority/client/cli/query_authorization_list.go new file mode 100644 index 0000000000..a822e9603b --- /dev/null +++ b/x/authority/client/cli/query_authorization_list.go @@ -0,0 +1,62 @@ +package cli + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" + + "github.com/zeta-chain/zetacore/x/authority/types" +) + +// CmdAuthorizationsList shows the list of authorizations +func CmdAuthorizationsList() *cobra.Command { + cmd := &cobra.Command{ + Use: "list-authorizations", + Short: "lists all authorizations", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, _ []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.AuthorizationList(context.Background(), &types.QueryAuthorizationListRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +// CmdAuthorization shows the authorization for a given message URL +func CmdAuthorization() *cobra.Command { + cmd := &cobra.Command{ + Use: "show-authorization [msg-url]", + Short: "shows the authorization for a given message URL", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + msgURL := args[0] + res, err := queryClient.Authorization(context.Background(), &types.QueryAuthorizationRequest{ + MsgUrl: msgURL, + }) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + return cmd +} diff --git a/x/authority/keeper/grpc_query_authorization_list.go b/x/authority/keeper/grpc_query_authorization_list.go new file mode 100644 index 0000000000..34c3f89708 --- /dev/null +++ b/x/authority/keeper/grpc_query_authorization_list.go @@ -0,0 +1,58 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/zeta-chain/zetacore/x/authority/types" +) + +// AuthorizationList returns the list of authorizations +func (k Keeper) AuthorizationList(c context.Context, + req *types.QueryAuthorizationListRequest, +) (*types.QueryAuthorizationListResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(c) + + authorizationList, found := k.GetAuthorizationList(ctx) + if !found { + return nil, status.Error(codes.Internal, types.ErrAuthorizationListNotFound.Error()) + } + + return &types.QueryAuthorizationListResponse{AuthorizationList: authorizationList}, nil +} + +// Authorization returns the authorization for a given message URL +func (k Keeper) Authorization(c context.Context, + req *types.QueryAuthorizationRequest, +) (*types.QueryAuthorizationResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(c) + + err := types.ValidateMsgURL(req.MsgUrl) + if err != nil { + return nil, err + } + + authorizationList, found := k.GetAuthorizationList(ctx) + if !found { + return nil, status.Error(codes.Internal, types.ErrAuthorizationListNotFound.Error()) + } + + authorization, err := authorizationList.GetAuthorizedPolicy(req.MsgUrl) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryAuthorizationResponse{Authorization: types.Authorization{ + MsgUrl: req.MsgUrl, + AuthorizedPolicy: authorization, + }}, nil +} diff --git a/x/authority/keeper/grpc_query_authothorization_list_test.go b/x/authority/keeper/grpc_query_authothorization_list_test.go new file mode 100644 index 0000000000..47148309c5 --- /dev/null +++ b/x/authority/keeper/grpc_query_authothorization_list_test.go @@ -0,0 +1,161 @@ +package keeper_test + +import ( + "testing" + + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + keepertest "github.com/zeta-chain/zetacore/testutil/keeper" + "github.com/zeta-chain/zetacore/x/authority/keeper" + "github.com/zeta-chain/zetacore/x/authority/types" +) + +func TestKeeper_Authorization(t *testing.T) { + k, ctx := keepertest.AuthorityKeeper(t) + authorizationList := types.AuthorizationList{Authorizations: []types.Authorization{ + { + MsgUrl: "ABC", + AuthorizedPolicy: types.PolicyType_groupOperational, + }, + { + MsgUrl: "DEF", + AuthorizedPolicy: types.PolicyType_groupAdmin, + }, + }} + + tt := []struct { + name string + setAuthorizationList bool + req *types.QueryAuthorizationRequest + expectedResponse *types.QueryAuthorizationResponse + expecterErrorString string + }{ + { + name: "successfully get authorization", + setAuthorizationList: true, + req: &types.QueryAuthorizationRequest{ + MsgUrl: "ABC", + }, + expectedResponse: &types.QueryAuthorizationResponse{ + Authorization: types.Authorization{ + MsgUrl: "ABC", + AuthorizedPolicy: types.PolicyType_groupOperational, + }, + }, + expecterErrorString: "", + }, + { + name: "invalid request", + setAuthorizationList: true, + req: nil, + expectedResponse: nil, + expecterErrorString: "invalid request", + }, + { + name: "invalid msg url", + setAuthorizationList: true, + req: &types.QueryAuthorizationRequest{ + MsgUrl: "", + }, + expectedResponse: nil, + expecterErrorString: "message URL cannot be empty", + }, + { + name: "authorization not found", + setAuthorizationList: true, + req: &types.QueryAuthorizationRequest{ + MsgUrl: "GHI", + }, + expectedResponse: nil, + expecterErrorString: "authorization not found", + }, + { + name: "authorization list not found", + setAuthorizationList: false, + req: &types.QueryAuthorizationRequest{ + MsgUrl: "ABC", + }, + expectedResponse: nil, + expecterErrorString: "authorization list not found", + }, + } + for _, tc := range tt { + t.Run(tc.name, func(t *testing.T) { + removeAuthorizationList(ctx, *k) + if tc.setAuthorizationList { + k.SetAuthorizationList(ctx, authorizationList) + } + response, err := k.Authorization(ctx, tc.req) + require.Equal(t, tc.expectedResponse, response) + if tc.expecterErrorString != "" { + require.ErrorContains(t, err, tc.expecterErrorString) + } + }) + } +} + +func TestKeeper_AuthorizationList(t *testing.T) { + k, ctx := keepertest.AuthorityKeeper(t) + authorizationList := types.AuthorizationList{Authorizations: []types.Authorization{ + { + MsgUrl: "ABC", + AuthorizedPolicy: types.PolicyType_groupOperational, + }, + { + MsgUrl: "DEF", + AuthorizedPolicy: types.PolicyType_groupAdmin, + }, + }} + tt := []struct { + name string + setAuthorizationList bool + req *types.QueryAuthorizationListRequest + expectedResponse *types.QueryAuthorizationListResponse + expecterErrorString string + }{ + { + name: "successfully get authorization list", + setAuthorizationList: true, + req: &types.QueryAuthorizationListRequest{}, + expectedResponse: &types.QueryAuthorizationListResponse{ + AuthorizationList: authorizationList, + }, + expecterErrorString: "", + }, + { + name: "invalid request", + setAuthorizationList: true, + req: nil, + expectedResponse: nil, + expecterErrorString: "invalid request", + }, + { + name: "authorization list not found", + setAuthorizationList: false, + req: &types.QueryAuthorizationListRequest{}, + expectedResponse: nil, + expecterErrorString: "authorization list not found", + }, + } + for _, tc := range tt { + t.Run(tc.name, func(t *testing.T) { + removeAuthorizationList(ctx, *k) + if tc.setAuthorizationList { + k.SetAuthorizationList(ctx, authorizationList) + } + response, err := k.AuthorizationList(ctx, tc.req) + require.Equal(t, tc.expectedResponse, response) + if tc.expecterErrorString != "" { + require.ErrorContains(t, err, tc.expecterErrorString) + } + }) + + } +} + +func removeAuthorizationList(ctx sdk.Context, k keeper.Keeper) { + store := prefix.NewStore(ctx.KVStore(k.GetStoreKey()), types.KeyPrefix(types.AuthorizationListKey)) + store.Delete([]byte{0}) +} diff --git a/x/authority/types/query.pb.go b/x/authority/types/query.pb.go index e9a4c227c3..ca13419203 100644 --- a/x/authority/types/query.pb.go +++ b/x/authority/types/query.pb.go @@ -30,6 +30,182 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// QueryAuthorizationListRequest is the request type for the +// Query/AuthorizationList RPC method. +type QueryAuthorizationListRequest struct { +} + +func (m *QueryAuthorizationListRequest) Reset() { *m = QueryAuthorizationListRequest{} } +func (m *QueryAuthorizationListRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAuthorizationListRequest) ProtoMessage() {} +func (*QueryAuthorizationListRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5fe6130bc825be8d, []int{0} +} +func (m *QueryAuthorizationListRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAuthorizationListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAuthorizationListRequest.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 *QueryAuthorizationListRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAuthorizationListRequest.Merge(m, src) +} +func (m *QueryAuthorizationListRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAuthorizationListRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAuthorizationListRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAuthorizationListRequest proto.InternalMessageInfo + +// QueryAuthorizationListResponse is the response type for the +// Query/AuthorizationList RPC +type QueryAuthorizationListResponse struct { + AuthorizationList AuthorizationList `protobuf:"bytes,1,opt,name=authorization_list,json=authorizationList,proto3" json:"authorization_list"` +} + +func (m *QueryAuthorizationListResponse) Reset() { *m = QueryAuthorizationListResponse{} } +func (m *QueryAuthorizationListResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAuthorizationListResponse) ProtoMessage() {} +func (*QueryAuthorizationListResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5fe6130bc825be8d, []int{1} +} +func (m *QueryAuthorizationListResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAuthorizationListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAuthorizationListResponse.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 *QueryAuthorizationListResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAuthorizationListResponse.Merge(m, src) +} +func (m *QueryAuthorizationListResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAuthorizationListResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAuthorizationListResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAuthorizationListResponse proto.InternalMessageInfo + +func (m *QueryAuthorizationListResponse) GetAuthorizationList() AuthorizationList { + if m != nil { + return m.AuthorizationList + } + return AuthorizationList{} +} + +// QueryAuthorizationRequest is the request type for the Query/Authorization RPC +// method. +type QueryAuthorizationRequest struct { + MsgUrl string `protobuf:"bytes,1,opt,name=msg_url,json=msgUrl,proto3" json:"msg_url,omitempty"` +} + +func (m *QueryAuthorizationRequest) Reset() { *m = QueryAuthorizationRequest{} } +func (m *QueryAuthorizationRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAuthorizationRequest) ProtoMessage() {} +func (*QueryAuthorizationRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5fe6130bc825be8d, []int{2} +} +func (m *QueryAuthorizationRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAuthorizationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAuthorizationRequest.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 *QueryAuthorizationRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAuthorizationRequest.Merge(m, src) +} +func (m *QueryAuthorizationRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAuthorizationRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAuthorizationRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAuthorizationRequest proto.InternalMessageInfo + +func (m *QueryAuthorizationRequest) GetMsgUrl() string { + if m != nil { + return m.MsgUrl + } + return "" +} + +// QueryAuthorizationResponse is the response type for the Query/Authorization +// RPC method. +type QueryAuthorizationResponse struct { + Authorization Authorization `protobuf:"bytes,1,opt,name=authorization,proto3" json:"authorization"` +} + +func (m *QueryAuthorizationResponse) Reset() { *m = QueryAuthorizationResponse{} } +func (m *QueryAuthorizationResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAuthorizationResponse) ProtoMessage() {} +func (*QueryAuthorizationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5fe6130bc825be8d, []int{3} +} +func (m *QueryAuthorizationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAuthorizationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAuthorizationResponse.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 *QueryAuthorizationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAuthorizationResponse.Merge(m, src) +} +func (m *QueryAuthorizationResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAuthorizationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAuthorizationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAuthorizationResponse proto.InternalMessageInfo + +func (m *QueryAuthorizationResponse) GetAuthorization() Authorization { + if m != nil { + return m.Authorization + } + return Authorization{} +} + // QueryGetPoliciesRequest is the request type for the Query/Policies RPC // method. type QueryGetPoliciesRequest struct { @@ -39,7 +215,7 @@ func (m *QueryGetPoliciesRequest) Reset() { *m = QueryGetPoliciesRequest func (m *QueryGetPoliciesRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetPoliciesRequest) ProtoMessage() {} func (*QueryGetPoliciesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5fe6130bc825be8d, []int{0} + return fileDescriptor_5fe6130bc825be8d, []int{4} } func (m *QueryGetPoliciesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +254,7 @@ func (m *QueryGetPoliciesResponse) Reset() { *m = QueryGetPoliciesRespon func (m *QueryGetPoliciesResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetPoliciesResponse) ProtoMessage() {} func (*QueryGetPoliciesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5fe6130bc825be8d, []int{1} + return fileDescriptor_5fe6130bc825be8d, []int{5} } func (m *QueryGetPoliciesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -123,7 +299,7 @@ func (m *QueryGetChainInfoRequest) Reset() { *m = QueryGetChainInfoReque func (m *QueryGetChainInfoRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetChainInfoRequest) ProtoMessage() {} func (*QueryGetChainInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5fe6130bc825be8d, []int{2} + return fileDescriptor_5fe6130bc825be8d, []int{6} } func (m *QueryGetChainInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +338,7 @@ func (m *QueryGetChainInfoResponse) Reset() { *m = QueryGetChainInfoResp func (m *QueryGetChainInfoResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetChainInfoResponse) ProtoMessage() {} func (*QueryGetChainInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5fe6130bc825be8d, []int{3} + return fileDescriptor_5fe6130bc825be8d, []int{7} } func (m *QueryGetChainInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -199,6 +375,10 @@ func (m *QueryGetChainInfoResponse) GetChainInfo() ChainInfo { } func init() { + proto.RegisterType((*QueryAuthorizationListRequest)(nil), "zetachain.zetacore.authority.QueryAuthorizationListRequest") + proto.RegisterType((*QueryAuthorizationListResponse)(nil), "zetachain.zetacore.authority.QueryAuthorizationListResponse") + proto.RegisterType((*QueryAuthorizationRequest)(nil), "zetachain.zetacore.authority.QueryAuthorizationRequest") + proto.RegisterType((*QueryAuthorizationResponse)(nil), "zetachain.zetacore.authority.QueryAuthorizationResponse") proto.RegisterType((*QueryGetPoliciesRequest)(nil), "zetachain.zetacore.authority.QueryGetPoliciesRequest") proto.RegisterType((*QueryGetPoliciesResponse)(nil), "zetachain.zetacore.authority.QueryGetPoliciesResponse") proto.RegisterType((*QueryGetChainInfoRequest)(nil), "zetachain.zetacore.authority.QueryGetChainInfoRequest") @@ -210,33 +390,43 @@ func init() { } var fileDescriptor_5fe6130bc825be8d = []byte{ - // 403 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0xcf, 0xd2, 0x40, - 0x10, 0xc6, 0x5b, 0xa2, 0x06, 0xd6, 0xdb, 0xc6, 0x44, 0x68, 0x48, 0xc1, 0x1e, 0x80, 0x68, 0xe8, - 0x0a, 0x46, 0xbd, 0xe3, 0xc1, 0x3f, 0xf1, 0xa0, 0x1c, 0xbd, 0x98, 0x6d, 0x5d, 0xca, 0x26, 0xb0, - 0x53, 0xba, 0x5b, 0x23, 0x1e, 0xfd, 0x04, 0x26, 0x7e, 0x02, 0x0f, 0x7e, 0x17, 0x8e, 0x24, 0x5c, - 0x3c, 0x19, 0x03, 0x7e, 0x10, 0xc3, 0x76, 0x5b, 0xc8, 0x0b, 0x6f, 0xf3, 0x72, 0x9b, 0xec, 0x3c, - 0xf3, 0xcc, 0x6f, 0x26, 0xb3, 0xa8, 0xf7, 0x95, 0x29, 0x1a, 0x4e, 0x29, 0x17, 0x44, 0x47, 0x90, - 0x30, 0x42, 0x53, 0x35, 0x85, 0x84, 0xab, 0x25, 0x59, 0xa4, 0x2c, 0x59, 0xfa, 0x71, 0x02, 0x0a, - 0x70, 0xb3, 0x50, 0xfa, 0xb9, 0xd2, 0x2f, 0x94, 0xce, 0xa3, 0x52, 0x9f, 0x18, 0x66, 0x3c, 0xe4, - 0x4c, 0x66, 0x56, 0x4e, 0xbf, 0x54, 0xac, 0x13, 0x1f, 0xb9, 0x98, 0x80, 0x91, 0x3f, 0x0c, 0x41, - 0xce, 0x41, 0x92, 0x80, 0x4a, 0x96, 0x21, 0x91, 0xcf, 0x83, 0x80, 0x29, 0x3a, 0x20, 0x31, 0x8d, - 0xb8, 0xa0, 0x8a, 0x83, 0x30, 0xda, 0x7b, 0x11, 0x44, 0xa0, 0x43, 0xb2, 0x8f, 0xcc, 0x6b, 0x33, - 0x02, 0x88, 0x66, 0x8c, 0xd0, 0x98, 0x13, 0x2a, 0x04, 0x28, 0x5d, 0x62, 0x70, 0xbc, 0x06, 0xba, - 0xff, 0x7e, 0xef, 0xfa, 0x92, 0xa9, 0x77, 0x06, 0x74, 0xcc, 0x16, 0x29, 0x93, 0xca, 0xfb, 0x84, - 0xea, 0xa7, 0x29, 0x19, 0x83, 0x90, 0x0c, 0xbf, 0x42, 0xd5, 0x7c, 0xae, 0xba, 0xdd, 0xb6, 0x7b, - 0x77, 0x87, 0x1d, 0xbf, 0x6c, 0x47, 0x7e, 0xee, 0x30, 0xba, 0xb5, 0xfa, 0xd3, 0xb2, 0xc6, 0x45, - 0xb5, 0xe7, 0x1c, 0xba, 0xbc, 0xd8, 0x17, 0xbf, 0x16, 0x13, 0xc8, 0x09, 0x38, 0x6a, 0x9c, 0xc9, - 0x19, 0x84, 0xb7, 0x08, 0x1d, 0xb6, 0x65, 0x20, 0xba, 0xe5, 0x10, 0x85, 0x89, 0xa1, 0xa8, 0x85, - 0xf9, 0xc3, 0x70, 0x53, 0x41, 0xb7, 0x75, 0x2f, 0xfc, 0xd3, 0x46, 0xd5, 0x9c, 0x16, 0x3f, 0x2d, - 0x37, 0xbc, 0x66, 0x75, 0xce, 0xb3, 0x4b, 0xcb, 0xb2, 0x99, 0xbc, 0xce, 0xb7, 0xcd, 0xbf, 0x1f, - 0x95, 0x36, 0x76, 0xf5, 0x6d, 0xf4, 0xb3, 0x33, 0x39, 0x3d, 0x25, 0xfc, 0xcb, 0x46, 0xb5, 0x62, - 0x18, 0x7c, 0xc3, 0x6e, 0x57, 0xd7, 0xeb, 0x3c, 0xbf, 0xb8, 0xce, 0x60, 0x76, 0x35, 0xe6, 0x03, - 0xdc, 0x3a, 0x8f, 0x59, 0x6c, 0x75, 0xf4, 0x66, 0xb5, 0x75, 0xed, 0xf5, 0xd6, 0xb5, 0xff, 0x6e, - 0x5d, 0xfb, 0xfb, 0xce, 0xb5, 0xd6, 0x3b, 0xd7, 0xfa, 0xbd, 0x73, 0xad, 0x0f, 0x8f, 0x23, 0xae, - 0xa6, 0x69, 0xe0, 0x87, 0x30, 0x3f, 0x36, 0x29, 0xbe, 0xc4, 0x97, 0x23, 0x3f, 0xb5, 0x8c, 0x99, - 0x0c, 0xee, 0xe8, 0x83, 0x7d, 0xf2, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xc1, 0xd1, 0x6c, 0x32, 0xb6, - 0x03, 0x00, 0x00, + // 573 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x6b, 0x13, 0x41, + 0x18, 0xc6, 0x33, 0x62, 0x6b, 0x33, 0xd2, 0x43, 0x07, 0xa1, 0xed, 0x52, 0x37, 0x75, 0x91, 0xb4, + 0x58, 0xb3, 0xd3, 0x56, 0x6b, 0x05, 0xbd, 0x58, 0x0f, 0xfe, 0xa1, 0x07, 0x0d, 0x88, 0xe0, 0x25, + 0x4c, 0xd2, 0xe9, 0x66, 0x20, 0xd9, 0xd9, 0xee, 0xcc, 0x8a, 0xa9, 0x78, 0xf1, 0xe0, 0x59, 0xf0, + 0x13, 0x78, 0xf0, 0x43, 0x08, 0x7e, 0x80, 0x9e, 0xa4, 0xe0, 0xc5, 0x93, 0x48, 0xe2, 0x07, 0x91, + 0x4c, 0xde, 0xdd, 0x66, 0x9b, 0x64, 0xc9, 0xf6, 0x36, 0xcc, 0xbc, 0xcf, 0xf3, 0xfc, 0xe6, 0x65, + 0xde, 0xc1, 0xeb, 0xc7, 0x5c, 0xb3, 0x46, 0x93, 0x09, 0x9f, 0x9a, 0x95, 0x0c, 0x39, 0x65, 0x91, + 0x6e, 0xca, 0x50, 0xe8, 0x0e, 0x3d, 0x8a, 0x78, 0xd8, 0x71, 0x83, 0x50, 0x6a, 0x49, 0x56, 0x92, + 0x4a, 0x37, 0xae, 0x74, 0x93, 0x4a, 0x6b, 0x23, 0xd3, 0x27, 0x90, 0x2d, 0xd1, 0x10, 0x5c, 0x0d, + 0xac, 0xac, 0x4a, 0x66, 0xb1, 0x39, 0xa8, 0x09, 0xff, 0x50, 0x42, 0xf9, 0x66, 0x66, 0x39, 0xac, + 0x8e, 0x99, 0x16, 0xd2, 0x07, 0xc5, 0xad, 0x86, 0x54, 0x6d, 0xa9, 0x68, 0x9d, 0x29, 0x3e, 0xb8, + 0x04, 0x7d, 0xbb, 0x55, 0xe7, 0x9a, 0x6d, 0xd1, 0x80, 0x79, 0xc2, 0x1f, 0xae, 0xbd, 0xe6, 0x49, + 0x4f, 0x9a, 0x25, 0xed, 0xaf, 0x60, 0x77, 0xc5, 0x93, 0xd2, 0x6b, 0x71, 0xca, 0x02, 0x41, 0x99, + 0xef, 0x4b, 0x6d, 0x24, 0x70, 0x01, 0xa7, 0x84, 0xaf, 0xbf, 0xec, 0xbb, 0x3e, 0x1a, 0xce, 0xde, + 0x17, 0x4a, 0x57, 0xf9, 0x51, 0xc4, 0x95, 0x76, 0x3e, 0x21, 0x6c, 0x4f, 0xaa, 0x50, 0x81, 0xf4, + 0x15, 0x27, 0x07, 0x98, 0xa4, 0xd0, 0x6b, 0x2d, 0xa1, 0xf4, 0x12, 0x5a, 0x45, 0xeb, 0x57, 0xb7, + 0xa9, 0x9b, 0xd5, 0x6c, 0x77, 0xc4, 0x74, 0xef, 0xf2, 0xc9, 0x9f, 0x52, 0xa1, 0xba, 0xc0, 0xce, + 0x1f, 0x38, 0x77, 0xf1, 0xf2, 0x28, 0x07, 0x50, 0x92, 0x45, 0x7c, 0xa5, 0xad, 0xbc, 0x5a, 0x14, + 0xb6, 0x4c, 0x6e, 0xb1, 0x3a, 0xdb, 0x56, 0xde, 0xab, 0xb0, 0xe5, 0x44, 0xd8, 0x1a, 0xa7, 0x02, + 0xf2, 0xd7, 0x78, 0x3e, 0x15, 0x04, 0xd0, 0x1b, 0x39, 0xa0, 0x01, 0x38, 0xed, 0xe3, 0x2c, 0xe3, + 0x45, 0x13, 0xfb, 0x84, 0xeb, 0x17, 0xf0, 0x62, 0xe2, 0x86, 0x1e, 0xe0, 0xa5, 0xd1, 0x23, 0xe0, + 0x79, 0x8a, 0xe7, 0xe2, 0x07, 0x06, 0x28, 0xe5, 0x6c, 0x94, 0xd8, 0x01, 0x28, 0x12, 0xb5, 0x63, + 0x9d, 0xa5, 0x3c, 0xee, 0x8b, 0x9f, 0xf9, 0x87, 0x32, 0x26, 0x10, 0xd0, 0xc9, 0xf4, 0x19, 0x20, + 0xec, 0x63, 0x7c, 0xf6, 0x6c, 0x01, 0x62, 0x2d, 0x1b, 0x22, 0x31, 0x01, 0x8a, 0x62, 0x23, 0xde, + 0xd8, 0xfe, 0x39, 0x83, 0x67, 0x4c, 0x16, 0xf9, 0x8a, 0xf0, 0x5c, 0x4c, 0x4b, 0x76, 0xb2, 0x0d, + 0x27, 0xb4, 0xce, 0xba, 0x97, 0x57, 0x36, 0xb8, 0x93, 0x53, 0xfe, 0xf8, 0xeb, 0xdf, 0x97, 0x4b, + 0xab, 0xc4, 0x36, 0x53, 0x57, 0x19, 0x0c, 0xe0, 0xe8, 0x4c, 0x93, 0x6f, 0x08, 0x17, 0x93, 0xcb, + 0x90, 0x29, 0xd3, 0xce, 0xb7, 0xd7, 0xda, 0xcd, 0xad, 0x03, 0xcc, 0x35, 0x83, 0x79, 0x83, 0x94, + 0xc6, 0x63, 0x26, 0x5d, 0x25, 0x3f, 0x10, 0x5e, 0x18, 0x99, 0x1c, 0xf2, 0x60, 0x8a, 0xdc, 0x49, + 0x63, 0x6e, 0x3d, 0xbc, 0x98, 0x18, 0xc8, 0x6f, 0x1b, 0xf2, 0x32, 0xb9, 0x39, 0x9e, 0x3c, 0x35, + 0x1b, 0x8a, 0x7c, 0x47, 0x78, 0x3e, 0xe5, 0x45, 0x76, 0xf3, 0xa6, 0xc7, 0xd8, 0xf7, 0xf3, 0x0b, + 0x01, 0x79, 0xc7, 0x20, 0x53, 0x52, 0x99, 0x02, 0x99, 0xbe, 0x87, 0xcf, 0xe5, 0xc3, 0xde, 0xf3, + 0x93, 0xae, 0x8d, 0x4e, 0xbb, 0x36, 0xfa, 0xdb, 0xb5, 0xd1, 0xe7, 0x9e, 0x5d, 0x38, 0xed, 0xd9, + 0x85, 0xdf, 0x3d, 0xbb, 0xf0, 0x66, 0xd3, 0x13, 0xba, 0x19, 0xd5, 0xdd, 0x86, 0x6c, 0x0f, 0x5b, + 0x26, 0xff, 0xfc, 0xbb, 0x21, 0x77, 0xdd, 0x09, 0xb8, 0xaa, 0xcf, 0x9a, 0x2f, 0xf8, 0xce, 0xff, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x4f, 0xcd, 0x31, 0xbd, 0xba, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -255,6 +445,8 @@ type QueryClient interface { Policies(ctx context.Context, in *QueryGetPoliciesRequest, opts ...grpc.CallOption) (*QueryGetPoliciesResponse, error) // Queries ChainInfo ChainInfo(ctx context.Context, in *QueryGetChainInfoRequest, opts ...grpc.CallOption) (*QueryGetChainInfoResponse, error) + AuthorizationList(ctx context.Context, in *QueryAuthorizationListRequest, opts ...grpc.CallOption) (*QueryAuthorizationListResponse, error) + Authorization(ctx context.Context, in *QueryAuthorizationRequest, opts ...grpc.CallOption) (*QueryAuthorizationResponse, error) } type queryClient struct { @@ -283,12 +475,32 @@ func (c *queryClient) ChainInfo(ctx context.Context, in *QueryGetChainInfoReques return out, nil } +func (c *queryClient) AuthorizationList(ctx context.Context, in *QueryAuthorizationListRequest, opts ...grpc.CallOption) (*QueryAuthorizationListResponse, error) { + out := new(QueryAuthorizationListResponse) + err := c.cc.Invoke(ctx, "/zetachain.zetacore.authority.Query/AuthorizationList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Authorization(ctx context.Context, in *QueryAuthorizationRequest, opts ...grpc.CallOption) (*QueryAuthorizationResponse, error) { + out := new(QueryAuthorizationResponse) + err := c.cc.Invoke(ctx, "/zetachain.zetacore.authority.Query/Authorization", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Queries Policies Policies(context.Context, *QueryGetPoliciesRequest) (*QueryGetPoliciesResponse, error) // Queries ChainInfo ChainInfo(context.Context, *QueryGetChainInfoRequest) (*QueryGetChainInfoResponse, error) + AuthorizationList(context.Context, *QueryAuthorizationListRequest) (*QueryAuthorizationListResponse, error) + Authorization(context.Context, *QueryAuthorizationRequest) (*QueryAuthorizationResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -301,6 +513,12 @@ func (*UnimplementedQueryServer) Policies(ctx context.Context, req *QueryGetPoli func (*UnimplementedQueryServer) ChainInfo(ctx context.Context, req *QueryGetChainInfoRequest) (*QueryGetChainInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChainInfo not implemented") } +func (*UnimplementedQueryServer) AuthorizationList(ctx context.Context, req *QueryAuthorizationListRequest) (*QueryAuthorizationListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AuthorizationList not implemented") +} +func (*UnimplementedQueryServer) Authorization(ctx context.Context, req *QueryAuthorizationRequest) (*QueryAuthorizationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Authorization not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -342,6 +560,42 @@ func _Query_ChainInfo_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _Query_AuthorizationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAuthorizationListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AuthorizationList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/zetachain.zetacore.authority.Query/AuthorizationList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AuthorizationList(ctx, req.(*QueryAuthorizationListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Authorization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAuthorizationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Authorization(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/zetachain.zetacore.authority.Query/Authorization", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Authorization(ctx, req.(*QueryAuthorizationRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "zetachain.zetacore.authority.Query", HandlerType: (*QueryServer)(nil), @@ -354,11 +608,138 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ChainInfo", Handler: _Query_ChainInfo_Handler, }, + { + MethodName: "AuthorizationList", + Handler: _Query_AuthorizationList_Handler, + }, + { + MethodName: "Authorization", + Handler: _Query_Authorization_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "zetachain/zetacore/authority/query.proto", } +func (m *QueryAuthorizationListRequest) 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 *QueryAuthorizationListRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAuthorizationListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryAuthorizationListResponse) 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 *QueryAuthorizationListResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAuthorizationListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.AuthorizationList.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 (m *QueryAuthorizationRequest) 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 *QueryAuthorizationRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAuthorizationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MsgUrl) > 0 { + i -= len(m.MsgUrl) + copy(dAtA[i:], m.MsgUrl) + i = encodeVarintQuery(dAtA, i, uint64(len(m.MsgUrl))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAuthorizationResponse) 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 *QueryAuthorizationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAuthorizationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Authorization.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 (m *QueryGetPoliciesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -482,7 +863,7 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryGetPoliciesRequest) Size() (n int) { +func (m *QueryAuthorizationListRequest) Size() (n int) { if m == nil { return 0 } @@ -491,43 +872,385 @@ func (m *QueryGetPoliciesRequest) Size() (n int) { return n } -func (m *QueryGetPoliciesResponse) Size() (n int) { +func (m *QueryAuthorizationListResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.Policies.Size() + l = m.AuthorizationList.Size() n += 1 + l + sovQuery(uint64(l)) return n } -func (m *QueryGetChainInfoRequest) Size() (n int) { +func (m *QueryAuthorizationRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l + l = len(m.MsgUrl) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } return n } -func (m *QueryGetChainInfoResponse) Size() (n int) { +func (m *QueryAuthorizationResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.ChainInfo.Size() + l = m.Authorization.Size() n += 1 + l + sovQuery(uint64(l)) return n } -func sovQuery(x uint64) (n int) { +func (m *QueryGetPoliciesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryGetPoliciesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Policies.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGetChainInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryGetChainInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ChainInfo.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *QueryAuthorizationListRequest) 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: QueryAuthorizationListRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAuthorizationListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *QueryAuthorizationListResponse) 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: QueryAuthorizationListResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAuthorizationListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuthorizationList", 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 err := m.AuthorizationList.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 (m *QueryAuthorizationRequest) 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: QueryAuthorizationRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAuthorizationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgUrl", 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.MsgUrl = 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 *QueryAuthorizationResponse) 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: QueryAuthorizationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAuthorizationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authorization", 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 err := m.Authorization.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 (m *QueryGetPoliciesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/authority/types/query.pb.gw.go b/x/authority/types/query.pb.gw.go index f465e4750f..22988faa3b 100644 --- a/x/authority/types/query.pb.gw.go +++ b/x/authority/types/query.pb.gw.go @@ -69,6 +69,78 @@ func local_request_Query_ChainInfo_0(ctx context.Context, marshaler runtime.Mars } +func request_Query_AuthorizationList_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAuthorizationListRequest + var metadata runtime.ServerMetadata + + msg, err := client.AuthorizationList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AuthorizationList_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAuthorizationListRequest + var metadata runtime.ServerMetadata + + msg, err := server.AuthorizationList(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Authorization_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAuthorizationRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["msg_url"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "msg_url") + } + + protoReq.MsgUrl, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "msg_url", err) + } + + msg, err := client.Authorization(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Authorization_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAuthorizationRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["msg_url"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "msg_url") + } + + protoReq.MsgUrl, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "msg_url", err) + } + + msg, err := server.Authorization(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. @@ -121,6 +193,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_AuthorizationList_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_AuthorizationList_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_AuthorizationList_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Authorization_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_Authorization_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_Authorization_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -202,6 +320,46 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_AuthorizationList_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_AuthorizationList_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_AuthorizationList_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Authorization_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_Authorization_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_Authorization_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -209,10 +367,18 @@ var ( pattern_Query_Policies_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"zeta-chain", "authority", "policies"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_ChainInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"zeta-chain", "authority", "chainInfo"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AuthorizationList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"zeta-chain", "authority", "authorizations"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Authorization_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"zeta-chain", "authority", "authorization", "msg_url"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( forward_Query_Policies_0 = runtime.ForwardResponseMessage forward_Query_ChainInfo_0 = runtime.ForwardResponseMessage + + forward_Query_AuthorizationList_0 = runtime.ForwardResponseMessage + + forward_Query_Authorization_0 = runtime.ForwardResponseMessage )