diff --git a/client/docs/config.json b/client/docs/config.json
index 8d21362345..d6f8bd04bc 100644
--- a/client/docs/config.json
+++ b/client/docs/config.json
@@ -80,14 +80,6 @@
}
}
},
- {
- "url": "./tmp-swagger-gen/cosmos/params/v1beta1/query.swagger.json",
- "operationIds": {
- "rename": {
- "Params": "Params"
- }
- }
- },
{
"url": "./tmp-swagger-gen/cosmos/slashing/v1beta1/query.swagger.json",
"operationIds": {
@@ -174,6 +166,15 @@
},
{
"url": "./tmp-swagger-gen/cosmos/app/v1alpha1/query.swagger.json"
+ },
+ {
+ "url": "./tmp-swagger-gen/cosmos/protocolpool/v1/query.swagger.json",
+ "operationIds": {
+ "rename": {
+ "Params": "ProtocolPoolParams",
+ "CommunityPool": "ProtocolPoolCommunityPool"
+ }
+ }
}
]
-}
\ No newline at end of file
+}
diff --git a/client/docs/embed.go b/client/docs/embed.go
index 294cb2af42..eae04249ae 100644
--- a/client/docs/embed.go
+++ b/client/docs/embed.go
@@ -1,6 +1,19 @@
package docs
-import "embed"
+import (
+ "embed"
+ "io/fs"
+)
//go:embed swagger-ui
var SwaggerUI embed.FS
+
+// GetSwaggerFS returns the embedded Swagger UI filesystem
+func GetSwaggerFS() fs.FS {
+ root, err := fs.Sub(SwaggerUI, "swagger-ui")
+ if err != nil {
+ panic(err)
+ }
+
+ return root
+}
diff --git a/client/docs/swagger-ui/index.html b/client/docs/swagger-ui/index.html
index 5a91efa8ca..b7afbbb9ed 100644
--- a/client/docs/swagger-ui/index.html
+++ b/client/docs/swagger-ui/index.html
@@ -1,10 +1,12 @@
-
+
-
+
+
-
+
+
diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml
index c4352f47ae..1dd13b4417 100644
--- a/client/docs/swagger-ui/swagger.yaml
+++ b/client/docs/swagger-ui/swagger.yaml
@@ -1241,7 +1241,7 @@ paths:
type: string
tags:
- Query
- /cosmos/auth/v1beta1/address_by_id/{id}:
+ /cosmos/auth/v1beta1/address_by_id/{account_id}:
get:
summary: AccountAddressByID returns account address based on account number.
operationId: AccountAddressByID
@@ -1445,6 +1445,12 @@ paths:
"value": "1.212s"
}
parameters:
+ - name: account_id
+ description: account_id is the account number of the address to be queried.
+ in: path
+ required: true
+ type: string
+ format: uint64
- name: id
description: |-
Deprecated, use account_id instead
@@ -1452,16 +1458,10 @@ paths:
id is the account number of the address to be queried. This field
should have been an uint64 (like all account numbers), and will be
updated to uint64 in a future version of the auth query.
- in: path
- required: true
- type: string
- format: int64
- - name: account_id
- description: account_id is the account number of the address to be queried.
in: query
required: false
type: string
- format: uint64
+ format: int64
tags:
- Query
/cosmos/auth/v1beta1/bech32:
@@ -1669,6 +1669,428 @@ paths:
}
tags:
- Query
+ /cosmos/auth/v1beta1/bech32/decode/{address_bytes}:
+ get:
+ summary: AddressBytesToString converts Account Address bytes to string
+ operationId: AddressBytesToString2
+ responses:
+ '200':
+ description: A successful response.
+ schema:
+ type: object
+ properties:
+ address_string:
+ type: string
+ description: >-
+ AddressBytesToStringResponse is the response type for
+ AddressString rpc method.
+ default:
+ description: An unexpected error response.
+ schema:
+ type: object
+ properties:
+ code:
+ type: integer
+ format: int32
+ message:
+ type: string
+ details:
+ type: array
+ items:
+ type: object
+ properties:
+ '@type':
+ type: string
+ description: >-
+ A URL/resource name that uniquely identifies the type of
+ the serialized
+
+ protocol buffer message. This string must contain at
+ least
+
+ one "/" character. The last segment of the URL's path
+ must represent
+
+ the fully qualified name of the type (as in
+
+ `path/google.protobuf.Duration`). The name should be in
+ a canonical form
+
+ (e.g., leading "." is not accepted).
+
+
+ In practice, teams usually precompile into the binary
+ all types that they
+
+ expect it to use in the context of Any. However, for
+ URLs which use the
+
+ scheme `http`, `https`, or no scheme, one can optionally
+ set up a type
+
+ server that maps type URLs to message definitions as
+ follows:
+
+
+ * If no scheme is provided, `https` is assumed.
+
+ * An HTTP GET on the URL must yield a
+ [google.protobuf.Type][]
+ value in binary format, or produce an error.
+ * Applications are allowed to cache lookup results based
+ on the
+ URL, or have them precompiled into a binary to avoid any
+ lookup. Therefore, binary compatibility needs to be preserved
+ on changes to types. (Use versioned type names to manage
+ breaking changes.)
+
+ Note: this functionality is not currently available in
+ the official
+
+ protobuf release, and it is not used for type URLs
+ beginning with
+
+ type.googleapis.com.
+
+
+ Schemes other than `http`, `https` (or the empty scheme)
+ might be
+
+ used with implementation specific semantics.
+ additionalProperties: {}
+ description: >-
+ `Any` contains an arbitrary serialized protocol buffer
+ message along with a
+
+ URL that describes the type of the serialized message.
+
+
+ Protobuf library provides support to pack/unpack Any values
+ in the form
+
+ of utility functions or additional generated methods of the
+ Any type.
+
+
+ Example 1: Pack and unpack a message in C++.
+
+ Foo foo = ...;
+ Any any;
+ any.PackFrom(foo);
+ ...
+ if (any.UnpackTo(&foo)) {
+ ...
+ }
+
+ Example 2: Pack and unpack a message in Java.
+
+ Foo foo = ...;
+ Any any = Any.pack(foo);
+ ...
+ if (any.is(Foo.class)) {
+ foo = any.unpack(Foo.class);
+ }
+ // or ...
+ if (any.isSameTypeAs(Foo.getDefaultInstance())) {
+ foo = any.unpack(Foo.getDefaultInstance());
+ }
+
+ Example 3: Pack and unpack a message in Python.
+
+ foo = Foo(...)
+ any = Any()
+ any.Pack(foo)
+ ...
+ if any.Is(Foo.DESCRIPTOR):
+ any.Unpack(foo)
+ ...
+
+ Example 4: Pack and unpack a message in Go
+
+ foo := &pb.Foo{...}
+ any, err := anypb.New(foo)
+ if err != nil {
+ ...
+ }
+ ...
+ foo := &pb.Foo{}
+ if err := any.UnmarshalTo(foo); err != nil {
+ ...
+ }
+
+ The pack methods provided by protobuf library will by
+ default use
+
+ 'type.googleapis.com/full.type.name' as the type URL and the
+ unpack
+
+ methods only use the fully qualified type name after the
+ last '/'
+
+ in the type URL, for example "foo.bar.com/x/y.z" will yield
+ type
+
+ name "y.z".
+
+
+ JSON
+
+ ====
+
+ The JSON representation of an `Any` value uses the regular
+
+ representation of the deserialized, embedded message, with
+ an
+
+ additional field `@type` which contains the type URL.
+ Example:
+
+ package google.profile;
+ message Person {
+ string first_name = 1;
+ string last_name = 2;
+ }
+
+ {
+ "@type": "type.googleapis.com/google.profile.Person",
+ "firstName": ,
+ "lastName":
+ }
+
+ If the embedded message type is well-known and has a custom
+ JSON
+
+ representation, that representation will be embedded adding
+ a field
+
+ `value` which holds the custom JSON in addition to the
+ `@type`
+
+ field. Example (for message [google.protobuf.Duration][]):
+
+ {
+ "@type": "type.googleapis.com/google.protobuf.Duration",
+ "value": "1.212s"
+ }
+ parameters:
+ - name: address_bytes
+ in: path
+ required: true
+ type: string
+ format: byte
+ tags:
+ - Query
+ /cosmos/auth/v1beta1/bech32/encode/{address_string}:
+ get:
+ summary: AddressStringToBytes converts Address string to bytes
+ operationId: AddressStringToBytes
+ responses:
+ '200':
+ description: A successful response.
+ schema:
+ type: object
+ properties:
+ address_bytes:
+ type: string
+ format: byte
+ description: >-
+ AddressStringToBytesResponse is the response type for AddressBytes
+ rpc method.
+ default:
+ description: An unexpected error response.
+ schema:
+ type: object
+ properties:
+ code:
+ type: integer
+ format: int32
+ message:
+ type: string
+ details:
+ type: array
+ items:
+ type: object
+ properties:
+ '@type':
+ type: string
+ description: >-
+ A URL/resource name that uniquely identifies the type of
+ the serialized
+
+ protocol buffer message. This string must contain at
+ least
+
+ one "/" character. The last segment of the URL's path
+ must represent
+
+ the fully qualified name of the type (as in
+
+ `path/google.protobuf.Duration`). The name should be in
+ a canonical form
+
+ (e.g., leading "." is not accepted).
+
+
+ In practice, teams usually precompile into the binary
+ all types that they
+
+ expect it to use in the context of Any. However, for
+ URLs which use the
+
+ scheme `http`, `https`, or no scheme, one can optionally
+ set up a type
+
+ server that maps type URLs to message definitions as
+ follows:
+
+
+ * If no scheme is provided, `https` is assumed.
+
+ * An HTTP GET on the URL must yield a
+ [google.protobuf.Type][]
+ value in binary format, or produce an error.
+ * Applications are allowed to cache lookup results based
+ on the
+ URL, or have them precompiled into a binary to avoid any
+ lookup. Therefore, binary compatibility needs to be preserved
+ on changes to types. (Use versioned type names to manage
+ breaking changes.)
+
+ Note: this functionality is not currently available in
+ the official
+
+ protobuf release, and it is not used for type URLs
+ beginning with
+
+ type.googleapis.com.
+
+
+ Schemes other than `http`, `https` (or the empty scheme)
+ might be
+
+ used with implementation specific semantics.
+ additionalProperties: {}
+ description: >-
+ `Any` contains an arbitrary serialized protocol buffer
+ message along with a
+
+ URL that describes the type of the serialized message.
+
+
+ Protobuf library provides support to pack/unpack Any values
+ in the form
+
+ of utility functions or additional generated methods of the
+ Any type.
+
+
+ Example 1: Pack and unpack a message in C++.
+
+ Foo foo = ...;
+ Any any;
+ any.PackFrom(foo);
+ ...
+ if (any.UnpackTo(&foo)) {
+ ...
+ }
+
+ Example 2: Pack and unpack a message in Java.
+
+ Foo foo = ...;
+ Any any = Any.pack(foo);
+ ...
+ if (any.is(Foo.class)) {
+ foo = any.unpack(Foo.class);
+ }
+ // or ...
+ if (any.isSameTypeAs(Foo.getDefaultInstance())) {
+ foo = any.unpack(Foo.getDefaultInstance());
+ }
+
+ Example 3: Pack and unpack a message in Python.
+
+ foo = Foo(...)
+ any = Any()
+ any.Pack(foo)
+ ...
+ if any.Is(Foo.DESCRIPTOR):
+ any.Unpack(foo)
+ ...
+
+ Example 4: Pack and unpack a message in Go
+
+ foo := &pb.Foo{...}
+ any, err := anypb.New(foo)
+ if err != nil {
+ ...
+ }
+ ...
+ foo := &pb.Foo{}
+ if err := any.UnmarshalTo(foo); err != nil {
+ ...
+ }
+
+ The pack methods provided by protobuf library will by
+ default use
+
+ 'type.googleapis.com/full.type.name' as the type URL and the
+ unpack
+
+ methods only use the fully qualified type name after the
+ last '/'
+
+ in the type URL, for example "foo.bar.com/x/y.z" will yield
+ type
+
+ name "y.z".
+
+
+ JSON
+
+ ====
+
+ The JSON representation of an `Any` value uses the regular
+
+ representation of the deserialized, embedded message, with
+ an
+
+ additional field `@type` which contains the type URL.
+ Example:
+
+ package google.profile;
+ message Person {
+ string first_name = 1;
+ string last_name = 2;
+ }
+
+ {
+ "@type": "type.googleapis.com/google.profile.Person",
+ "firstName": ,
+ "lastName":
+ }
+
+ If the embedded message type is well-known and has a custom
+ JSON
+
+ representation, that representation will be embedded adding
+ a field
+
+ `value` which holds the custom JSON in addition to the
+ `@type`
+
+ field. Example (for message [google.protobuf.Duration][]):
+
+ {
+ "@type": "type.googleapis.com/google.protobuf.Duration",
+ "value": "1.212s"
+ }
+ parameters:
+ - name: address_string
+ in: path
+ required: true
+ type: string
+ tags:
+ - Query
/cosmos/auth/v1beta1/bech32/{address_bytes}:
get:
summary: AddressBytesToString converts Account Address bytes to string
@@ -1880,217 +2302,6 @@ paths:
format: byte
tags:
- Query
- /cosmos/auth/v1beta1/bech32/{address_string}:
- get:
- summary: AddressStringToBytes converts Address string to bytes
- operationId: AddressStringToBytes
- responses:
- '200':
- description: A successful response.
- schema:
- type: object
- properties:
- address_bytes:
- type: string
- format: byte
- description: >-
- AddressStringToBytesResponse is the response type for AddressBytes
- rpc method.
- default:
- description: An unexpected error response.
- schema:
- type: object
- properties:
- code:
- type: integer
- format: int32
- message:
- type: string
- details:
- type: array
- items:
- type: object
- properties:
- '@type':
- type: string
- description: >-
- A URL/resource name that uniquely identifies the type of
- the serialized
-
- protocol buffer message. This string must contain at
- least
-
- one "/" character. The last segment of the URL's path
- must represent
-
- the fully qualified name of the type (as in
-
- `path/google.protobuf.Duration`). The name should be in
- a canonical form
-
- (e.g., leading "." is not accepted).
-
-
- In practice, teams usually precompile into the binary
- all types that they
-
- expect it to use in the context of Any. However, for
- URLs which use the
-
- scheme `http`, `https`, or no scheme, one can optionally
- set up a type
-
- server that maps type URLs to message definitions as
- follows:
-
-
- * If no scheme is provided, `https` is assumed.
-
- * An HTTP GET on the URL must yield a
- [google.protobuf.Type][]
- value in binary format, or produce an error.
- * Applications are allowed to cache lookup results based
- on the
- URL, or have them precompiled into a binary to avoid any
- lookup. Therefore, binary compatibility needs to be preserved
- on changes to types. (Use versioned type names to manage
- breaking changes.)
-
- Note: this functionality is not currently available in
- the official
-
- protobuf release, and it is not used for type URLs
- beginning with
-
- type.googleapis.com.
-
-
- Schemes other than `http`, `https` (or the empty scheme)
- might be
-
- used with implementation specific semantics.
- additionalProperties: {}
- description: >-
- `Any` contains an arbitrary serialized protocol buffer
- message along with a
-
- URL that describes the type of the serialized message.
-
-
- Protobuf library provides support to pack/unpack Any values
- in the form
-
- of utility functions or additional generated methods of the
- Any type.
-
-
- Example 1: Pack and unpack a message in C++.
-
- Foo foo = ...;
- Any any;
- any.PackFrom(foo);
- ...
- if (any.UnpackTo(&foo)) {
- ...
- }
-
- Example 2: Pack and unpack a message in Java.
-
- Foo foo = ...;
- Any any = Any.pack(foo);
- ...
- if (any.is(Foo.class)) {
- foo = any.unpack(Foo.class);
- }
- // or ...
- if (any.isSameTypeAs(Foo.getDefaultInstance())) {
- foo = any.unpack(Foo.getDefaultInstance());
- }
-
- Example 3: Pack and unpack a message in Python.
-
- foo = Foo(...)
- any = Any()
- any.Pack(foo)
- ...
- if any.Is(Foo.DESCRIPTOR):
- any.Unpack(foo)
- ...
-
- Example 4: Pack and unpack a message in Go
-
- foo := &pb.Foo{...}
- any, err := anypb.New(foo)
- if err != nil {
- ...
- }
- ...
- foo := &pb.Foo{}
- if err := any.UnmarshalTo(foo); err != nil {
- ...
- }
-
- The pack methods provided by protobuf library will by
- default use
-
- 'type.googleapis.com/full.type.name' as the type URL and the
- unpack
-
- methods only use the fully qualified type name after the
- last '/'
-
- in the type URL, for example "foo.bar.com/x/y.z" will yield
- type
-
- name "y.z".
-
-
- JSON
-
- ====
-
- The JSON representation of an `Any` value uses the regular
-
- representation of the deserialized, embedded message, with
- an
-
- additional field `@type` which contains the type URL.
- Example:
-
- package google.profile;
- message Person {
- string first_name = 1;
- string last_name = 2;
- }
-
- {
- "@type": "type.googleapis.com/google.profile.Person",
- "firstName": ,
- "lastName":
- }
-
- If the embedded message type is well-known and has a custom
- JSON
-
- representation, that representation will be embedded adding
- a field
-
- `value` which holds the custom JSON in addition to the
- `@type`
-
- field. Example (for message [google.protobuf.Duration][]):
-
- {
- "@type": "type.googleapis.com/google.protobuf.Duration",
- "value": "1.212s"
- }
- parameters:
- - name: address_string
- in: path
- required: true
- type: string
- tags:
- - Query
/cosmos/auth/v1beta1/module_accounts:
get:
summary: ModuleAccounts returns all the existing module accounts.
@@ -3364,6 +3575,7 @@ paths:
in: path
required: true
type: string
+ pattern: .+
- name: pagination.key
description: |-
key is a value returned in PageResponse.next_key to begin
@@ -3876,6 +4088,7 @@ paths:
in: path
required: true
type: string
+ pattern: .+
tags:
- Query
/cosmos/bank/v1beta1/denoms_metadata_by_query_string:
@@ -8095,6 +8308,12 @@ paths:
title: Module is the type for VersionInfo
cosmos_sdk_version:
type: string
+ comet_server_version:
+ type: string
+ runtime_version:
+ type: string
+ stf_version:
+ type: string
description: VersionInfo is the type for the GetNodeInfoResponse message.
description: >-
GetNodeInfoResponse is the response type for the Query/GetNodeInfo
@@ -8700,7 +8919,11 @@ paths:
format: int64
description: Validator is the type for the validator-set.
pagination:
- description: pagination defines an pagination for the response.
+ description: >-
+ pagination defines an pagination for the response. offset and
+ limit are used for pagination, next_key is not
+
+ supported for this query.
type: object
properties:
next_key:
@@ -9171,7 +9394,11 @@ paths:
format: int64
description: Validator is the type for the validator-set.
pagination:
- description: pagination defines an pagination for the response.
+ description: >-
+ pagination defines an pagination for the response. offset and
+ limit are used for pagination, next_key is not
+
+ supported for this query.
type: object
properties:
next_key:
@@ -9514,7 +9741,7 @@ paths:
format: byte
title: validator hash provided by the consensus header
description: >-
- StateResponse defines the response structure for the status of a
+ StatusResponse defines the response structure for the status of a
node.
default:
description: An unexpected error response.
@@ -17348,177 +17575,7 @@ paths:
properties:
'@type':
type: string
- description: >-
- A URL/resource name that uniquely identifies the type of
- the serialized
-
- protocol buffer message. This string must contain at
- least
-
- one "/" character. The last segment of the URL's path
- must represent
-
- the fully qualified name of the type (as in
-
- `path/google.protobuf.Duration`). The name should be in
- a canonical form
-
- (e.g., leading "." is not accepted).
-
-
- In practice, teams usually precompile into the binary
- all types that they
-
- expect it to use in the context of Any. However, for
- URLs which use the
-
- scheme `http`, `https`, or no scheme, one can optionally
- set up a type
-
- server that maps type URLs to message definitions as
- follows:
-
-
- * If no scheme is provided, `https` is assumed.
-
- * An HTTP GET on the URL must yield a
- [google.protobuf.Type][]
- value in binary format, or produce an error.
- * Applications are allowed to cache lookup results based
- on the
- URL, or have them precompiled into a binary to avoid any
- lookup. Therefore, binary compatibility needs to be preserved
- on changes to types. (Use versioned type names to manage
- breaking changes.)
-
- Note: this functionality is not currently available in
- the official
-
- protobuf release, and it is not used for type URLs
- beginning with
-
- type.googleapis.com.
-
-
- Schemes other than `http`, `https` (or the empty scheme)
- might be
-
- used with implementation specific semantics.
additionalProperties: {}
- description: >-
- `Any` contains an arbitrary serialized protocol buffer
- message along with a
-
- URL that describes the type of the serialized message.
-
-
- Protobuf library provides support to pack/unpack Any values
- in the form
-
- of utility functions or additional generated methods of the
- Any type.
-
-
- Example 1: Pack and unpack a message in C++.
-
- Foo foo = ...;
- Any any;
- any.PackFrom(foo);
- ...
- if (any.UnpackTo(&foo)) {
- ...
- }
-
- Example 2: Pack and unpack a message in Java.
-
- Foo foo = ...;
- Any any = Any.pack(foo);
- ...
- if (any.is(Foo.class)) {
- foo = any.unpack(Foo.class);
- }
- // or ...
- if (any.isSameTypeAs(Foo.getDefaultInstance())) {
- foo = any.unpack(Foo.getDefaultInstance());
- }
-
- Example 3: Pack and unpack a message in Python.
-
- foo = Foo(...)
- any = Any()
- any.Pack(foo)
- ...
- if any.Is(Foo.DESCRIPTOR):
- any.Unpack(foo)
- ...
-
- Example 4: Pack and unpack a message in Go
-
- foo := &pb.Foo{...}
- any, err := anypb.New(foo)
- if err != nil {
- ...
- }
- ...
- foo := &pb.Foo{}
- if err := any.UnmarshalTo(foo); err != nil {
- ...
- }
-
- The pack methods provided by protobuf library will by
- default use
-
- 'type.googleapis.com/full.type.name' as the type URL and the
- unpack
-
- methods only use the fully qualified type name after the
- last '/'
-
- in the type URL, for example "foo.bar.com/x/y.z" will yield
- type
-
- name "y.z".
-
-
- JSON
-
- ====
-
- The JSON representation of an `Any` value uses the regular
-
- representation of the deserialized, embedded message, with
- an
-
- additional field `@type` which contains the type URL.
- Example:
-
- package google.profile;
- message Person {
- string first_name = 1;
- string last_name = 2;
- }
-
- {
- "@type": "type.googleapis.com/google.profile.Person",
- "firstName": ,
- "lastName":
- }
-
- If the embedded message type is well-known and has a custom
- JSON
-
- representation, that representation will be embedded adding
- a field
-
- `value` which holds the custom JSON in addition to the
- `@type`
-
- field. Example (for message [google.protobuf.Duration][]):
-
- {
- "@type": "type.googleapis.com/google.protobuf.Duration",
- "value": "1.212s"
- }
tags:
- Query
/cosmos/mint/v1beta1/inflation:
@@ -17557,177 +17614,7 @@ paths:
properties:
'@type':
type: string
- description: >-
- A URL/resource name that uniquely identifies the type of
- the serialized
-
- protocol buffer message. This string must contain at
- least
-
- one "/" character. The last segment of the URL's path
- must represent
-
- the fully qualified name of the type (as in
-
- `path/google.protobuf.Duration`). The name should be in
- a canonical form
-
- (e.g., leading "." is not accepted).
-
-
- In practice, teams usually precompile into the binary
- all types that they
-
- expect it to use in the context of Any. However, for
- URLs which use the
-
- scheme `http`, `https`, or no scheme, one can optionally
- set up a type
-
- server that maps type URLs to message definitions as
- follows:
-
-
- * If no scheme is provided, `https` is assumed.
-
- * An HTTP GET on the URL must yield a
- [google.protobuf.Type][]
- value in binary format, or produce an error.
- * Applications are allowed to cache lookup results based
- on the
- URL, or have them precompiled into a binary to avoid any
- lookup. Therefore, binary compatibility needs to be preserved
- on changes to types. (Use versioned type names to manage
- breaking changes.)
-
- Note: this functionality is not currently available in
- the official
-
- protobuf release, and it is not used for type URLs
- beginning with
-
- type.googleapis.com.
-
-
- Schemes other than `http`, `https` (or the empty scheme)
- might be
-
- used with implementation specific semantics.
additionalProperties: {}
- description: >-
- `Any` contains an arbitrary serialized protocol buffer
- message along with a
-
- URL that describes the type of the serialized message.
-
-
- Protobuf library provides support to pack/unpack Any values
- in the form
-
- of utility functions or additional generated methods of the
- Any type.
-
-
- Example 1: Pack and unpack a message in C++.
-
- Foo foo = ...;
- Any any;
- any.PackFrom(foo);
- ...
- if (any.UnpackTo(&foo)) {
- ...
- }
-
- Example 2: Pack and unpack a message in Java.
-
- Foo foo = ...;
- Any any = Any.pack(foo);
- ...
- if (any.is(Foo.class)) {
- foo = any.unpack(Foo.class);
- }
- // or ...
- if (any.isSameTypeAs(Foo.getDefaultInstance())) {
- foo = any.unpack(Foo.getDefaultInstance());
- }
-
- Example 3: Pack and unpack a message in Python.
-
- foo = Foo(...)
- any = Any()
- any.Pack(foo)
- ...
- if any.Is(Foo.DESCRIPTOR):
- any.Unpack(foo)
- ...
-
- Example 4: Pack and unpack a message in Go
-
- foo := &pb.Foo{...}
- any, err := anypb.New(foo)
- if err != nil {
- ...
- }
- ...
- foo := &pb.Foo{}
- if err := any.UnmarshalTo(foo); err != nil {
- ...
- }
-
- The pack methods provided by protobuf library will by
- default use
-
- 'type.googleapis.com/full.type.name' as the type URL and the
- unpack
-
- methods only use the fully qualified type name after the
- last '/'
-
- in the type URL, for example "foo.bar.com/x/y.z" will yield
- type
-
- name "y.z".
-
-
- JSON
-
- ====
-
- The JSON representation of an `Any` value uses the regular
-
- representation of the deserialized, embedded message, with
- an
-
- additional field `@type` which contains the type URL.
- Example:
-
- package google.profile;
- message Person {
- string first_name = 1;
- string last_name = 2;
- }
-
- {
- "@type": "type.googleapis.com/google.profile.Person",
- "firstName": ,
- "lastName":
- }
-
- If the embedded message type is well-known and has a custom
- JSON
-
- representation, that representation will be embedded adding
- a field
-
- `value` which holds the custom JSON in addition to the
- `@type`
-
- field. Example (for message [google.protobuf.Duration][]):
-
- {
- "@type": "type.googleapis.com/google.protobuf.Duration",
- "value": "1.212s"
- }
tags:
- Query
/cosmos/mint/v1beta1/params:
@@ -17769,285 +17656,6 @@ paths:
description: >-
QueryParamsResponse is the response type for the Query/Params RPC
method.
- default:
- description: An unexpected error response.
- schema:
- type: object
- properties:
- code:
- type: integer
- format: int32
- message:
- type: string
- details:
- type: array
- items:
- type: object
- properties:
- '@type':
- type: string
- description: >-
- A URL/resource name that uniquely identifies the type of
- the serialized
-
- protocol buffer message. This string must contain at
- least
-
- one "/" character. The last segment of the URL's path
- must represent
-
- the fully qualified name of the type (as in
-
- `path/google.protobuf.Duration`). The name should be in
- a canonical form
-
- (e.g., leading "." is not accepted).
-
-
- In practice, teams usually precompile into the binary
- all types that they
-
- expect it to use in the context of Any. However, for
- URLs which use the
-
- scheme `http`, `https`, or no scheme, one can optionally
- set up a type
-
- server that maps type URLs to message definitions as
- follows:
-
-
- * If no scheme is provided, `https` is assumed.
-
- * An HTTP GET on the URL must yield a
- [google.protobuf.Type][]
- value in binary format, or produce an error.
- * Applications are allowed to cache lookup results based
- on the
- URL, or have them precompiled into a binary to avoid any
- lookup. Therefore, binary compatibility needs to be preserved
- on changes to types. (Use versioned type names to manage
- breaking changes.)
-
- Note: this functionality is not currently available in
- the official
-
- protobuf release, and it is not used for type URLs
- beginning with
-
- type.googleapis.com.
-
-
- Schemes other than `http`, `https` (or the empty scheme)
- might be
-
- used with implementation specific semantics.
- additionalProperties: {}
- description: >-
- `Any` contains an arbitrary serialized protocol buffer
- message along with a
-
- URL that describes the type of the serialized message.
-
-
- Protobuf library provides support to pack/unpack Any values
- in the form
-
- of utility functions or additional generated methods of the
- Any type.
-
-
- Example 1: Pack and unpack a message in C++.
-
- Foo foo = ...;
- Any any;
- any.PackFrom(foo);
- ...
- if (any.UnpackTo(&foo)) {
- ...
- }
-
- Example 2: Pack and unpack a message in Java.
-
- Foo foo = ...;
- Any any = Any.pack(foo);
- ...
- if (any.is(Foo.class)) {
- foo = any.unpack(Foo.class);
- }
- // or ...
- if (any.isSameTypeAs(Foo.getDefaultInstance())) {
- foo = any.unpack(Foo.getDefaultInstance());
- }
-
- Example 3: Pack and unpack a message in Python.
-
- foo = Foo(...)
- any = Any()
- any.Pack(foo)
- ...
- if any.Is(Foo.DESCRIPTOR):
- any.Unpack(foo)
- ...
-
- Example 4: Pack and unpack a message in Go
-
- foo := &pb.Foo{...}
- any, err := anypb.New(foo)
- if err != nil {
- ...
- }
- ...
- foo := &pb.Foo{}
- if err := any.UnmarshalTo(foo); err != nil {
- ...
- }
-
- The pack methods provided by protobuf library will by
- default use
-
- 'type.googleapis.com/full.type.name' as the type URL and the
- unpack
-
- methods only use the fully qualified type name after the
- last '/'
-
- in the type URL, for example "foo.bar.com/x/y.z" will yield
- type
-
- name "y.z".
-
-
- JSON
-
- ====
-
- The JSON representation of an `Any` value uses the regular
-
- representation of the deserialized, embedded message, with
- an
-
- additional field `@type` which contains the type URL.
- Example:
-
- package google.profile;
- message Person {
- string first_name = 1;
- string last_name = 2;
- }
-
- {
- "@type": "type.googleapis.com/google.profile.Person",
- "firstName": ,
- "lastName":
- }
-
- If the embedded message type is well-known and has a custom
- JSON
-
- representation, that representation will be embedded adding
- a field
-
- `value` which holds the custom JSON in addition to the
- `@type`
-
- field. Example (for message [google.protobuf.Duration][]):
-
- {
- "@type": "type.googleapis.com/google.protobuf.Duration",
- "value": "1.212s"
- }
- tags:
- - Query
- /cosmos/params/v1beta1/params:
- get:
- summary: |-
- Params queries a specific parameter of a module, given its subspace and
- key.
- operationId: Params
- responses:
- '200':
- description: A successful response.
- schema:
- type: object
- properties:
- param:
- description: param defines the queried parameter.
- type: object
- properties:
- subspace:
- type: string
- key:
- type: string
- value:
- type: string
- description: >-
- QueryParamsResponse is response type for the Query/Params RPC
- method.
- default:
- description: An unexpected error response.
- schema:
- type: object
- properties:
- code:
- type: integer
- format: int32
- message:
- type: string
- details:
- type: array
- items:
- type: object
- properties:
- '@type':
- type: string
- additionalProperties: {}
- parameters:
- - name: subspace
- description: subspace defines the module to query the parameter for.
- in: query
- required: false
- type: string
- - name: key
- description: key defines the key of the parameter in the subspace.
- in: query
- required: false
- type: string
- tags:
- - Query
- /cosmos/params/v1beta1/subspaces:
- get:
- summary: >-
- Subspaces queries for all registered subspaces and all keys for a
- subspace.
- operationId: Subspaces
- responses:
- '200':
- description: A successful response.
- schema:
- type: object
- properties:
- subspaces:
- type: array
- items:
- type: object
- properties:
- subspace:
- type: string
- keys:
- type: array
- items:
- type: string
- description: >-
- Subspace defines a parameter subspace name and all the keys
- that exist for
-
- the subspace.
- description: >-
- QuerySubspacesResponse defines the response types for querying for
- all
-
- registered subspaces and all keys for a subspace.
default:
description: An unexpected error response.
schema:
@@ -18592,7 +18200,7 @@ paths:
foo = any.unpack(Foo.getDefaultInstance());
}
- Example 3: Pack and unpack a message in Python.
+ Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
@@ -18602,7 +18210,7 @@ paths:
any.Unpack(foo)
...
- Example 4: Pack and unpack a message in Go
+ Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
@@ -18632,6 +18240,7 @@ paths:
JSON
+ ====
The JSON representation of an `Any` value uses the regular
@@ -19019,7 +18628,7 @@ paths:
foo = any.unpack(Foo.getDefaultInstance());
}
- Example 3: Pack and unpack a message in Python.
+ Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
@@ -19029,7 +18638,7 @@ paths:
any.Unpack(foo)
...
- Example 4: Pack and unpack a message in Go
+ Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
@@ -19059,6 +18668,7 @@ paths:
JSON
+ ====
The JSON representation of an `Any` value uses the regular
@@ -19386,7 +18996,7 @@ paths:
foo = any.unpack(Foo.getDefaultInstance());
}
- Example 3: Pack and unpack a message in Python.
+ Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
@@ -19396,7 +19006,7 @@ paths:
any.Unpack(foo)
...
- Example 4: Pack and unpack a message in Go
+ Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
@@ -19426,6 +19036,7 @@ paths:
JSON
+ ====
The JSON representation of an `Any` value uses the regular
@@ -19668,6 +19279,24 @@ paths:
details:
type: string
description: details define other optional details.
+ metadata:
+ description: >-
+ metadata defines extra information about the
+ validator.
+ type: object
+ properties:
+ profile_pic_uri:
+ type: string
+ description: >-
+ profile_pic_uri defines a link to the validator
+ profile picture.
+ social_handle_uris:
+ type: array
+ items:
+ type: string
+ description: >-
+ social_handle_uris defines a string array of
+ uris to the validator's social handles.
unbonding_height:
type: string
format: int64
@@ -19888,7 +19517,7 @@ paths:
foo = any.unpack(Foo.getDefaultInstance());
}
- Example 3: Pack and unpack a message in Python.
+ Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
@@ -19898,7 +19527,7 @@ paths:
any.Unpack(foo)
...
- Example 4: Pack and unpack a message in Go
+ Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
@@ -19928,6 +19557,7 @@ paths:
JSON
+ ====
The JSON representation of an `Any` value uses the regular
@@ -20164,6 +19794,24 @@ paths:
details:
type: string
description: details define other optional details.
+ metadata:
+ description: >-
+ metadata defines extra information about the
+ validator.
+ type: object
+ properties:
+ profile_pic_uri:
+ type: string
+ description: >-
+ profile_pic_uri defines a link to the validator
+ profile picture.
+ social_handle_uris:
+ type: array
+ items:
+ type: string
+ description: >-
+ social_handle_uris defines a string array of uris
+ to the validator's social handles.
unbonding_height:
type: string
format: int64
@@ -20340,7 +19988,7 @@ paths:
foo = any.unpack(Foo.getDefaultInstance());
}
- Example 3: Pack and unpack a message in Python.
+ Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
@@ -20350,7 +19998,7 @@ paths:
any.Unpack(foo)
...
- Example 4: Pack and unpack a message in Go
+ Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
@@ -20380,6 +20028,7 @@ paths:
JSON
+ ====
The JSON representation of an `Any` value uses the regular
@@ -20662,6 +20311,24 @@ paths:
details:
type: string
description: details define other optional details.
+ metadata:
+ description: >-
+ metadata defines extra information about the
+ validator.
+ type: object
+ properties:
+ profile_pic_uri:
+ type: string
+ description: >-
+ profile_pic_uri defines a link to the
+ validator profile picture.
+ social_handle_uris:
+ type: array
+ items:
+ type: string
+ description: >-
+ social_handle_uris defines a string array of
+ uris to the validator's social handles.
unbonding_height:
type: string
format: int64
@@ -20865,7 +20532,7 @@ paths:
foo = any.unpack(Foo.getDefaultInstance());
}
- Example 3: Pack and unpack a message in Python.
+ Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
@@ -20875,7 +20542,7 @@ paths:
any.Unpack(foo)
...
- Example 4: Pack and unpack a message in Go
+ Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
@@ -20905,6 +20572,7 @@ paths:
JSON
+ ====
The JSON representation of an `Any` value uses the regular
@@ -21125,7 +20793,7 @@ paths:
foo = any.unpack(Foo.getDefaultInstance());
}
- Example 3: Pack and unpack a message in Python.
+ Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
@@ -21135,7 +20803,7 @@ paths:
any.Unpack(foo)
...
- Example 4: Pack and unpack a message in Go
+ Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
@@ -21165,6 +20833,7 @@ paths:
JSON
+ ====
The JSON representation of an `Any` value uses the regular
@@ -21333,7 +21002,7 @@ paths:
foo = any.unpack(Foo.getDefaultInstance());
}
- Example 3: Pack and unpack a message in Python.
+ Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
@@ -21343,7 +21012,7 @@ paths:
any.Unpack(foo)
...
- Example 4: Pack and unpack a message in Go
+ Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
@@ -21373,6 +21042,7 @@ paths:
JSON
+ ====
The JSON representation of an `Any` value uses the regular
@@ -21554,6 +21224,24 @@ paths:
details:
type: string
description: details define other optional details.
+ metadata:
+ description: >-
+ metadata defines extra information about the
+ validator.
+ type: object
+ properties:
+ profile_pic_uri:
+ type: string
+ description: >-
+ profile_pic_uri defines a link to the validator
+ profile picture.
+ social_handle_uris:
+ type: array
+ items:
+ type: string
+ description: >-
+ social_handle_uris defines a string array of
+ uris to the validator's social handles.
unbonding_height:
type: string
format: int64
@@ -21807,7 +21495,7 @@ paths:
foo = any.unpack(Foo.getDefaultInstance());
}
- Example 3: Pack and unpack a message in Python.
+ Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
@@ -21817,7 +21505,7 @@ paths:
any.Unpack(foo)
...
- Example 4: Pack and unpack a message in Go
+ Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
@@ -21847,6 +21535,7 @@ paths:
JSON
+ ====
The JSON representation of an `Any` value uses the regular
@@ -22081,6 +21770,24 @@ paths:
details:
type: string
description: details define other optional details.
+ metadata:
+ description: >-
+ metadata defines extra information about the
+ validator.
+ type: object
+ properties:
+ profile_pic_uri:
+ type: string
+ description: >-
+ profile_pic_uri defines a link to the validator
+ profile picture.
+ social_handle_uris:
+ type: array
+ items:
+ type: string
+ description: >-
+ social_handle_uris defines a string array of uris
+ to the validator's social handles.
unbonding_height:
type: string
format: int64
@@ -22257,7 +21964,7 @@ paths:
foo = any.unpack(Foo.getDefaultInstance());
}
- Example 3: Pack and unpack a message in Python.
+ Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
@@ -22267,7 +21974,7 @@ paths:
any.Unpack(foo)
...
- Example 4: Pack and unpack a message in Go
+ Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
@@ -22297,6 +22004,7 @@ paths:
JSON
+ ====
The JSON representation of an `Any` value uses the regular
@@ -22548,7 +22256,7 @@ paths:
foo = any.unpack(Foo.getDefaultInstance());
}
- Example 3: Pack and unpack a message in Python.
+ Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
@@ -22558,7 +22266,7 @@ paths:
any.Unpack(foo)
...
- Example 4: Pack and unpack a message in Go
+ Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
@@ -22588,6 +22296,7 @@ paths:
JSON
+ ====
The JSON representation of an `Any` value uses the regular
@@ -22854,7 +22563,7 @@ paths:
foo = any.unpack(Foo.getDefaultInstance());
}
- Example 3: Pack and unpack a message in Python.
+ Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
@@ -22864,7 +22573,7 @@ paths:
any.Unpack(foo)
...
- Example 4: Pack and unpack a message in Go
+ Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
@@ -22894,6 +22603,7 @@ paths:
JSON
+ ====
The JSON representation of an `Any` value uses the regular
@@ -23123,7 +22833,7 @@ paths:
foo = any.unpack(Foo.getDefaultInstance());
}
- Example 3: Pack and unpack a message in Python.
+ Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
@@ -23133,7 +22843,7 @@ paths:
any.Unpack(foo)
...
- Example 4: Pack and unpack a message in Go
+ Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
@@ -23163,6 +22873,7 @@ paths:
JSON
+ ====
The JSON representation of an `Any` value uses the regular
@@ -23439,7 +23150,7 @@ paths:
foo = any.unpack(Foo.getDefaultInstance());
}
- Example 3: Pack and unpack a message in Python.
+ Example 3: Pack and unpack a message in Python.
foo = Foo(...)
any = Any()
@@ -23449,7 +23160,7 @@ paths:
any.Unpack(foo)
...
- Example 4: Pack and unpack a message in Go
+ Example 4: Pack and unpack a message in Go
foo := &pb.Foo{...}
any, err := anypb.New(foo)
@@ -23479,6 +23190,7 @@ paths:
JSON
+ ====
The JSON representation of an `Any` value uses the regular
@@ -25456,9 +25168,6 @@ paths:
additional metadata, emitted only by processing the
messages.
-
-
- Since: cosmos-sdk 0.42.11, 0.44.5, 0.45
description: |-
BroadcastTxResponse is the response type for the
Service.BroadcastTx method.
@@ -38688,7 +38397,7 @@ paths:
- Query
/cosmos/circuit/v1/accounts:
get:
- summary: Account returns account permissions.
+ summary: Accounts returns multiple accounts permissions.
operationId: CircuitAccounts
responses:
'200':
@@ -39182,6 +38891,159 @@ paths:
additionalProperties: {}
tags:
- Query
+ /cosmos/protocolpool/v1/community_pool:
+ get:
+ summary: CommunityPool queries the community pool coins.
+ operationId: ProtocolPoolCommunityPool
+ responses:
+ '200':
+ description: A successful response.
+ schema:
+ type: object
+ properties:
+ pool:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ DecCoin defines a token with a denomination and a decimal
+ amount.
+
+
+ NOTE: The amount field is an Dec which implements the custom
+ method
+
+ signatures required by gogoproto.
+ description: pool defines community pool's coins.
+ description: >-
+ QueryCommunityPoolResponse is the response type for the
+ Query/CommunityPool
+
+ RPC method.
+ default:
+ description: An unexpected error response.
+ schema:
+ type: object
+ properties:
+ code:
+ type: integer
+ format: int32
+ message:
+ type: string
+ details:
+ type: array
+ items:
+ type: object
+ properties:
+ '@type':
+ type: string
+ additionalProperties: {}
+ tags:
+ - Query
+ /cosmos/protocolpool/v1/unclaimed_budget/{address}:
+ get:
+ summary: >-
+ UnclaimedBudget queries the remaining budget left to be claimed and it
+ gives overall budget allocation view.
+ operationId: UnclaimedBudget
+ responses:
+ '200':
+ description: A successful response.
+ schema:
+ type: object
+ properties:
+ claimed_amount:
+ title: >-
+ claimed_amount is the budget amount already claimed by the
+ recipient
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and an amount.
+
+
+ NOTE: The amount field is an Int which implements the custom
+ method
+
+ signatures required by gogoproto.
+ unclaimed_amount:
+ title: >-
+ unclaimed_amount is the remaining budget amount that is
+ unclaimed by the recipient
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and an amount.
+
+
+ NOTE: The amount field is an Int which implements the custom
+ method
+
+ signatures required by gogoproto.
+ next_claim_from:
+ type: string
+ format: date-time
+ description: >-
+ next_claim_from is the next starting claim time for fund
+ distribution.
+
+ It represents the time when we can claim funds after the
+ period time interval has passed.
+ period:
+ type: string
+ title: period is the time interval for fund distribution
+ tranches_left:
+ type: string
+ format: uint64
+ title: >-
+ tranches_left is the number of tranches left for the amount to
+ be distributed
+ description: >-
+ QueryUnclaimedBudgetResponse is the response type for the
+ Query/UnclaimedBudget
+
+ RPC method.
+ default:
+ description: An unexpected error response.
+ schema:
+ type: object
+ properties:
+ code:
+ type: integer
+ format: int32
+ message:
+ type: string
+ details:
+ type: array
+ items:
+ type: object
+ properties:
+ '@type':
+ type: string
+ additionalProperties: {}
+ parameters:
+ - name: address
+ description: >-
+ address is the recipient address to query unclaimed budget amount
+ for.
+ in: path
+ required: true
+ type: string
+ tags:
+ - Query
definitions:
cosmos.auth.v1beta1.AddressBytesToStringResponse:
type: object
@@ -47962,7 +47824,11 @@ definitions:
format: int64
description: Validator is the type for the validator-set.
pagination:
- description: pagination defines an pagination for the response.
+ description: >-
+ pagination defines an pagination for the response. offset and limit
+ are used for pagination, next_key is not
+
+ supported for this query.
type: object
properties:
next_key:
@@ -48060,6 +47926,12 @@ definitions:
title: Module is the type for VersionInfo
cosmos_sdk_version:
type: string
+ comet_server_version:
+ type: string
+ runtime_version:
+ type: string
+ stf_version:
+ type: string
description: VersionInfo is the type for the GetNodeInfoResponse message.
description: >-
GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC
@@ -48263,7 +48135,11 @@ definitions:
format: int64
description: Validator is the type for the validator-set.
pagination:
- description: pagination defines an pagination for the response.
+ description: >-
+ pagination defines an pagination for the response. offset and limit
+ are used for pagination, next_key is not
+
+ supported for this query.
type: object
properties:
next_key:
@@ -48599,6 +48475,12 @@ definitions:
title: Module is the type for VersionInfo
cosmos_sdk_version:
type: string
+ comet_server_version:
+ type: string
+ runtime_version:
+ type: string
+ stf_version:
+ type: string
description: VersionInfo is the type for the GetNodeInfoResponse message.
cosmos.base.node.v1beta1.ConfigResponse:
type: object
@@ -48636,7 +48518,7 @@ definitions:
type: string
format: byte
title: validator hash provided by the consensus header
- description: StateResponse defines the response structure for the status of a node.
+ description: StatusResponse defines the response structure for the status of a node.
cosmos.base.v1beta1.DecCoin:
type: object
properties:
@@ -52438,66 +52320,6 @@ definitions:
type: string
title: maximum supply for the token
description: QueryParamsResponse is the response type for the Query/Params RPC method.
- cosmos.params.v1beta1.ParamChange:
- type: object
- properties:
- subspace:
- type: string
- key:
- type: string
- value:
- type: string
- description: |-
- ParamChange defines an individual parameter change, for use in
- ParameterChangeProposal.
- cosmos.params.v1beta1.QueryParamsResponse:
- type: object
- properties:
- param:
- description: param defines the queried parameter.
- type: object
- properties:
- subspace:
- type: string
- key:
- type: string
- value:
- type: string
- description: QueryParamsResponse is response type for the Query/Params RPC method.
- cosmos.params.v1beta1.QuerySubspacesResponse:
- type: object
- properties:
- subspaces:
- type: array
- items:
- type: object
- properties:
- subspace:
- type: string
- keys:
- type: array
- items:
- type: string
- description: >-
- Subspace defines a parameter subspace name and all the keys that
- exist for
-
- the subspace.
- description: |-
- QuerySubspacesResponse defines the response types for querying for all
- registered subspaces and all keys for a subspace.
- cosmos.params.v1beta1.Subspace:
- type: object
- properties:
- subspace:
- type: string
- keys:
- type: array
- items:
- type: string
- description: |-
- Subspace defines a parameter subspace name and all the keys that exist for
- the subspace.
cosmos.slashing.v1beta1.Params:
type: object
properties:
@@ -52864,6 +52686,20 @@ definitions:
details:
type: string
description: details define other optional details.
+ metadata:
+ description: metadata defines extra information about the validator.
+ type: object
+ properties:
+ profile_pic_uri:
+ type: string
+ description: profile_pic_uri defines a link to the validator profile picture.
+ social_handle_uris:
+ type: array
+ items:
+ type: string
+ description: >-
+ social_handle_uris defines a string array of uris to the
+ validator's social handles.
description: Description defines a validator description.
cosmos.staking.v1beta1.HistoricalInfo:
type: object
@@ -53076,6 +52912,22 @@ definitions:
details:
type: string
description: details define other optional details.
+ metadata:
+ description: metadata defines extra information about the validator.
+ type: object
+ properties:
+ profile_pic_uri:
+ type: string
+ description: >-
+ profile_pic_uri defines a link to the validator profile
+ picture.
+ social_handle_uris:
+ type: array
+ items:
+ type: string
+ description: >-
+ social_handle_uris defines a string array of uris to the
+ validator's social handles.
unbonding_height:
type: string
format: int64
@@ -53169,6 +53021,20 @@ definitions:
recent HistoricalInfo
(`n` is set by the staking module's `historical_entries` parameter).
+ cosmos.staking.v1beta1.Metadata:
+ type: object
+ properties:
+ profile_pic_uri:
+ type: string
+ description: profile_pic_uri defines a link to the validator profile picture.
+ social_handle_uris:
+ type: array
+ items:
+ type: string
+ description: >-
+ social_handle_uris defines a string array of uris to the validator's
+ social handles.
+ description: Metadata defines extra information about the validator.
cosmos.staking.v1beta1.Params:
type: object
properties:
@@ -53540,6 +53406,22 @@ definitions:
details:
type: string
description: details define other optional details.
+ metadata:
+ description: metadata defines extra information about the validator.
+ type: object
+ properties:
+ profile_pic_uri:
+ type: string
+ description: >-
+ profile_pic_uri defines a link to the validator profile
+ picture.
+ social_handle_uris:
+ type: array
+ items:
+ type: string
+ description: >-
+ social_handle_uris defines a string array of uris to the
+ validator's social handles.
unbonding_height:
type: string
format: int64
@@ -53725,6 +53607,22 @@ definitions:
details:
type: string
description: details define other optional details.
+ metadata:
+ description: metadata defines extra information about the validator.
+ type: object
+ properties:
+ profile_pic_uri:
+ type: string
+ description: >-
+ profile_pic_uri defines a link to the validator profile
+ picture.
+ social_handle_uris:
+ type: array
+ items:
+ type: string
+ description: >-
+ social_handle_uris defines a string array of uris to the
+ validator's social handles.
unbonding_height:
type: string
format: int64
@@ -54047,6 +53945,22 @@ definitions:
details:
type: string
description: details define other optional details.
+ metadata:
+ description: metadata defines extra information about the validator.
+ type: object
+ properties:
+ profile_pic_uri:
+ type: string
+ description: >-
+ profile_pic_uri defines a link to the validator
+ profile picture.
+ social_handle_uris:
+ type: array
+ items:
+ type: string
+ description: >-
+ social_handle_uris defines a string array of uris to
+ the validator's social handles.
unbonding_height:
type: string
format: int64
@@ -54614,6 +54528,22 @@ definitions:
details:
type: string
description: details define other optional details.
+ metadata:
+ description: metadata defines extra information about the validator.
+ type: object
+ properties:
+ profile_pic_uri:
+ type: string
+ description: >-
+ profile_pic_uri defines a link to the validator profile
+ picture.
+ social_handle_uris:
+ type: array
+ items:
+ type: string
+ description: >-
+ social_handle_uris defines a string array of uris to the
+ validator's social handles.
unbonding_height:
type: string
format: int64
@@ -54885,6 +54815,22 @@ definitions:
details:
type: string
description: details define other optional details.
+ metadata:
+ description: metadata defines extra information about the validator.
+ type: object
+ properties:
+ profile_pic_uri:
+ type: string
+ description: >-
+ profile_pic_uri defines a link to the validator profile
+ picture.
+ social_handle_uris:
+ type: array
+ items:
+ type: string
+ description: >-
+ social_handle_uris defines a string array of uris to the
+ validator's social handles.
unbonding_height:
type: string
format: int64
@@ -55480,6 +55426,22 @@ definitions:
details:
type: string
description: details define other optional details.
+ metadata:
+ description: metadata defines extra information about the validator.
+ type: object
+ properties:
+ profile_pic_uri:
+ type: string
+ description: >-
+ profile_pic_uri defines a link to the validator profile
+ picture.
+ social_handle_uris:
+ type: array
+ items:
+ type: string
+ description: >-
+ social_handle_uris defines a string array of uris to the
+ validator's social handles.
unbonding_height:
type: string
format: int64
@@ -56107,9 +56069,6 @@ definitions:
emitted from the ante. Whereas Logs contains the events, with
additional metadata, emitted only by processing the messages.
-
-
- Since: cosmos-sdk 0.42.11, 0.44.5, 0.45
description: >-
TxResponse defines a structure containing relevant tx data and metadata.
The
@@ -56576,9 +56535,6 @@ definitions:
emitted from the ante. Whereas Logs contains the events, with
additional metadata, emitted only by processing the messages.
-
-
- Since: cosmos-sdk 0.42.11, 0.44.5, 0.45
description: |-
BroadcastTxResponse is the response type for the
Service.BroadcastTx method.
@@ -57544,9 +57500,6 @@ definitions:
emitted from the ante. Whereas Logs contains the events, with
additional metadata, emitted only by processing the messages.
-
-
- Since: cosmos-sdk 0.42.11, 0.44.5, 0.45
description: GetTxResponse is the response type for the Service.GetTx method.
cosmos.tx.v1beta1.GetTxsEventResponse:
type: object
@@ -57759,9 +57712,6 @@ definitions:
emitted from the ante. Whereas Logs contains the events, with
additional metadata, emitted only by processing the messages.
-
-
- Since: cosmos-sdk 0.42.11, 0.44.5, 0.45
description: >-
TxResponse defines a structure containing relevant tx data and
metadata. The
@@ -58618,14 +58568,6 @@ definitions:
will not
be processed by the chain.
-
-
- Note, if unordered=true this value MUST be set
-
- and will act as a short-lived TTL in which the transaction is
- deemed valid
-
- and kept in memory to prevent duplicates.
unordered:
type: boolean
description: >-
@@ -58644,12 +58586,27 @@ definitions:
Note, when set to true, the existing 'timeout_height' value must
- be set and
- will be used to correspond to a height in which the transaction is
- deemed
+ be set and will be used to correspond to a time_stamp in which the
+ transaction is deemed
valid.
+ timeout_timestamp:
+ type: string
+ format: date-time
+ description: >-
+ timeout_timestamp is the block time after which this transaction
+ will not
+
+ be processed by the chain.
+
+
+ Note, if unordered=true this value MUST be set
+
+ and will act as a short-lived TTL in which the transaction is
+ deemed valid
+
+ and kept in memory to prevent duplicates.
extension_options:
type: array
items:
@@ -59233,14 +59190,6 @@ definitions:
not
be processed by the chain.
-
-
- Note, if unordered=true this value MUST be set
-
- and will act as a short-lived TTL in which the transaction is deemed
- valid
-
- and kept in memory to prevent duplicates.
unordered:
type: boolean
description: >-
@@ -59256,13 +59205,28 @@ definitions:
transaction execution.
- Note, when set to true, the existing 'timeout_height' value must be
- set and
+ Note, when set to true, the existing 'timeout_height' value must
- will be used to correspond to a height in which the transaction is
- deemed
+ be set and will be used to correspond to a time_stamp in which the
+ transaction is deemed
valid.
+ timeout_timestamp:
+ type: string
+ format: date-time
+ description: >-
+ timeout_timestamp is the block time after which this transaction will
+ not
+
+ be processed by the chain.
+
+
+ Note, if unordered=true this value MUST be set
+
+ and will act as a short-lived TTL in which the transaction is deemed
+ valid
+
+ and kept in memory to prevent duplicates.
extension_options:
type: array
items:
@@ -65192,152 +65156,6 @@ definitions:
breaker for Msg's of all type URLs.
- LEVEL_SUPER_ADMIN: LEVEL_SUPER_ADMIN indicates that the account can take all circuit breaker
actions and can grant permissions to other accounts.
- cometbft.abci.v1.CommitInfo:
- type: object
- properties:
- round:
- type: integer
- format: int32
- votes:
- type: array
- items:
- type: object
- properties:
- validator:
- type: object
- properties:
- address:
- type: string
- format: byte
- title: The first 20 bytes of SHA256(public key)
- power:
- type: string
- format: int64
- description: The voting power
- title: PubKey pub_key = 2 [(gogoproto.nullable)=false];
- description: Validator in the validator set.
- block_id_flag:
- type: string
- enum:
- - BLOCK_ID_FLAG_UNKNOWN
- - BLOCK_ID_FLAG_ABSENT
- - BLOCK_ID_FLAG_COMMIT
- - BLOCK_ID_FLAG_NIL
- default: BLOCK_ID_FLAG_UNKNOWN
- description: |-
- - BLOCK_ID_FLAG_UNKNOWN: Indicates an error condition
- - BLOCK_ID_FLAG_ABSENT: The vote was not received
- - BLOCK_ID_FLAG_COMMIT: Voted for the block that received the majority
- - BLOCK_ID_FLAG_NIL: Voted for nil
- title: BlockIdFlag indicates which BlockID the signature is for
- description: VoteInfo contains the information about the vote.
- description: CommitInfo contains votes for the particular round.
- cometbft.abci.v1.Misbehavior:
- type: object
- properties:
- type:
- type: string
- enum:
- - MISBEHAVIOR_TYPE_UNKNOWN
- - MISBEHAVIOR_TYPE_DUPLICATE_VOTE
- - MISBEHAVIOR_TYPE_LIGHT_CLIENT_ATTACK
- default: MISBEHAVIOR_TYPE_UNKNOWN
- description: |-
- The type of misbehavior committed by a validator.
-
- - MISBEHAVIOR_TYPE_UNKNOWN: Unknown
- - MISBEHAVIOR_TYPE_DUPLICATE_VOTE: Duplicate vote
- - MISBEHAVIOR_TYPE_LIGHT_CLIENT_ATTACK: Light client attack
- validator:
- type: object
- properties:
- address:
- type: string
- format: byte
- title: The first 20 bytes of SHA256(public key)
- power:
- type: string
- format: int64
- description: The voting power
- title: PubKey pub_key = 2 [(gogoproto.nullable)=false];
- description: Validator in the validator set.
- title: The offending validator
- height:
- type: string
- format: int64
- title: The height when the offense occurred
- time:
- type: string
- format: date-time
- title: The corresponding time where the offense occurred
- total_voting_power:
- type: string
- format: int64
- title: >-
- Total voting power of the validator set in case the ABCI application
- does
-
- not store historical validators.
-
- https://github.com/tendermint/tendermint/issues/4581
- description: Misbehavior is a type of misbehavior committed by a validator.
- cometbft.abci.v1.MisbehaviorType:
- type: string
- enum:
- - MISBEHAVIOR_TYPE_UNKNOWN
- - MISBEHAVIOR_TYPE_DUPLICATE_VOTE
- - MISBEHAVIOR_TYPE_LIGHT_CLIENT_ATTACK
- default: MISBEHAVIOR_TYPE_UNKNOWN
- description: |-
- The type of misbehavior committed by a validator.
-
- - MISBEHAVIOR_TYPE_UNKNOWN: Unknown
- - MISBEHAVIOR_TYPE_DUPLICATE_VOTE: Duplicate vote
- - MISBEHAVIOR_TYPE_LIGHT_CLIENT_ATTACK: Light client attack
- cometbft.abci.v1.Validator:
- type: object
- properties:
- address:
- type: string
- format: byte
- title: The first 20 bytes of SHA256(public key)
- power:
- type: string
- format: int64
- description: The voting power
- title: PubKey pub_key = 2 [(gogoproto.nullable)=false];
- description: Validator in the validator set.
- cometbft.abci.v1.VoteInfo:
- type: object
- properties:
- validator:
- type: object
- properties:
- address:
- type: string
- format: byte
- title: The first 20 bytes of SHA256(public key)
- power:
- type: string
- format: int64
- description: The voting power
- title: PubKey pub_key = 2 [(gogoproto.nullable)=false];
- description: Validator in the validator set.
- block_id_flag:
- type: string
- enum:
- - BLOCK_ID_FLAG_UNKNOWN
- - BLOCK_ID_FLAG_ABSENT
- - BLOCK_ID_FLAG_COMMIT
- - BLOCK_ID_FLAG_NIL
- default: BLOCK_ID_FLAG_UNKNOWN
- description: |-
- - BLOCK_ID_FLAG_UNKNOWN: Indicates an error condition
- - BLOCK_ID_FLAG_ABSENT: The vote was not received
- - BLOCK_ID_FLAG_COMMIT: Voted for the block that received the majority
- - BLOCK_ID_FLAG_NIL: Voted for nil
- title: BlockIdFlag indicates which BlockID the signature is for
- description: VoteInfo contains the information about the vote.
cometbft.types.v1.ABCIParams:
type: object
properties:
@@ -65704,214 +65522,6 @@ definitions:
It was named app_version in CometBFT 0.34.
description: VersionParams contain the version of specific components of CometBFT.
- cosmos.consensus.v1.CometInfo:
- type: object
- properties:
- evidence:
- type: array
- items:
- type: object
- properties:
- type:
- type: string
- enum:
- - MISBEHAVIOR_TYPE_UNKNOWN
- - MISBEHAVIOR_TYPE_DUPLICATE_VOTE
- - MISBEHAVIOR_TYPE_LIGHT_CLIENT_ATTACK
- default: MISBEHAVIOR_TYPE_UNKNOWN
- description: |-
- The type of misbehavior committed by a validator.
-
- - MISBEHAVIOR_TYPE_UNKNOWN: Unknown
- - MISBEHAVIOR_TYPE_DUPLICATE_VOTE: Duplicate vote
- - MISBEHAVIOR_TYPE_LIGHT_CLIENT_ATTACK: Light client attack
- validator:
- type: object
- properties:
- address:
- type: string
- format: byte
- title: The first 20 bytes of SHA256(public key)
- power:
- type: string
- format: int64
- description: The voting power
- title: PubKey pub_key = 2 [(gogoproto.nullable)=false];
- description: Validator in the validator set.
- title: The offending validator
- height:
- type: string
- format: int64
- title: The height when the offense occurred
- time:
- type: string
- format: date-time
- title: The corresponding time where the offense occurred
- total_voting_power:
- type: string
- format: int64
- title: >-
- Total voting power of the validator set in case the ABCI
- application does
-
- not store historical validators.
-
- https://github.com/tendermint/tendermint/issues/4581
- description: Misbehavior is a type of misbehavior committed by a validator.
- validators_hash:
- type: string
- format: byte
- proposer_address:
- type: string
- format: byte
- last_commit:
- type: object
- properties:
- round:
- type: integer
- format: int32
- votes:
- type: array
- items:
- type: object
- properties:
- validator:
- type: object
- properties:
- address:
- type: string
- format: byte
- title: The first 20 bytes of SHA256(public key)
- power:
- type: string
- format: int64
- description: The voting power
- title: PubKey pub_key = 2 [(gogoproto.nullable)=false];
- description: Validator in the validator set.
- block_id_flag:
- type: string
- enum:
- - BLOCK_ID_FLAG_UNKNOWN
- - BLOCK_ID_FLAG_ABSENT
- - BLOCK_ID_FLAG_COMMIT
- - BLOCK_ID_FLAG_NIL
- default: BLOCK_ID_FLAG_UNKNOWN
- description: |-
- - BLOCK_ID_FLAG_UNKNOWN: Indicates an error condition
- - BLOCK_ID_FLAG_ABSENT: The vote was not received
- - BLOCK_ID_FLAG_COMMIT: Voted for the block that received the majority
- - BLOCK_ID_FLAG_NIL: Voted for nil
- title: BlockIdFlag indicates which BlockID the signature is for
- description: VoteInfo contains the information about the vote.
- description: CommitInfo contains votes for the particular round.
- description: CometInfo defines the structure of the x/consensus module's comet info.
- cosmos.consensus.v1.QueryGetCometInfoResponse:
- type: object
- properties:
- comet_info:
- description: comet_info is the comet info of the x/consensus module.
- type: object
- properties:
- evidence:
- type: array
- items:
- type: object
- properties:
- type:
- type: string
- enum:
- - MISBEHAVIOR_TYPE_UNKNOWN
- - MISBEHAVIOR_TYPE_DUPLICATE_VOTE
- - MISBEHAVIOR_TYPE_LIGHT_CLIENT_ATTACK
- default: MISBEHAVIOR_TYPE_UNKNOWN
- description: |-
- The type of misbehavior committed by a validator.
-
- - MISBEHAVIOR_TYPE_UNKNOWN: Unknown
- - MISBEHAVIOR_TYPE_DUPLICATE_VOTE: Duplicate vote
- - MISBEHAVIOR_TYPE_LIGHT_CLIENT_ATTACK: Light client attack
- validator:
- type: object
- properties:
- address:
- type: string
- format: byte
- title: The first 20 bytes of SHA256(public key)
- power:
- type: string
- format: int64
- description: The voting power
- title: PubKey pub_key = 2 [(gogoproto.nullable)=false];
- description: Validator in the validator set.
- title: The offending validator
- height:
- type: string
- format: int64
- title: The height when the offense occurred
- time:
- type: string
- format: date-time
- title: The corresponding time where the offense occurred
- total_voting_power:
- type: string
- format: int64
- title: >-
- Total voting power of the validator set in case the ABCI
- application does
-
- not store historical validators.
-
- https://github.com/tendermint/tendermint/issues/4581
- description: Misbehavior is a type of misbehavior committed by a validator.
- validators_hash:
- type: string
- format: byte
- proposer_address:
- type: string
- format: byte
- last_commit:
- type: object
- properties:
- round:
- type: integer
- format: int32
- votes:
- type: array
- items:
- type: object
- properties:
- validator:
- type: object
- properties:
- address:
- type: string
- format: byte
- title: The first 20 bytes of SHA256(public key)
- power:
- type: string
- format: int64
- description: The voting power
- title: PubKey pub_key = 2 [(gogoproto.nullable)=false];
- description: Validator in the validator set.
- block_id_flag:
- type: string
- enum:
- - BLOCK_ID_FLAG_UNKNOWN
- - BLOCK_ID_FLAG_ABSENT
- - BLOCK_ID_FLAG_COMMIT
- - BLOCK_ID_FLAG_NIL
- default: BLOCK_ID_FLAG_UNKNOWN
- description: |-
- - BLOCK_ID_FLAG_UNKNOWN: Indicates an error condition
- - BLOCK_ID_FLAG_ABSENT: The vote was not received
- - BLOCK_ID_FLAG_COMMIT: Voted for the block that received the majority
- - BLOCK_ID_FLAG_NIL: Voted for nil
- title: BlockIdFlag indicates which BlockID the signature is for
- description: VoteInfo contains the information about the vote.
- description: CommitInfo contains votes for the particular round.
- description: >-
- QueryCometInfoResponse defines the response type for querying x/consensus
- comet info.
cosmos.consensus.v1.QueryParamsResponse:
type: object
properties:
@@ -66592,3 +66202,79 @@ definitions:
field's configuration is global (not module specific).
description: QueryConfigResponse is the Query/Config response type.
+ cosmos.protocolpool.v1.QueryCommunityPoolResponse:
+ type: object
+ properties:
+ pool:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: |-
+ DecCoin defines a token with a denomination and a decimal amount.
+
+ NOTE: The amount field is an Dec which implements the custom method
+ signatures required by gogoproto.
+ description: pool defines community pool's coins.
+ description: >-
+ QueryCommunityPoolResponse is the response type for the
+ Query/CommunityPool
+
+ RPC method.
+ cosmos.protocolpool.v1.QueryUnclaimedBudgetResponse:
+ type: object
+ properties:
+ claimed_amount:
+ title: claimed_amount is the budget amount already claimed by the recipient
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: |-
+ Coin defines a token with a denomination and an amount.
+
+ NOTE: The amount field is an Int which implements the custom method
+ signatures required by gogoproto.
+ unclaimed_amount:
+ title: >-
+ unclaimed_amount is the remaining budget amount that is unclaimed by
+ the recipient
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: |-
+ Coin defines a token with a denomination and an amount.
+
+ NOTE: The amount field is an Int which implements the custom method
+ signatures required by gogoproto.
+ next_claim_from:
+ type: string
+ format: date-time
+ description: >-
+ next_claim_from is the next starting claim time for fund distribution.
+
+ It represents the time when we can claim funds after the period time
+ interval has passed.
+ period:
+ type: string
+ title: period is the time interval for fund distribution
+ tranches_left:
+ type: string
+ format: uint64
+ title: >-
+ tranches_left is the number of tranches left for the amount to be
+ distributed
+ description: >-
+ QueryUnclaimedBudgetResponse is the response type for the
+ Query/UnclaimedBudget
+
+ RPC method.
diff --git a/server/v2/CHANGELOG.md b/server/v2/CHANGELOG.md
index 4a6587a750..acd2853a86 100644
--- a/server/v2/CHANGELOG.md
+++ b/server/v2/CHANGELOG.md
@@ -22,6 +22,8 @@ Each entry must include the Github issue reference in the following format:
## [Unreleased]
+* [#23486](https://github.com/cosmos/cosmos-sdk/pull/23486) Add `server/v2/api/swagger` server component.
+
## [v2.0.0-beta.2](https://github.com/cosmos/cosmos-sdk/releases/tag/server/v2.0.0-beta.2)
* [#23411](https://github.com/cosmos/cosmos-sdk/pull/23411) Use only command name in `IsAppRequired()` instead of command usage
diff --git a/server/v2/api/grpcgateway/handler.go b/server/v2/api/grpcgateway/handler.go
index ec9ebe1593..5dc421aeb7 100644
--- a/server/v2/api/grpcgateway/handler.go
+++ b/server/v2/api/grpcgateway/handler.go
@@ -23,7 +23,6 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
"cosmossdk.io/core/transaction"
- "cosmossdk.io/log"
"cosmossdk.io/server/v2/appmanager"
)
@@ -47,7 +46,7 @@ type queryMetadata struct {
// mountHTTPRoutes registers handlers for from proto HTTP annotations to the http.ServeMux, using runtime.ServeMux as a fallback/
// last ditch effort router.
-func mountHTTPRoutes[T transaction.Tx](logger log.Logger, httpMux *http.ServeMux, fallbackRouter *runtime.ServeMux, am appmanager.AppManager[T]) error {
+func mountHTTPRoutes[T transaction.Tx](httpMux *http.ServeMux, fallbackRouter *runtime.ServeMux, am appmanager.AppManager[T]) error {
annotationMapping, err := newHTTPAnnotationMapping()
if err != nil {
return err
@@ -56,12 +55,12 @@ func mountHTTPRoutes[T transaction.Tx](logger log.Logger, httpMux *http.ServeMux
if err != nil {
return err
}
- registerMethods[T](logger, httpMux, am, fallbackRouter, annotationToMetadata)
+ registerMethods[T](httpMux, am, fallbackRouter, annotationToMetadata)
return nil
}
// registerMethods registers the endpoints specified in the annotation mapping to the http.ServeMux.
-func registerMethods[T transaction.Tx](logger log.Logger, mux *http.ServeMux, am appmanager.AppManager[T], fallbackRouter *runtime.ServeMux, annotationToMetadata map[string]queryMetadata) {
+func registerMethods[T transaction.Tx](mux *http.ServeMux, am appmanager.AppManager[T], fallbackRouter *runtime.ServeMux, annotationToMetadata map[string]queryMetadata) {
// register the fallback handler. this will run if the mux isn't able to get a match from the registrations below.
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fallbackRouter.ServeHTTP(w, r)
diff --git a/server/v2/api/grpcgateway/server.go b/server/v2/api/grpcgateway/server.go
index 938ecfb66a..5301990ee4 100644
--- a/server/v2/api/grpcgateway/server.go
+++ b/server/v2/api/grpcgateway/server.go
@@ -76,7 +76,7 @@ func New[T transaction.Tx](
s.logger = logger.With(log.ModuleKey, s.Name())
s.config = serverCfg
mux := http.NewServeMux()
- err := mountHTTPRoutes[T](logger, mux, s.GRPCGatewayRouter, appManager)
+ err := mountHTTPRoutes(mux, s.GRPCGatewayRouter, appManager)
if err != nil {
return nil, fmt.Errorf("failed to register gRPC gateway annotations: %w", err)
}
diff --git a/server/v2/api/swagger/config.go b/server/v2/api/swagger/config.go
new file mode 100644
index 0000000000..42d5e6b727
--- /dev/null
+++ b/server/v2/api/swagger/config.go
@@ -0,0 +1,34 @@
+package swagger
+
+// Config defines the configuration for the Swagger UI server
+type Config struct {
+ // Enable enables/disables the Swagger UI server
+ Enable bool `mapstructure:"enable" toml:"enable" comment:"Enable enables/disables the Swagger UI server"`
+ // Address defines the server address to bind to
+ Address string `mapstructure:"address" toml:"address" comment:"Address defines the server address to bind to"`
+}
+
+// DefaultConfig returns the default configuration
+func DefaultConfig() *Config {
+ return &Config{
+ Enable: true,
+ Address: "localhost:8090",
+ }
+}
+
+// CfgOption defines a function for configuring the settings
+type CfgOption func(*Config)
+
+// OverwriteDefaultConfig overwrites the default config with the new config.
+func OverwriteDefaultConfig(newCfg *Config) CfgOption {
+ return func(cfg *Config) {
+ *cfg = *newCfg
+ }
+}
+
+// Disable the grpc server by default (default enabled).
+func Disable() CfgOption {
+ return func(cfg *Config) {
+ cfg.Enable = false
+ }
+}
diff --git a/server/v2/api/swagger/doc.go b/server/v2/api/swagger/doc.go
new file mode 100644
index 0000000000..5c494beaf9
--- /dev/null
+++ b/server/v2/api/swagger/doc.go
@@ -0,0 +1,14 @@
+/*
+Package swagger provides Swagger UI server/v2 component.
+
+Example usage in commands.go:
+
+ swaggerServer, err := swaggerv2.New[T](
+ logger.With(log.ModuleKey, "swagger"),
+ deps.GlobalConfig,
+ swaggerv2.CfgOption(func(cfg *swaggerv2.Config) {
+ cfg.SwaggerUI = docs.SwaggerUI
+ }),
+ )
+*/
+package swagger
diff --git a/server/v2/api/swagger/handler.go b/server/v2/api/swagger/handler.go
new file mode 100644
index 0000000000..86bd9f3d85
--- /dev/null
+++ b/server/v2/api/swagger/handler.go
@@ -0,0 +1,22 @@
+package swagger
+
+import (
+ "io/fs"
+ "net/http"
+)
+
+type swaggerHandler struct {
+ swaggerFS fs.FS
+}
+
+func (h *swaggerHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
+ // CORS headers
+ w.Header().Set("Access-Control-Allow-Origin", "*")
+ w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, OPTIONS")
+
+ if r.Method == http.MethodOptions {
+ return
+ }
+
+ http.StripPrefix("/swagger/", http.FileServer(http.FS(h.swaggerFS))).ServeHTTP(w, r)
+}
diff --git a/server/v2/api/swagger/server.go b/server/v2/api/swagger/server.go
new file mode 100644
index 0000000000..8592968ae1
--- /dev/null
+++ b/server/v2/api/swagger/server.go
@@ -0,0 +1,110 @@
+package swagger
+
+import (
+ "context"
+ "fmt"
+ "io/fs"
+ "net/http"
+
+ "cosmossdk.io/core/server"
+ "cosmossdk.io/core/transaction"
+ "cosmossdk.io/log"
+ serverv2 "cosmossdk.io/server/v2"
+)
+
+var (
+ _ serverv2.ServerComponent[transaction.Tx] = (*Server[transaction.Tx])(nil)
+ _ serverv2.HasConfig = (*Server[transaction.Tx])(nil)
+)
+
+const ServerName = "swagger"
+
+// Server represents a Swagger UI server
+type Server[T transaction.Tx] struct {
+ logger log.Logger
+ config *Config
+ cfgOptions []CfgOption
+
+ server *http.Server
+}
+
+// New creates a new Swagger UI server
+func New[T transaction.Tx](
+ logger log.Logger,
+ swaggerUI fs.FS,
+ config server.ConfigMap,
+ cfgOptions ...CfgOption,
+) (*Server[T], error) {
+ s := &Server[T]{
+ logger: logger.With(log.ModuleKey, ServerName),
+ cfgOptions: cfgOptions,
+ }
+
+ serverCfg := s.Config().(*Config)
+ if len(config) > 0 {
+ if err := serverv2.UnmarshalSubConfig(config, s.Name(), &serverCfg); err != nil {
+ return s, fmt.Errorf("failed to unmarshal config: %w", err)
+ }
+ }
+ s.config = serverCfg
+
+ mux := http.NewServeMux()
+ mux.Handle("/swagger/", &swaggerHandler{
+ swaggerFS: swaggerUI,
+ })
+ mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
+ http.Redirect(w, r, "/swagger/", http.StatusMovedPermanently)
+ })
+
+ s.server = &http.Server{
+ Addr: s.config.Address,
+ Handler: mux,
+ }
+
+ return s, nil
+}
+
+// Name returns the server's name
+func (s *Server[T]) Name() string {
+ return ServerName
+}
+
+// Config returns the server configuration
+func (s *Server[T]) Config() any {
+ if s.config == nil || s.config.Address == "" {
+ cfg := DefaultConfig()
+ // overwrite the default config with the provided options
+ for _, opt := range s.cfgOptions {
+ opt(cfg)
+ }
+
+ return cfg
+ }
+
+ return s.config
+}
+
+// Start starts the server
+func (s *Server[T]) Start(ctx context.Context) error {
+ if !s.config.Enable {
+ s.logger.Info(fmt.Sprintf("%s server is disabled via config", s.Name()))
+ return nil
+ }
+
+ s.logger.Info("starting swagger server...", "address", s.config.Address)
+ if err := s.server.ListenAndServe(); err != nil && err != http.ErrServerClosed {
+ return fmt.Errorf("failed to start swagger server: %w", err)
+ }
+
+ return nil
+}
+
+// Stop stops the server
+func (s *Server[T]) Stop(ctx context.Context) error {
+ if !s.config.Enable {
+ return nil
+ }
+
+ s.logger.Info("stopping swagger server...", "address", s.config.Address)
+ return s.server.Shutdown(ctx)
+}
diff --git a/server/v2/api/telemetry/server.go b/server/v2/api/telemetry/server.go
index 62649c9886..c8dd5294ef 100644
--- a/server/v2/api/telemetry/server.go
+++ b/server/v2/api/telemetry/server.go
@@ -29,7 +29,7 @@ type Server[T transaction.Tx] struct {
}
// New creates a new telemetry server.
-func New[T transaction.Tx](cfg server.ConfigMap, logger log.Logger, enableTelemetry func(), cfgOptions ...CfgOption) (*Server[T], error) {
+func New[T transaction.Tx](logger log.Logger, enableTelemetry func(), cfg server.ConfigMap, cfgOptions ...CfgOption) (*Server[T], error) {
srv := &Server[T]{}
serverCfg := srv.Config().(*Config)
if len(cfg) > 0 {
diff --git a/simapp/v2/simdv2/cmd/commands.go b/simapp/v2/simdv2/cmd/commands.go
index cb4cac0779..87c939fee6 100644
--- a/simapp/v2/simdv2/cmd/commands.go
+++ b/simapp/v2/simdv2/cmd/commands.go
@@ -15,6 +15,7 @@ import (
grpcserver "cosmossdk.io/server/v2/api/grpc"
"cosmossdk.io/server/v2/api/grpcgateway"
"cosmossdk.io/server/v2/api/rest"
+ "cosmossdk.io/server/v2/api/swagger"
"cosmossdk.io/server/v2/api/telemetry"
"cosmossdk.io/server/v2/cometbft"
serverstore "cosmossdk.io/server/v2/store"
@@ -24,6 +25,7 @@ import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/config"
"github.com/cosmos/cosmos-sdk/client/debug"
+ "github.com/cosmos/cosmos-sdk/client/docs"
"github.com/cosmos/cosmos-sdk/client/grpc/cmtservice"
nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node"
"github.com/cosmos/cosmos-sdk/client/keys"
@@ -85,6 +87,7 @@ func InitRootCmd[T transaction.Tx](
&telemetry.Server[T]{},
&rest.Server[T]{},
&grpcgateway.Server[T]{},
+ &swagger.Server[T]{},
)
}
@@ -122,7 +125,12 @@ func InitRootCmd[T transaction.Tx](
return nil, err
}
- telemetryServer, err := telemetry.New[T](deps.GlobalConfig, logger, sdktelemetry.EnableTelemetry)
+ telemetryServer, err := telemetry.New[T](logger, sdktelemetry.EnableTelemetry, deps.GlobalConfig)
+ if err != nil {
+ return nil, err
+ }
+
+ swaggerServer, err := swagger.New[T](logger, docs.GetSwaggerFS(), deps.GlobalConfig)
if err != nil {
return nil, err
}
@@ -168,6 +176,7 @@ func InitRootCmd[T transaction.Tx](
telemetryServer,
restServer,
grpcgatewayServer,
+ swaggerServer,
)
}
diff --git a/tools/confix/data/v2-app.toml b/tools/confix/data/v2-app.toml
index 51c1e3298d..a94c44d487 100644
--- a/tools/confix/data/v2-app.toml
+++ b/tools/confix/data/v2-app.toml
@@ -1,32 +1,44 @@
[comet]
+
# min-retain-blocks defines the minimum block height offset from the current block being committed, such that all blocks past this offset are pruned from CometBFT. A value of 0 indicates that no blocks should be pruned.
min-retain-blocks = 0
+
# halt-height contains a non-zero block height at which a node will gracefully halt and shutdown that can be used to assist upgrades and testing.
halt-height = 0
+
# halt-time contains a non-zero minimum block time (in Unix seconds) at which a node will gracefully halt and shutdown that can be used to assist upgrades and testing.
halt-time = 0
+
# address defines the CometBFT RPC server address to bind to.
address = 'tcp://127.0.0.1:26658'
+
# transport defines the CometBFT RPC server transport protocol: socket, grpc
transport = 'socket'
+
# trace enables the CometBFT RPC server to output trace information about its internal operations.
trace = false
+
# standalone starts the application without the CometBFT node. The node should be started separately.
standalone = false
+
# index-abci-events defines the set of events in the form {eventType}.{attributeKey}, which informs CometBFT what to index. If empty, all events will be indexed.
index-abci-events = []
+
# disable-index-abci-events disables the ABCI event indexing done by CometBFT. Useful when relying on the SDK indexer for event indexing, but still want events to be included in FinalizeBlockResponse.
disable-index-abci-events = false
+
# disable-abci-events disables all ABCI events. Useful when relying on the SDK indexer for event indexing.
disable-abci-events = false
# mempool defines the configuration for the SDK built-in app-side mempool implementations.
[comet.mempool]
+
# max-txs defines the maximum number of transactions that can be in the mempool. A value of 0 indicates an unbounded mempool, a negative value disables the app-side mempool.
max-txs = -1
# indexer defines the configuration for the SDK built-in indexer implementation.
[comet.indexer]
+
# Buffer size of the channels used for buffering data sent to indexer go routines.
channel_buffer_size = 1024
@@ -34,76 +46,133 @@ channel_buffer_size = 1024
[comet.indexer.target]
[grpc]
+
# Enable defines if the gRPC server should be enabled.
enable = true
+
# Address defines the gRPC server address to bind to.
address = 'localhost:9090'
+
# MaxRecvMsgSize defines the max message size in bytes the server can receive.
# The default value is 10MB.
max-recv-msg-size = 10485760
+
# MaxSendMsgSize defines the max message size in bytes the server can send.
# The default value is math.MaxInt32.
max-send-msg-size = 2147483647
[grpc-gateway]
-# Enable defines if the gRPC-gateway should be enabled.
+
+# Enable defines if the gRPC-Gateway should be enabled.
enable = true
-# Address defines the address the gRPC-gateway server binds to.
+
+# Address defines the address the gRPC-Gateway server binds to.
address = 'localhost:1317'
[rest]
+
# Enable defines if the REST server should be enabled.
enable = true
+
# Address defines the REST server address to bind to.
address = 'localhost:8080'
[server]
+
# minimum-gas-prices defines the price which a validator is willing to accept for processing a transaction. A transaction's fees must meet the minimum of any denomination specified in this config (e.g. 0.25token1;0.0001token2).
minimum-gas-prices = '0stake'
[store]
+
# The type of database for application and snapshots databases.
app-db-backend = 'goleveldb'
[store.options]
+
# State commitment database type. Currently we support: "iavl" and "iavl-v2"
sc-type = 'iavl'
# Pruning options for state commitment
[store.options.sc-pruning-option]
+
# Number of recent heights to keep on disk.
keep-recent = 2
+
# Height interval at which pruned heights are removed from disk.
interval = 100
[store.options.iavl-config]
+
# CacheSize set the size of the iavl tree cache.
-cache-size = 100000
+cache-size = 500000
+
# If true, the tree will work like no fast storage and always not upgrade fast storage.
skip-fast-storage-upgrade = true
+[store.options.iavl-v2-config]
+
+# CheckpointInterval set the interval of the checkpoint.
+checkpoint-interval = 0
+
+# CheckpointMemory set the memory of the checkpoint.
+checkpoint-memory = 0
+
+# StateStorage set the state storage.
+state-storage = false
+
+# HeightFilter set the height filter.
+height-filter = 0
+
+# EvictionDepth set the eviction depth.
+eviction-depth = 0
+
+# PruneRatio set the prune ratio.
+prune-ratio = 0.0
+
+# MinimumKeepVersions set the minimum keep versions.
+minimum-keep-versions = 0
+
+[swagger]
+
+# Enable enables/disables the Swagger UI server
+enable = true
+
+# Address defines the server address to bind to
+address = 'localhost:8090'
+
[telemetry]
+
# Enable enables the application telemetry functionality. When enabled, an in-memory sink is also enabled by default. Operators may also enabled other sinks such as Prometheus.
enable = true
+
# Address defines the metrics server address to bind to.
address = 'localhost:7180'
+
# Prefixed with keys to separate services.
service-name = ''
+
# Enable prefixing gauge values with hostname.
enable-hostname = false
+
# Enable adding hostname to labels.
enable-hostname-label = false
+
# Enable adding service to labels.
enable-service-label = false
+
# PrometheusRetentionTime, when positive, enables a Prometheus metrics sink. It defines the retention duration in seconds.
-prometheus-retention-time = 0
+prometheus-retention-time = 600
+
# GlobalLabels defines a global set of name/value label tuples applied to all metrics emitted using the wrapper functions defined in telemetry package.
# Example:
# [["chain_id", "cosmoshub-1"]]
global-labels = []
+
# MetricsSink defines the type of metrics backend to use. Default is in memory
metrics-sink = ''
+
# StatsdAddr defines the address of a statsd server to send metrics to. Only utilized if MetricsSink is set to "statsd" or "dogstatsd".
stats-addr = ''
+
# DatadogHostname defines the hostname to use when emitting metrics to Datadog. Only utilized if MetricsSink is set to "dogstatsd".
data-dog-hostname = ''