feat(bank): Add secondary query for bank metadata (backport #16852) (#17168)

Co-authored-by: Matt, Park <45252226+mattverse@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
mergify[bot]
2023-07-27 23:53:55 +00:00
committed by GitHub
co-authored by Matt, Park Julien Robert
parent dcb628064a
commit d200d421ec
10 changed files with 2261 additions and 418 deletions
+262 -58
View File
@@ -3919,6 +3919,141 @@ paths:
type: string
tags:
- Query
/cosmos/bank/v1beta1/denoms_metadata_by_query_string:
get:
summary: DenomsMetadata queries the client metadata of a given coin denomination.
operationId: DenomMetadataByQueryString
responses:
'200':
description: A successful response.
schema:
type: object
properties:
metadata:
type: object
properties:
description:
type: string
denom_units:
type: array
items:
type: object
properties:
denom:
type: string
description: >-
denom represents the string name of the given denom
unit (e.g uatom).
exponent:
type: integer
format: int64
description: >-
exponent represents power of 10 exponent that one
must
raise the base_denom to in order to equal the given
DenomUnit's denom
1 denom = 10^exponent base_denom
(e.g. with a base_denom of uatom, one can create a
DenomUnit of 'atom' with
exponent = 6, thus: 1 atom = 10^6 uatom).
aliases:
type: array
items:
type: string
title: >-
aliases is a list of string aliases for the given
denom
description: |-
DenomUnit represents a struct that describes a given
denomination unit of the basic token.
title: >-
denom_units represents the list of DenomUnit's for a given
coin
base:
type: string
description: >-
base represents the base denom (should be the DenomUnit
with exponent = 0).
display:
type: string
description: |-
display indicates the suggested denom that should be
displayed in clients.
name:
type: string
description: 'Since: cosmos-sdk 0.43'
title: 'name defines the name of the token (eg: Cosmos Atom)'
symbol:
type: string
description: >-
symbol is the token symbol usually shown on exchanges (eg:
ATOM). This can
be the same as the display.
Since: cosmos-sdk 0.43
uri:
type: string
description: >-
URI to a document (on or off-chain) that contains
additional information. Optional.
Since: cosmos-sdk 0.46
uri_hash:
type: string
description: >-
URIHash is a sha256 hash of a document pointed by URI.
It's used to verify that
the document didn't change. Optional.
Since: cosmos-sdk 0.46
description: |-
Metadata represents a struct that describes
a basic token.
description: >-
QueryDenomMetadataByQueryStringResponse is the response type for
the Query/DenomMetadata RPC
method. Identical with QueryDenomMetadataResponse but receives
denom as query string in request.
default:
description: An unexpected error response.
schema:
type: object
properties:
error:
type: string
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
type_url:
type: string
value:
type: string
format: byte
parameters:
- name: denom
description: denom is the coin denom to query the metadata for.
in: query
required: false
type: string
tags:
- Query
/cosmos/bank/v1beta1/params:
get:
summary: Params queries the parameters of x/bank module.
@@ -17522,13 +17657,13 @@ paths:
delegator_address:
type: string
description: >-
delegator_address is the bech32-encoded address of
the delegator.
delegator_address is the encoded address of the
delegator.
validator_address:
type: string
description: >-
validator_address is the bech32-encoded address of
the validator.
validator_address is the encoded address of the
validator.
shares:
type: string
description: shares define the delegation shares received.
@@ -18315,12 +18450,12 @@ paths:
delegator_address:
type: string
description: >-
delegator_address is the bech32-encoded address of the
delegator_address is the encoded address of the
delegator.
validator_address:
type: string
description: >-
validator_address is the bech32-encoded address of the
validator_address is the encoded address of the
validator.
entries:
type: array
@@ -22125,13 +22260,13 @@ paths:
delegator_address:
type: string
description: >-
delegator_address is the bech32-encoded address of
the delegator.
delegator_address is the encoded address of the
delegator.
validator_address:
type: string
description: >-
validator_address is the bech32-encoded address of
the validator.
validator_address is the encoded address of the
validator.
shares:
type: string
description: shares define the delegation shares received.
@@ -22463,12 +22598,12 @@ paths:
delegator_address:
type: string
description: >-
delegator_address is the bech32-encoded address of the
delegator_address is the encoded address of the
delegator.
validator_address:
type: string
description: >-
validator_address is the bech32-encoded address of the
validator_address is the encoded address of the
validator.
shares:
type: string
@@ -22729,14 +22864,10 @@ paths:
properties:
delegator_address:
type: string
description: >-
delegator_address is the bech32-encoded address of the
delegator.
description: delegator_address is the encoded address of the delegator.
validator_address:
type: string
description: >-
validator_address is the bech32-encoded address of the
validator.
description: validator_address is the encoded address of the validator.
entries:
type: array
items:
@@ -23018,12 +23149,12 @@ paths:
delegator_address:
type: string
description: >-
delegator_address is the bech32-encoded address of the
delegator_address is the encoded address of the
delegator.
validator_address:
type: string
description: >-
validator_address is the bech32-encoded address of the
validator_address is the encoded address of the
validator.
entries:
type: array
@@ -40165,6 +40296,99 @@ definitions:
description: >-
QueryBalanceResponse is the response type for the Query/Balance RPC
method.
cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse:
type: object
properties:
metadata:
type: object
properties:
description:
type: string
denom_units:
type: array
items:
type: object
properties:
denom:
type: string
description: >-
denom represents the string name of the given denom unit
(e.g uatom).
exponent:
type: integer
format: int64
description: >-
exponent represents power of 10 exponent that one must
raise the base_denom to in order to equal the given
DenomUnit's denom
1 denom = 10^exponent base_denom
(e.g. with a base_denom of uatom, one can create a DenomUnit
of 'atom' with
exponent = 6, thus: 1 atom = 10^6 uatom).
aliases:
type: array
items:
type: string
title: aliases is a list of string aliases for the given denom
description: |-
DenomUnit represents a struct that describes a given
denomination unit of the basic token.
title: denom_units represents the list of DenomUnit's for a given coin
base:
type: string
description: >-
base represents the base denom (should be the DenomUnit with
exponent = 0).
display:
type: string
description: |-
display indicates the suggested denom that should be
displayed in clients.
name:
type: string
description: 'Since: cosmos-sdk 0.43'
title: 'name defines the name of the token (eg: Cosmos Atom)'
symbol:
type: string
description: >-
symbol is the token symbol usually shown on exchanges (eg: ATOM).
This can
be the same as the display.
Since: cosmos-sdk 0.43
uri:
type: string
description: >-
URI to a document (on or off-chain) that contains additional
information. Optional.
Since: cosmos-sdk 0.46
uri_hash:
type: string
description: >-
URIHash is a sha256 hash of a document pointed by URI. It's used
to verify that
the document didn't change. Optional.
Since: cosmos-sdk 0.46
description: |-
Metadata represents a struct that describes
a basic token.
description: >-
QueryDenomMetadataByQueryStringResponse is the response type for the
Query/DenomMetadata RPC
method. Identical with QueryDenomMetadataResponse but receives denom as
query string in request.
cosmos.bank.v1beta1.QueryDenomMetadataResponse:
type: object
properties:
@@ -51273,10 +51497,10 @@ definitions:
properties:
delegator_address:
type: string
description: delegator_address is the bech32-encoded address of the delegator.
description: delegator_address is the encoded address of the delegator.
validator_address:
type: string
description: validator_address is the bech32-encoded address of the validator.
description: validator_address is the encoded address of the validator.
shares:
type: string
description: shares define the delegation shares received.
@@ -51292,10 +51516,10 @@ definitions:
properties:
delegator_address:
type: string
description: delegator_address is the bech32-encoded address of the delegator.
description: delegator_address is the encoded address of the delegator.
validator_address:
type: string
description: validator_address is the bech32-encoded address of the validator.
description: validator_address is the encoded address of the validator.
shares:
type: string
description: shares define the delegation shares received.
@@ -51794,14 +52018,10 @@ definitions:
properties:
delegator_address:
type: string
description: >-
delegator_address is the bech32-encoded address of the
delegator.
description: delegator_address is the encoded address of the delegator.
validator_address:
type: string
description: >-
validator_address is the bech32-encoded address of the
validator.
description: validator_address is the encoded address of the validator.
shares:
type: string
description: shares define the delegation shares received.
@@ -51850,14 +52070,10 @@ definitions:
properties:
delegator_address:
type: string
description: >-
delegator_address is the bech32-encoded address of the
delegator.
description: delegator_address is the encoded address of the delegator.
validator_address:
type: string
description: >-
validator_address is the bech32-encoded address of the
validator.
description: validator_address is the encoded address of the validator.
shares:
type: string
description: shares define the delegation shares received.
@@ -51923,14 +52139,10 @@ definitions:
properties:
delegator_address:
type: string
description: >-
delegator_address is the bech32-encoded address of the
delegator.
description: delegator_address is the encoded address of the delegator.
validator_address:
type: string
description: >-
validator_address is the bech32-encoded address of the
validator.
description: validator_address is the encoded address of the validator.
entries:
type: array
items:
@@ -53272,10 +53484,10 @@ definitions:
properties:
delegator_address:
type: string
description: delegator_address is the bech32-encoded address of the delegator.
description: delegator_address is the encoded address of the delegator.
validator_address:
type: string
description: validator_address is the bech32-encoded address of the validator.
description: validator_address is the encoded address of the validator.
entries:
type: array
items:
@@ -53332,14 +53544,10 @@ definitions:
properties:
delegator_address:
type: string
description: >-
delegator_address is the bech32-encoded address of the
delegator.
description: delegator_address is the encoded address of the delegator.
validator_address:
type: string
description: >-
validator_address is the bech32-encoded address of the
validator.
description: validator_address is the encoded address of the validator.
shares:
type: string
description: shares define the delegation shares received.
@@ -53715,14 +53923,10 @@ definitions:
properties:
delegator_address:
type: string
description: >-
delegator_address is the bech32-encoded address of the
delegator.
description: delegator_address is the encoded address of the delegator.
validator_address:
type: string
description: >-
validator_address is the bech32-encoded address of the
validator.
description: validator_address is the encoded address of the validator.
entries:
type: array
items:
@@ -54399,10 +54603,10 @@ definitions:
properties:
delegator_address:
type: string
description: delegator_address is the bech32-encoded address of the delegator.
description: delegator_address is the encoded address of the delegator.
validator_address:
type: string
description: validator_address is the bech32-encoded address of the validator.
description: validator_address is the encoded address of the validator.
entries:
type: array
items: