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/x/authority/keeper/grpc_query_authorization_list.go b/x/authority/keeper/grpc_query_authorization_list.go index b25fc11f5b..d7ba919614 100644 --- a/x/authority/keeper/grpc_query_authorization_list.go +++ b/x/authority/keeper/grpc_query_authorization_list.go @@ -10,6 +10,7 @@ import ( "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) { @@ -24,6 +25,7 @@ func (k Keeper) AuthorizationList(c context.Context, 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) {