From 8663afdfa153107a6fcc5d7aa81b9d647e63630f Mon Sep 17 00:00:00 2001 From: Runchao Han Date: Mon, 20 Jan 2025 16:40:42 +1100 Subject: [PATCH 1/4] init --- app/keepers/keepers.go | 6 +- client/docs/config.json | 56 +- contrib/images/Makefile | 2 +- proto/babylon/finality/v1/tx.proto | 1 - .../configurer/chain/commands_btcstaking.go | 2 +- test/e2e/containers/containers.go | 2 +- testutil/btcstaking-helper/keeper.go | 2 - .../btccheckpoint/v1/query.swagger.json | 409 ++++++ .../btclightclient/v1/query.swagger.json | 506 ++++++++ .../babylon/btcstaking/v1/query.swagger.json | 945 ++++++++++++++ .../btcstkconsumer/v1/query.swagger.json | 593 +++++++++ .../checkpointing/v1/query.swagger.json | 655 ++++++++++ .../babylon/epoching/v1/query.swagger.json | 835 ++++++++++++ .../babylon/finality/v1/query.swagger.json | 1151 +++++++++++++++++ .../babylon/incentive/query.swagger.json | 268 ++++ .../babylon/mint/v1/query.swagger.json | 152 +++ .../babylon/monitor/v1/query.swagger.json | 136 ++ .../zoneconcierge/v1/query.swagger.json | 950 ++++++++++++++ .../keeper/btc_consumer_delegations.go | 9 +- x/btcstaking/keeper/btc_delegations.go | 1 + .../btc_staking_consumer_events_test.go | 8 + x/btcstaking/keeper/finality_providers.go | 2 +- x/btcstaking/keeper/grpc_query.go | 3 +- x/btcstaking/keeper/msg_server.go | 2 +- .../keeper/finality_provider_registry.go | 36 - x/finality/types/tx.pb.go | 2 - 26 files changed, 6672 insertions(+), 62 deletions(-) create mode 100644 tmp-swagger-gen/babylon/btccheckpoint/v1/query.swagger.json create mode 100644 tmp-swagger-gen/babylon/btclightclient/v1/query.swagger.json create mode 100644 tmp-swagger-gen/babylon/btcstaking/v1/query.swagger.json create mode 100644 tmp-swagger-gen/babylon/btcstkconsumer/v1/query.swagger.json create mode 100644 tmp-swagger-gen/babylon/checkpointing/v1/query.swagger.json create mode 100644 tmp-swagger-gen/babylon/epoching/v1/query.swagger.json create mode 100644 tmp-swagger-gen/babylon/finality/v1/query.swagger.json create mode 100644 tmp-swagger-gen/babylon/incentive/query.swagger.json create mode 100644 tmp-swagger-gen/babylon/mint/v1/query.swagger.json create mode 100644 tmp-swagger-gen/babylon/monitor/v1/query.swagger.json create mode 100644 tmp-swagger-gen/babylon/zoneconcierge/v1/query.swagger.json diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 2b4801a21..209ddce02 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -431,7 +431,7 @@ func (ak *AppKeepers) InitKeepers( homePath, wasmConfig, WasmCapabilities(), - authtypes.NewModuleAddress(govtypes.ModuleName).String(), + appparams.AccGov.String(), wasmOpts..., ) @@ -514,7 +514,7 @@ func (ak *AppKeepers) InitKeepers( ak.BankKeeper, ak.IBCKeeper.ClientKeeper, ak.WasmKeeper, - authtypes.NewModuleAddress(govtypes.ModuleName).String(), + appparams.AccGov.String(), ) // set up BTC staking keeper @@ -569,7 +569,7 @@ func (ak *AppKeepers) InitKeepers( &ak.BTCStakingKeeper, &ak.BTCStkConsumerKeeper, scopedZoneConciergeKeeper, - authtypes.NewModuleAddress(govtypes.ModuleName).String(), + appparams.AccGov.String(), ) // add msgServiceRouter so that the epoching module can forward unwrapped messages to the staking module diff --git a/client/docs/config.json b/client/docs/config.json index 83337a2aa..e1665e73e 100644 --- a/client/docs/config.json +++ b/client/docs/config.json @@ -15,7 +15,7 @@ } }, { - "url": "./tmp-swagger-gen/babylon/btclightclient/v1/query.swagger.json", + "url": "./tmp-swagger-gen/babylon/btclightclient/v1/query.swagger.json", "operationIds": { "rename": { "Params": "BtcLightClientParams" @@ -23,7 +23,7 @@ } }, { - "url": "./tmp-swagger-gen/babylon/epoching/v1/query.swagger.json", + "url": "./tmp-swagger-gen/babylon/epoching/v1/query.swagger.json", "operationIds": { "rename": { "Params": "EpochingParams" @@ -31,12 +31,60 @@ } }, { - "url": "./tmp-swagger-gen/babylon/checkpointing/v1/query.swagger.json", + "url": "./tmp-swagger-gen/babylon/checkpointing/v1/query.swagger.json", "operationIds": { "rename": { "Params": "CheckpointingParams" } } + }, + { + "url": "./tmp-swagger-gen/babylon/btcstaking/v1/query.swagger.json", + "operationIds": { + "rename": { + "Params": "BtcStakingParams" + } + } + }, + { + "url": "./tmp-swagger-gen/babylon/btcstkconsumer/v1/query.swagger.json", + "operationIds": { + "rename": { + "Params": "BtcStkConsumerParams" + } + } + }, + { + "url": "./tmp-swagger-gen/babylon/finality/v1/query.swagger.json", + "operationIds": { + "rename": { + "Params": "FinalityParams" + } + } + }, + { + "url": "./tmp-swagger-gen/babylon/incentive/v1/query.swagger.json", + "operationIds": { + "rename": { + "Params": "IncentiveParams" + } + } + }, + { + "url": "./tmp-swagger-gen/babylon/monitor/v1/query.swagger.json", + "operationIds": { + "rename": { + "Params": "MonitorParams" + } + } + }, + { + "url": "./tmp-swagger-gen/babylon/zoneconcierge/v1/query.swagger.json", + "operationIds": { + "rename": { + "Params": "ZoneConciergeParams" + } + } } ] -} +} \ No newline at end of file diff --git a/contrib/images/Makefile b/contrib/images/Makefile index 2d674d72b..ef41b46f5 100644 --- a/contrib/images/Makefile +++ b/contrib/images/Makefile @@ -29,4 +29,4 @@ cosmos-relayer: cosmos-relayer-rmi cosmos-relayer-rmi: docker rmi babylonlabs-io/cosmos-relayer 2>/dev/null; true -.PHONY: all babylond babylond-before-upgrade cosmos-relayer e2e-init-chain babylond-rmi babylond-rmi-upgrade cosmos-relayer-rmi +.PHONY: all babylond cosmos-relayer e2e-init-chain babylond-rmi cosmos-relayer-rmi diff --git a/proto/babylon/finality/v1/tx.proto b/proto/babylon/finality/v1/tx.proto index 64981377a..a19181a6c 100644 --- a/proto/babylon/finality/v1/tx.proto +++ b/proto/babylon/finality/v1/tx.proto @@ -17,7 +17,6 @@ service Msg { rpc CommitPubRandList(MsgCommitPubRandList) returns (MsgCommitPubRandListResponse); // AddFinalitySig adds a finality signature to a given block rpc AddFinalitySig(MsgAddFinalitySig) returns (MsgAddFinalitySigResponse); - // TODO: msg for evidence of equivocation. this is not specified yet // UpdateParams updates the finality module parameters. rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); // UnjailFinalityProvider defines a method for unjailing a jailed diff --git a/test/e2e/configurer/chain/commands_btcstaking.go b/test/e2e/configurer/chain/commands_btcstaking.go index bd7aede2a..701a9f2e3 100644 --- a/test/e2e/configurer/chain/commands_btcstaking.go +++ b/test/e2e/configurer/chain/commands_btcstaking.go @@ -129,7 +129,7 @@ func (n *NodeConfig) CreateBTCDelegation( // broadcast stuff cmd = append(cmd, "-b=sync", "--yes") } - // cmd = append(cmd, fmt.Sprintf("--chain-id=%s", n.chainId), "-b=sync", "--yes", "--keyring-backend=test", "--log_format=json", "--home=/home/babylon/babylondata") + cmd = append(cmd, fmt.Sprintf("--chain-id=%s", n.chainId), "-b=sync", "--yes") outBuff, _, err := n.containerManager.ExecCmd(n.t, n.Name, append(cmd, overallFlags...), "") diff --git a/test/e2e/containers/containers.go b/test/e2e/containers/containers.go index 631460f16..b6863d1ef 100644 --- a/test/e2e/containers/containers.go +++ b/test/e2e/containers/containers.go @@ -272,7 +272,7 @@ func (m *Manager) RunNodeResource(chainId string, containerName, valCondifDir st Entrypoint: []string{ "sh", "-c", - "babylond start " + FlagHome + " --log_level trace --trace", + "babylond start " + FlagHome, }, ExposedPorts: []string{"26656", "26657", "1317", "9090"}, Mounts: []string{ diff --git a/testutil/btcstaking-helper/keeper.go b/testutil/btcstaking-helper/keeper.go index 367cc3dd0..08270f9af 100644 --- a/testutil/btcstaking-helper/keeper.go +++ b/testutil/btcstaking-helper/keeper.go @@ -37,8 +37,6 @@ var ( timestampedEpoch = uint64(10) ) -// TODO: move this to keeper package rather than keeper_test so that -// it can be inherited to test other modules? type Helper struct { t testing.TB diff --git a/tmp-swagger-gen/babylon/btccheckpoint/v1/query.swagger.json b/tmp-swagger-gen/babylon/btccheckpoint/v1/query.swagger.json new file mode 100644 index 000000000..2c30a7fce --- /dev/null +++ b/tmp-swagger-gen/babylon/btccheckpoint/v1/query.swagger.json @@ -0,0 +1,409 @@ +{ + "swagger": "2.0", + "info": { + "title": "babylon/btccheckpoint/v1/query.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/babylon/btccheckpoint/v1": { + "get": { + "summary": "BtcCheckpointsInfo returns checkpoint info for a range of epochs", + "operationId": "BtcCheckpointsInfo", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btccheckpoint.v1.QueryBtcCheckpointsInfoResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btccheckpoint/v1/params": { + "get": { + "summary": "Parameters queries the parameters of the module.", + "operationId": "Params", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btccheckpoint.v1.QueryParamsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "tags": [ + "Query" + ] + } + }, + "/babylon/btccheckpoint/v1/{epoch_num}": { + "get": { + "summary": "BtcCheckpointInfo returns checkpoint info for a given epoch", + "operationId": "BtcCheckpointInfo", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btccheckpoint.v1.QueryBtcCheckpointInfoResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "epoch_num", + "description": "Number of epoch for which the earliest checkpointing btc height is\nrequested", + "in": "path", + "required": true, + "type": "string", + "format": "uint64" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btccheckpoint/v1/{epoch_num}/submissions": { + "get": { + "summary": "EpochSubmissions returns all submissions for a given epoch", + "operationId": "EpochSubmissions", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btccheckpoint.v1.QueryEpochSubmissionsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "epoch_num", + "description": "Number of epoch for which submissions are requested", + "in": "path", + "required": true, + "type": "string", + "format": "uint64" + } + ], + "tags": [ + "Query" + ] + } + } + }, + "definitions": { + "babylon.btccheckpoint.v1.BTCCheckpointInfoResponse": { + "type": "object", + "properties": { + "epoch_number": { + "type": "string", + "format": "uint64", + "description": "EpochNumber of this checkpoint." + }, + "best_submission_btc_block_height": { + "type": "integer", + "format": "int64", + "title": "btc height of the best submission of the epoch" + }, + "best_submission_btc_block_hash": { + "type": "string", + "title": "hash of the btc block which determines checkpoint btc block height i.e.\nyoungest block of best submission Hexadecimal" + }, + "best_submission_transactions": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.btccheckpoint.v1.TransactionInfoResponse" + }, + "title": "the BTC checkpoint transactions of the best submission" + }, + "best_submission_vigilante_address_list": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.btccheckpoint.v1.CheckpointAddressesResponse" + }, + "title": "list of vigilantes' addresses of the best submission" + } + }, + "description": "BTCCheckpointInfoResponse contains all data about best submission of checkpoint for\ngiven epoch. Best submission is the submission which is deeper in btc ledger." + }, + "babylon.btccheckpoint.v1.CheckpointAddressesResponse": { + "type": "object", + "properties": { + "submitter": { + "type": "string", + "description": "submitter is the address of the checkpoint submitter to BTC, extracted from\nthe checkpoint itself." + }, + "reporter": { + "type": "string", + "title": "reporter is the address of the reporter who reported the submissions,\ncalculated from submission message MsgInsertBTCSpvProof itself" + } + }, + "title": "CheckpointAddressesResponse contains the addresses of the submitter and reporter of a\ngiven checkpoint" + }, + "babylon.btccheckpoint.v1.Params": { + "type": "object", + "properties": { + "btc_confirmation_depth": { + "type": "integer", + "format": "int64", + "title": "btc_confirmation_depth is the confirmation depth in BTC.\nA block is considered irreversible only when it is at least k-deep in BTC\n(k in research paper)" + }, + "checkpoint_finalization_timeout": { + "type": "integer", + "format": "int64", + "title": "checkpoint_finalization_timeout is the maximum time window (measured in BTC\nblocks) between a checkpoint\n- being submitted to BTC, and\n- being reported back to BBN\nIf a checkpoint has not been reported back within w BTC blocks, then BBN\nhas dishonest majority and is stalling checkpoints (w in research paper)" + }, + "checkpoint_tag": { + "type": "string", + "title": "4byte tag in hex format, required to be present in the OP_RETURN transaction\nrelated to babylon" + } + }, + "description": "Params defines the parameters for the module." + }, + "babylon.btccheckpoint.v1.QueryBtcCheckpointInfoResponse": { + "type": "object", + "properties": { + "info": { + "$ref": "#/definitions/babylon.btccheckpoint.v1.BTCCheckpointInfoResponse" + } + }, + "title": "QueryBtcCheckpointInfoResponse is response type for the\nQuery/BtcCheckpointInfo RPC method" + }, + "babylon.btccheckpoint.v1.QueryBtcCheckpointsInfoResponse": { + "type": "object", + "properties": { + "info_list": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.btccheckpoint.v1.BTCCheckpointInfoResponse" + } + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "title": "pagination defines the pagination in the response" + } + }, + "title": "QueryBtcCheckpointsInfoResponse is response type for the\nQuery/BtcCheckpointsInfo RPC method" + }, + "babylon.btccheckpoint.v1.QueryEpochSubmissionsResponse": { + "type": "object", + "properties": { + "keys": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.btccheckpoint.v1.SubmissionKeyResponse" + }, + "description": "Keys All submissions transactions key saved during an epoch." + } + }, + "title": "QueryEpochSubmissionsResponse defines a response to get all submissions in\ngiven epoch (QueryEpochSubmissionsRequest)" + }, + "babylon.btccheckpoint.v1.QueryParamsResponse": { + "type": "object", + "properties": { + "params": { + "$ref": "#/definitions/babylon.btccheckpoint.v1.Params", + "description": "params holds all the parameters of this module." + } + }, + "description": "QueryParamsResponse is response type for the Query/Params RPC method." + }, + "babylon.btccheckpoint.v1.SubmissionKeyResponse": { + "type": "object", + "properties": { + "first_tx_block_hash": { + "type": "string", + "description": "FirstTxBlockHash is the BTCHeaderHashBytes in hex." + }, + "first_tx_index": { + "type": "integer", + "format": "int64" + }, + "second_tx_block_hash": { + "type": "string", + "description": "SecondBlockHash is the BTCHeaderHashBytes in hex." + }, + "second_tx_index": { + "type": "integer", + "format": "int64" + } + }, + "title": "SubmissionKeyResponse Checkpoint can be composed from multiple transactions,\nso to identify whole submission we need list of transaction keys.\nEach submission can generally be identified by this list of (txIdx,\nblockHash) tuples. Note: this could possibly be optimized as if transactions\nwere in one block they would have the same block hash and different indexes,\nbut each blockhash is only 33 (1 byte for prefix encoding and 32 byte hash),\nso there should be other strong arguments for this optimization" + }, + "babylon.btccheckpoint.v1.TransactionInfoResponse": { + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int64", + "description": "Index Bitcoin Transaction index in block." + }, + "hash": { + "type": "string", + "description": "Hash BTC Header hash as hex." + }, + "transaction": { + "type": "string", + "description": "transaction is the full transaction data as str hex." + }, + "proof": { + "type": "string", + "title": "proof is the Merkle proof that this tx is included in the position in `key`" + } + }, + "title": "TransactionInfoResponse is the info of a tx on Bitcoin,\nincluding\n- the position of the tx on BTC blockchain\n- the full tx content\n- the Merkle proof that this tx is on the above position" + }, + "cosmos.base.query.v1beta1.PageRequest": { + "type": "object", + "properties": { + "key": { + "type": "string", + "format": "byte", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set." + }, + "offset": { + "type": "string", + "format": "uint64", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set." + }, + "limit": { + "type": "string", + "format": "uint64", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app." + }, + "count_total": { + "type": "boolean", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set." + }, + "reverse": { + "type": "boolean", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43" + } + }, + "description": "message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }", + "title": "PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:" + }, + "cosmos.base.query.v1beta1.PageResponse": { + "type": "object", + "properties": { + "next_key": { + "type": "string", + "format": "byte", + "description": "next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results." + }, + "total": { + "type": "string", + "format": "uint64", + "title": "total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise" + } + }, + "description": "PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }" + }, + "google.protobuf.Any": { + "type": "object", + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "type": "string", + "format": "byte" + } + } + }, + "grpc.gateway.runtime.Error": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/google.protobuf.Any" + } + } + } + } + } +} diff --git a/tmp-swagger-gen/babylon/btclightclient/v1/query.swagger.json b/tmp-swagger-gen/babylon/btclightclient/v1/query.swagger.json new file mode 100644 index 000000000..81a2263d3 --- /dev/null +++ b/tmp-swagger-gen/babylon/btclightclient/v1/query.swagger.json @@ -0,0 +1,506 @@ +{ + "swagger": "2.0", + "info": { + "title": "babylon/btclightclient/v1/query.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/babylon/btclightclient/v1/baseheader": { + "get": { + "summary": "BaseHeader returns the base BTC header of the chain. This header is defined\non genesis.", + "operationId": "BaseHeader", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btclightclient.v1.QueryBaseHeaderResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "tags": [ + "Query" + ] + } + }, + "/babylon/btclightclient/v1/contains": { + "get": { + "summary": "Contains checks whether a hash is maintained by the module.", + "operationId": "Contains", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btclightclient.v1.QueryContainsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "hash", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btclightclient/v1/containsBytes": { + "get": { + "summary": "ContainsBytes is a temporary method that\nchecks whether a hash is maintained by the module.\nSee discussion at https://github.com/babylonlabs-io/babylon/pull/132\nfor more details.", + "operationId": "ContainsBytes", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btclightclient.v1.QueryContainsBytesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "hash", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btclightclient/v1/depth/{hash}": { + "get": { + "summary": "HeaderDepth returns the depth of the header in main chain or error if the\nblock is not found or it exists on fork", + "operationId": "HeaderDepth", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btclightclient.v1.QueryHeaderDepthResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "hash", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btclightclient/v1/hashes": { + "get": { + "summary": "Hashes retrieves the hashes maintained by the module.", + "operationId": "Hashes", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btclightclient.v1.QueryHashesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btclightclient/v1/mainchain": { + "get": { + "summary": "MainChain returns the canonical chain", + "operationId": "MainChain", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btclightclient.v1.QueryMainChainResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btclightclient/v1/params": { + "get": { + "summary": "Params queries the parameters of the module.", + "operationId": "Params", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btclightclient.v1.QueryParamsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "tags": [ + "Query" + ] + } + }, + "/babylon/btclightclient/v1/tip": { + "get": { + "summary": "Tip return best header on canonical chain", + "operationId": "Tip", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btclightclient.v1.QueryTipResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "tags": [ + "Query" + ] + } + } + }, + "definitions": { + "babylon.btclightclient.v1.BTCHeaderInfoResponse": { + "type": "object", + "properties": { + "header_hex": { + "type": "string" + }, + "hash_hex": { + "type": "string" + }, + "height": { + "type": "integer", + "format": "int64" + }, + "work": { + "type": "string", + "description": "Work is the sdkmath.Uint as string." + } + }, + "description": "BTCHeaderInfoResponse is a structure that contains all relevant information about a\nBTC header response\n - Full header as string hex.\n - Header hash for easy retrieval as string hex.\n - Height of the header in the BTC chain.\n - Total work spent on the header. This is the sum of the work corresponding\n to the header Bits field\n and the total work of the header." + }, + "babylon.btclightclient.v1.Params": { + "type": "object", + "properties": { + "insert_headers_allow_list": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of addresses which are allowed to insert headers to btc light client\nif the list is empty, any address can insert headers" + } + }, + "description": "Params defines the parameters for the module." + }, + "babylon.btclightclient.v1.QueryBaseHeaderResponse": { + "type": "object", + "properties": { + "header": { + "$ref": "#/definitions/babylon.btclightclient.v1.BTCHeaderInfoResponse" + } + }, + "description": "QueryBaseHeaderResponse is the response type for the Query/BaseHeader RPC\nmethod." + }, + "babylon.btclightclient.v1.QueryContainsBytesResponse": { + "type": "object", + "properties": { + "contains": { + "type": "boolean" + } + }, + "description": "QueryContainsResponse is response type for the temporary Query/ContainsBytes\nRPC method." + }, + "babylon.btclightclient.v1.QueryContainsResponse": { + "type": "object", + "properties": { + "contains": { + "type": "boolean" + } + }, + "description": "QueryContainsResponse is response type for the Query/Contains RPC method." + }, + "babylon.btclightclient.v1.QueryHashesResponse": { + "type": "object", + "properties": { + "hashes": { + "type": "array", + "items": { + "type": "string", + "format": "byte" + } + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse" + } + }, + "description": "QueryHashesResponse is response type for the Query/Hashes RPC method." + }, + "babylon.btclightclient.v1.QueryHeaderDepthResponse": { + "type": "object", + "properties": { + "depth": { + "type": "integer", + "format": "int64" + } + }, + "title": "QueryMainChainDepthResponse is the response type for the Query/MainChainDepth RPC\nit contains depth of the block in main chain" + }, + "babylon.btclightclient.v1.QueryMainChainResponse": { + "type": "object", + "properties": { + "headers": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.btclightclient.v1.BTCHeaderInfoResponse" + } + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse" + } + }, + "description": "QueryMainChainResponse is response type for the Query/MainChain RPC method." + }, + "babylon.btclightclient.v1.QueryParamsResponse": { + "type": "object", + "properties": { + "params": { + "$ref": "#/definitions/babylon.btclightclient.v1.Params", + "description": "params holds all the parameters of this module." + } + }, + "description": "QueryParamsResponse is the response type for the Query/Params RPC method." + }, + "babylon.btclightclient.v1.QueryTipResponse": { + "type": "object", + "properties": { + "header": { + "$ref": "#/definitions/babylon.btclightclient.v1.BTCHeaderInfoResponse" + } + }, + "description": "QueryTipResponse is the response type for the Query/Tip RPC method." + }, + "cosmos.base.query.v1beta1.PageRequest": { + "type": "object", + "properties": { + "key": { + "type": "string", + "format": "byte", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set." + }, + "offset": { + "type": "string", + "format": "uint64", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set." + }, + "limit": { + "type": "string", + "format": "uint64", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app." + }, + "count_total": { + "type": "boolean", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set." + }, + "reverse": { + "type": "boolean", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43" + } + }, + "description": "message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }", + "title": "PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:" + }, + "cosmos.base.query.v1beta1.PageResponse": { + "type": "object", + "properties": { + "next_key": { + "type": "string", + "format": "byte", + "description": "next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results." + }, + "total": { + "type": "string", + "format": "uint64", + "title": "total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise" + } + }, + "description": "PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }" + }, + "google.protobuf.Any": { + "type": "object", + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "type": "string", + "format": "byte" + } + } + }, + "grpc.gateway.runtime.Error": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/google.protobuf.Any" + } + } + } + } + } +} diff --git a/tmp-swagger-gen/babylon/btcstaking/v1/query.swagger.json b/tmp-swagger-gen/babylon/btcstaking/v1/query.swagger.json new file mode 100644 index 000000000..f347473e6 --- /dev/null +++ b/tmp-swagger-gen/babylon/btcstaking/v1/query.swagger.json @@ -0,0 +1,945 @@ +{ + "swagger": "2.0", + "info": { + "title": "babylon/btcstaking/v1/query.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/babylon/btcstaking/v1/btc_delegation/{staking_tx_hash_hex}": { + "get": { + "summary": "BTCDelegation retrieves delegation by corresponding staking tx hash", + "operationId": "BTCDelegation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btcstaking.v1.QueryBTCDelegationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "staking_tx_hash_hex", + "description": "Hash of staking transaction in btc format", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btcstaking/v1/btc_delegations/{status}": { + "get": { + "summary": "BTCDelegations queries all BTC delegations under a given status", + "operationId": "BTCDelegations", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btcstaking.v1.QueryBTCDelegationsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "status", + "description": "status is the queried status for BTC delegations", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "PENDING", + "VERIFIED", + "ACTIVE", + "UNBONDED", + "EXPIRED", + "ANY" + ] + }, + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btcstaking/v1/finality_providers": { + "get": { + "summary": "FinalityProviders queries all finality providers", + "operationId": "FinalityProviders", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btcstaking.v1.QueryFinalityProvidersResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btcstaking/v1/finality_providers/{fp_btc_pk_hex}/delegations": { + "get": { + "summary": "FinalityProviderDelegations queries all BTC delegations of the given finality provider", + "operationId": "FinalityProviderDelegations", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btcstaking.v1.QueryFinalityProviderDelegationsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "fp_btc_pk_hex", + "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality providerthat\nthis BTC delegation delegates to\nthe PK follows encoding in BIP-340 spec", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btcstaking/v1/finality_providers/{fp_btc_pk_hex}/finality_provider": { + "get": { + "summary": "FinalityProvider info about one finality provider", + "operationId": "FinalityProvider", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btcstaking.v1.QueryFinalityProviderResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "fp_btc_pk_hex", + "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality provider", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btcstaking/v1/params": { + "get": { + "summary": "Parameters queries the parameters of the module.", + "operationId": "Params", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btcstaking.v1.QueryParamsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "tags": [ + "Query" + ] + } + }, + "/babylon/btcstaking/v1/params/btc_height/{btc_height}": { + "get": { + "summary": "ParamsByBTCHeight queries the parameters of the module for a specific BTC height", + "operationId": "ParamsByBTCHeight", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btcstaking.v1.QueryParamsByBTCHeightResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "btc_height", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btcstaking/v1/params/{version}": { + "get": { + "summary": "ParamsByVersion queries the parameters of the module for a specific version of past params.", + "operationId": "ParamsByVersion", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btcstaking.v1.QueryParamsByVersionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "version", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + } + ], + "tags": [ + "Query" + ] + } + } + }, + "definitions": { + "babylon.btcstaking.v1.BTCDelegationResponse": { + "type": "object", + "properties": { + "staker_addr": { + "type": "string", + "description": "staker_addr is the address to receive rewards from BTC delegation." + }, + "btc_pk": { + "type": "string", + "format": "byte", + "title": "btc_pk is the Bitcoin secp256k1 PK of this BTC delegation\nthe PK follows encoding in BIP-340 spec" + }, + "fp_btc_pk_list": { + "type": "array", + "items": { + "type": "string", + "format": "byte" + }, + "title": "fp_btc_pk_list is the list of BIP-340 PKs of the finality providers that\nthis BTC delegation delegates to" + }, + "staking_time": { + "type": "integer", + "format": "int64", + "title": "staking_time is the number of blocks for which the delegation is locked on BTC chain" + }, + "start_height": { + "type": "integer", + "format": "int64", + "title": "start_height is the start BTC height of the BTC delegation\nit is the start BTC height of the timelock" + }, + "end_height": { + "type": "integer", + "format": "int64", + "title": "end_height is the end height of the BTC delegation\nit is the end BTC height of the timelock - w" + }, + "total_sat": { + "type": "string", + "format": "uint64", + "title": "total_sat is the total amount of BTC stakes in this delegation\nquantified in satoshi" + }, + "staking_tx_hex": { + "type": "string", + "title": "staking_tx_hex is the hex string of staking tx" + }, + "slashing_tx_hex": { + "type": "string", + "title": "slashing_tx_hex is the hex string of slashing tx" + }, + "delegator_slash_sig_hex": { + "type": "string", + "description": "delegator_slash_sig_hex is the signature on the slashing tx\nby the delegator (i.e., SK corresponding to btc_pk) as string hex.\nIt will be a part of the witness for the staking tx output." + }, + "covenant_sigs": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.btcstaking.v1.CovenantAdaptorSignatures" + }, + "description": "covenant_sigs is a list of adaptor signatures on the slashing tx\nby each covenant member\nIt will be a part of the witness for the staking tx output." + }, + "staking_output_idx": { + "type": "integer", + "format": "int64", + "title": "staking_output_idx is the index of the staking output in the staking tx" + }, + "active": { + "type": "boolean", + "title": "whether this delegation is active" + }, + "status_desc": { + "type": "string", + "description": "descriptive status of current delegation." + }, + "unbonding_time": { + "type": "integer", + "format": "int64", + "title": "unbonding_time used in unbonding output timelock path and in slashing transactions\nchange outputs" + }, + "undelegation_response": { + "$ref": "#/definitions/babylon.btcstaking.v1.BTCUndelegationResponse", + "description": "undelegation_response is the undelegation info of this delegation." + }, + "params_version": { + "type": "integer", + "format": "int64", + "title": "params version used to validate delegation" + } + }, + "description": "BTCDelegationResponse is the client needed information from a BTCDelegation with the current status based on parameters." + }, + "babylon.btcstaking.v1.BTCDelegationStatus": { + "type": "string", + "enum": [ + "PENDING", + "VERIFIED", + "ACTIVE", + "UNBONDED", + "EXPIRED", + "ANY" + ], + "default": "PENDING", + "description": "BTCDelegationStatus is the status of a delegation.\nThere are two possible valid state transition paths for a BTC delegation:\n- PENDING -\u003e VERIFIED -\u003e ACTIVE -\u003e UNBONDED -\u003e EXPIRED\n- PENDING -\u003e VERIFIED -\u003e ACTIVE -\u003e UNBONDED/EXPIRED\nand one invalid state transition path:\n- PENDING -\u003e VERIFIED -\u003e UNBONDED i.e the staker unbonded before\nactivating delegation on Babylon chain.\nIn valid transition paths, the delegation becomes UNBONDED when:\n- either the staking transaction timelock expires\n- or the staker requests early undelegation through MsgBTCUndelegate message.\n\n - PENDING: PENDING defines a delegation that is waiting for covenant signatures.\n - VERIFIED: VERIFIED defines a delegation that has covenant signatures but is not yet\nincluded in the BTC chain.\n - ACTIVE: ACTIVE defines a delegation that has voting power\n - UNBONDED: UNBONDED defines a delegation no longer has voting power\nby receiving unbonding tx with signatures from staker and covenant committee\n - EXPIRED: EXPIRED defines a delegation no longer has voting power\nfor reaching the end of staking transaction timelock\n - ANY: ANY is any of the above status" + }, + "babylon.btcstaking.v1.BTCDelegatorDelegationsResponse": { + "type": "object", + "properties": { + "dels": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.btcstaking.v1.BTCDelegationResponse" + } + } + }, + "description": "BTCDelegatorDelegationsResponse is a collection of BTC delegations responses from the same delegator." + }, + "babylon.btcstaking.v1.BTCSigType": { + "type": "string", + "enum": [ + "BIP340", + "BIP322", + "ECDSA" + ], + "default": "BIP340", + "description": "- BIP340: BIP340 means the btc_sig will follow the BIP-340 encoding\n - BIP322: BIP322 means the btc_sig will follow the BIP-322 encoding\n - ECDSA: ECDSA means the btc_sig will follow the ECDSA encoding\nref: https://github.com/okx/js-wallet-sdk/blob/a57c2acbe6ce917c0aa4e951d96c4e562ad58444/packages/coin-bitcoin/src/BtcWallet.ts#L331", + "title": "BTCSigType indicates the type of btc_sig in a pop" + }, + "babylon.btcstaking.v1.BTCUndelegationResponse": { + "type": "object", + "properties": { + "unbonding_tx_hex": { + "type": "string", + "description": "unbonding_tx is the transaction which will transfer the funds from staking\noutput to unbonding output. Unbonding output will usually have lower timelock\nthan staking output. The unbonding tx as string hex." + }, + "covenant_unbonding_sig_list": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.btcstaking.v1.SignatureInfo" + }, + "title": "covenant_unbonding_sig_list is the list of signatures on the unbonding tx\nby covenant members" + }, + "slashing_tx_hex": { + "type": "string", + "title": "slashingTxHex is the hex string of slashing tx" + }, + "delegator_slashing_sig_hex": { + "type": "string", + "description": "delegator_slashing_sig is the signature on the slashing tx\nby the delegator (i.e., SK corresponding to btc_pk).\nIt will be a part of the witness for the unbonding tx output.\nThe delegator slashing sig as string hex." + }, + "covenant_slashing_sigs": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.btcstaking.v1.CovenantAdaptorSignatures" + }, + "description": "covenant_slashing_sigs is a list of adaptor signatures on the\nunbonding slashing tx by each covenant member\nIt will be a part of the witness for the staking tx output." + }, + "delegator_unbonding_info_response": { + "$ref": "#/definitions/babylon.btcstaking.v1.DelegatorUnbondingInfoResponse", + "title": "btc_undelegation_info contains all necessary info about the transaction\nwhich spent the staking output" + } + }, + "title": "BTCUndelegationResponse provides all necessary info about the undeleagation" + }, + "babylon.btcstaking.v1.CovenantAdaptorSignatures": { + "type": "object", + "properties": { + "cov_pk": { + "type": "string", + "format": "byte", + "title": "cov_pk is the public key of the covenant emulator, used as the public key of the adaptor signature" + }, + "adaptor_sigs": { + "type": "array", + "items": { + "type": "string", + "format": "byte" + }, + "title": "adaptor_sigs is a list of adaptor signatures, each encrypted by a restaked BTC finality provider's public key" + } + }, + "title": "CovenantAdaptorSignatures is a list adaptor signatures signed by the\ncovenant with different finality provider's public keys as encryption keys" + }, + "babylon.btcstaking.v1.DelegatorUnbondingInfoResponse": { + "type": "object", + "properties": { + "spend_stake_tx_hex": { + "type": "string", + "title": "spend_stake_tx_hex is the transaction which spent the staking output. It is\nfilled only if the spend_stake_tx_hex is different than the unbonding_tx_hex" + } + }, + "title": "DelegatorUnbondingInfoResponse provides all necessary info about transaction\nwhich spent the staking output" + }, + "babylon.btcstaking.v1.FinalityProviderResponse": { + "type": "object", + "properties": { + "description": { + "$ref": "#/definitions/cosmos.staking.v1beta1.Description", + "description": "description defines the description terms for the finality provider." + }, + "commission": { + "type": "string", + "description": "commission defines the commission rate of the finality provider." + }, + "addr": { + "type": "string", + "description": "addr is the address to receive commission from delegations." + }, + "btc_pk": { + "type": "string", + "format": "byte", + "title": "btc_pk is the Bitcoin secp256k1 PK of this finality provider\nthe PK follows encoding in BIP-340 spec" + }, + "pop": { + "$ref": "#/definitions/babylon.btcstaking.v1.ProofOfPossessionBTC", + "description": "pop is the proof of possession of the BTC_PK by the fp addr.\nEssentially is the signature where the BTC SK sigs the fp addr." + }, + "slashed_babylon_height": { + "type": "string", + "format": "uint64", + "title": "slashed_babylon_height indicates the Babylon height when\nthe finality provider is slashed.\nif it's 0 then the finality provider is not slashed" + }, + "slashed_btc_height": { + "type": "integer", + "format": "int64", + "title": "slashed_btc_height indicates the BTC height when\nthe finality provider is slashed.\nif it's 0 then the finality provider is not slashed" + }, + "height": { + "type": "string", + "format": "uint64", + "title": "height is the queried Babylon height" + }, + "jailed": { + "type": "boolean", + "title": "jailed defines whether the finality provider is jailed" + }, + "highest_voted_height": { + "type": "integer", + "format": "int64", + "title": "highest_voted_height is the highest height for which the\nfinality provider has voted" + } + }, + "description": "FinalityProviderResponse defines a finality provider with voting power information." + }, + "babylon.btcstaking.v1.Params": { + "type": "object", + "properties": { + "covenant_pks": { + "type": "array", + "items": { + "type": "string", + "format": "byte" + }, + "title": "PARAMETERS COVERING STAKING\ncovenant_pks is the list of public keys held by the covenant committee\neach PK follows encoding in BIP-340 spec on Bitcoin" + }, + "covenant_quorum": { + "type": "integer", + "format": "int64", + "title": "covenant_quorum is the minimum number of signatures needed for the covenant\nmultisignature" + }, + "min_staking_value_sat": { + "type": "string", + "format": "int64", + "title": "min_staking_value_sat is the minimum of satoshis locked in staking output" + }, + "max_staking_value_sat": { + "type": "string", + "format": "int64", + "title": "max_staking_value_sat is the maximum of satoshis locked in staking output" + }, + "min_staking_time_blocks": { + "type": "integer", + "format": "int64", + "title": "min_staking_time is the minimum lock time specified in staking output script" + }, + "max_staking_time_blocks": { + "type": "integer", + "format": "int64", + "title": "max_staking_time_blocks is the maximum lock time time specified in staking output script" + }, + "slashing_pk_script": { + "type": "string", + "format": "byte", + "title": "PARAMETERS COVERING SLASHING\nslashing_pk_script is the pk_script expected in slashing output ie. the first\noutput of slashing transaction" + }, + "min_slashing_tx_fee_sat": { + "type": "string", + "format": "int64", + "title": "min_slashing_tx_fee_sat is the minimum amount of tx fee (quantified\nin Satoshi) needed for the pre-signed slashing tx. It covers both:\nstaking slashing transaction and unbonding slashing transaction" + }, + "slashing_rate": { + "type": "string", + "title": "slashing_rate determines the portion of the staked amount to be slashed,\nexpressed as a decimal (e.g., 0.5 for 50%). Maximal precion is 2 decimal\nplaces" + }, + "unbonding_time_blocks": { + "type": "integer", + "format": "int64", + "title": "PARAMETERS COVERING UNBONDING\nunbonding_time is the exact unbonding time required from unbonding transaction\nit must be larger than `checkpoint_finalization_timeout` from `btccheckpoint` module" + }, + "unbonding_fee_sat": { + "type": "string", + "format": "int64", + "title": "unbonding_fee exact fee required for unbonding transaction" + }, + "min_commission_rate": { + "type": "string", + "title": "PARAMETERS COVERING FINALITY PROVIDERS\nmin_commission_rate is the chain-wide minimum commission rate that a finality provider\ncan charge their delegators expressed as a decimal (e.g., 0.5 for 50%). Maximal precion\nis 2 decimal places" + }, + "delegation_creation_base_gas_fee": { + "type": "string", + "format": "uint64", + "title": "base gas fee for delegation creation" + }, + "allow_list_expiration_height": { + "type": "string", + "format": "uint64", + "title": "allow_list_expiration_height is the height at which the allow list expires\ni.e all staking transactions are allowed to enter Babylon chain afterwards\nsetting it to 0 means allow list is disabled" + }, + "btc_activation_height": { + "type": "integer", + "format": "int64", + "title": "btc_activation_height is the btc height from which parameters are activated (inclusive)" + } + }, + "description": "Params defines the parameters for the module." + }, + "babylon.btcstaking.v1.ProofOfPossessionBTC": { + "type": "object", + "properties": { + "btc_sig_type": { + "$ref": "#/definitions/babylon.btcstaking.v1.BTCSigType", + "title": "btc_sig_type indicates the type of btc_sig in the pop" + }, + "btc_sig": { + "type": "string", + "format": "byte", + "title": "btc_sig is the signature generated via sign(sk_btc, babylon_staker_address)\nthe signature follows encoding in either BIP-340 spec or BIP-322 spec" + } + }, + "title": "ProofOfPossessionBTC is the proof of possession that a Babylon\naddress and a Bitcoin secp256k1 secret key are held by the same\nperson" + }, + "babylon.btcstaking.v1.QueryBTCDelegationResponse": { + "type": "object", + "properties": { + "btc_delegation": { + "$ref": "#/definitions/babylon.btcstaking.v1.BTCDelegationResponse", + "description": "BTCDelegation represents the client needed information of an BTCDelegation." + } + }, + "title": "QueryBTCDelegationResponse is response type matching QueryBTCDelegationRequest\nand containing BTC delegation information" + }, + "babylon.btcstaking.v1.QueryBTCDelegationsResponse": { + "type": "object", + "properties": { + "btc_delegations": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.btcstaking.v1.BTCDelegationResponse" + }, + "title": "btc_delegations contains all the queried BTC delegations under the given status" + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "description": "pagination defines the pagination in the response." + } + }, + "description": "QueryBTCDelegationsResponse is the response type for the\nQuery/BTCDelegations RPC method." + }, + "babylon.btcstaking.v1.QueryFinalityProviderDelegationsResponse": { + "type": "object", + "properties": { + "btc_delegator_delegations": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.btcstaking.v1.BTCDelegatorDelegationsResponse" + }, + "description": "btc_delegator_delegations contains all the queried BTC delegations." + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "description": "pagination defines the pagination in the response." + } + }, + "description": "QueryFinalityProviderDelegationsResponse is the response type for the\nQuery/FinalityProviderDelegations RPC method." + }, + "babylon.btcstaking.v1.QueryFinalityProviderResponse": { + "type": "object", + "properties": { + "finality_provider": { + "$ref": "#/definitions/babylon.btcstaking.v1.FinalityProviderResponse", + "title": "finality_provider contains the FinalityProvider" + } + }, + "title": "QueryFinalityProviderResponse contains information about a finality provider" + }, + "babylon.btcstaking.v1.QueryFinalityProvidersResponse": { + "type": "object", + "properties": { + "finality_providers": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.btcstaking.v1.FinalityProviderResponse" + }, + "title": "finality_providers contains all the finality providers" + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "description": "pagination defines the pagination in the response." + } + }, + "description": "QueryFinalityProvidersResponse is the response type for the\nQuery/FinalityProviders RPC method." + }, + "babylon.btcstaking.v1.QueryParamsByBTCHeightResponse": { + "type": "object", + "properties": { + "params": { + "$ref": "#/definitions/babylon.btcstaking.v1.Params", + "description": "params holds all the parameters of this module." + }, + "version": { + "type": "integer", + "format": "int64", + "title": "version is the version of the params for the given BTC height" + } + }, + "description": "QueryParamsByBTCHeightResponse is response type for the Query/QueryParamsByBTCHeightResponse RPC method." + }, + "babylon.btcstaking.v1.QueryParamsByVersionResponse": { + "type": "object", + "properties": { + "params": { + "$ref": "#/definitions/babylon.btcstaking.v1.Params", + "description": "params holds all the parameters of this module." + } + }, + "description": "QueryParamsResponse is response type for the Query/Params RPC method." + }, + "babylon.btcstaking.v1.QueryParamsResponse": { + "type": "object", + "properties": { + "params": { + "$ref": "#/definitions/babylon.btcstaking.v1.Params", + "description": "params holds all the parameters of this module." + } + }, + "description": "QueryParamsResponse is response type for the Query/Params RPC method." + }, + "babylon.btcstaking.v1.SignatureInfo": { + "type": "object", + "properties": { + "pk": { + "type": "string", + "format": "byte" + }, + "sig": { + "type": "string", + "format": "byte" + } + }, + "title": "SignatureInfo is a BIP-340 signature together with its signer's BIP-340 PK" + }, + "cosmos.base.query.v1beta1.PageRequest": { + "type": "object", + "properties": { + "key": { + "type": "string", + "format": "byte", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set." + }, + "offset": { + "type": "string", + "format": "uint64", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set." + }, + "limit": { + "type": "string", + "format": "uint64", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app." + }, + "count_total": { + "type": "boolean", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set." + }, + "reverse": { + "type": "boolean", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43" + } + }, + "description": "message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }", + "title": "PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:" + }, + "cosmos.base.query.v1beta1.PageResponse": { + "type": "object", + "properties": { + "next_key": { + "type": "string", + "format": "byte", + "description": "next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results." + }, + "total": { + "type": "string", + "format": "uint64", + "title": "total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise" + } + }, + "description": "PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }" + }, + "cosmos.staking.v1beta1.Description": { + "type": "object", + "properties": { + "moniker": { + "type": "string", + "description": "moniker defines a human-readable name for the validator." + }, + "identity": { + "type": "string", + "description": "identity defines an optional identity signature (ex. UPort or Keybase)." + }, + "website": { + "type": "string", + "description": "website defines an optional website link." + }, + "security_contact": { + "type": "string", + "description": "security_contact defines an optional email for security contact." + }, + "details": { + "type": "string", + "description": "details define other optional details." + } + }, + "description": "Description defines a validator description." + }, + "google.protobuf.Any": { + "type": "object", + "properties": { + "type_url": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + }, + "value": { + "type": "string", + "format": "byte", + "description": "Must be a valid serialized protocol buffer of the above specified type." + } + }, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "grpc.gateway.runtime.Error": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/google.protobuf.Any" + } + } + } + } + } +} diff --git a/tmp-swagger-gen/babylon/btcstkconsumer/v1/query.swagger.json b/tmp-swagger-gen/babylon/btcstkconsumer/v1/query.swagger.json new file mode 100644 index 000000000..629a7bde7 --- /dev/null +++ b/tmp-swagger-gen/babylon/btcstkconsumer/v1/query.swagger.json @@ -0,0 +1,593 @@ +{ + "swagger": "2.0", + "info": { + "title": "babylon/btcstkconsumer/v1/query.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/babylon/btcstkconsumer/v1/consumer_registry_list": { + "get": { + "summary": "ConsumerRegistryList queries the list of consumers that are registered to Babylon", + "operationId": "ConsumerRegistryList", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btcstkconsumer.v1.QueryConsumerRegistryListResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btcstkconsumer/v1/consumers_registry/{consumer_ids}": { + "get": { + "summary": "ConsumersRegistry queries the latest info for a given list of consumers in Babylon's view", + "operationId": "ConsumersRegistry", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btcstkconsumer.v1.QueryConsumersRegistryResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "consumer_ids", + "in": "path", + "required": true, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "csv", + "minItems": 1 + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btcstkconsumer/v1/finality_provider/{consumer_id}/{fp_btc_pk_hex}": { + "get": { + "summary": "FinalityProvider info about one finality provider", + "operationId": "FinalityProvider", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btcstkconsumer.v1.QueryFinalityProviderResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "consumer_id", + "description": "consumer id is the consumer id this finality provider is registered to", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "fp_btc_pk_hex", + "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality provider", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btcstkconsumer/v1/finality_provider_consumer/{fp_btc_pk_hex}": { + "get": { + "summary": "FinalityProviderConsumer info about one finality provider's consumer id", + "operationId": "FinalityProviderConsumer", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btcstkconsumer.v1.QueryFinalityProviderConsumerResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "fp_btc_pk_hex", + "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality provider", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btcstkconsumer/v1/finality_providers/{consumer_id}": { + "get": { + "summary": "FinalityProviders queries all finality providers for a given consumer", + "operationId": "FinalityProviders", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btcstkconsumer.v1.QueryFinalityProvidersResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "consumer_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/btcstkconsumer/v1/params": { + "get": { + "summary": "Parameters queries the parameters of the module.", + "operationId": "Params", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.btcstkconsumer.v1.QueryParamsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "tags": [ + "Query" + ] + } + } + }, + "definitions": { + "babylon.btcstaking.v1.BTCSigType": { + "type": "string", + "enum": [ + "BIP340", + "BIP322", + "ECDSA" + ], + "default": "BIP340", + "description": "- BIP340: BIP340 means the btc_sig will follow the BIP-340 encoding\n - BIP322: BIP322 means the btc_sig will follow the BIP-322 encoding\n - ECDSA: ECDSA means the btc_sig will follow the ECDSA encoding\nref: https://github.com/okx/js-wallet-sdk/blob/a57c2acbe6ce917c0aa4e951d96c4e562ad58444/packages/coin-bitcoin/src/BtcWallet.ts#L331", + "title": "BTCSigType indicates the type of btc_sig in a pop" + }, + "babylon.btcstaking.v1.ProofOfPossessionBTC": { + "type": "object", + "properties": { + "btc_sig_type": { + "$ref": "#/definitions/babylon.btcstaking.v1.BTCSigType", + "title": "btc_sig_type indicates the type of btc_sig in the pop" + }, + "btc_sig": { + "type": "string", + "format": "byte", + "title": "btc_sig is the signature generated via sign(sk_btc, babylon_staker_address)\nthe signature follows encoding in either BIP-340 spec or BIP-322 spec" + } + }, + "title": "ProofOfPossessionBTC is the proof of possession that a Babylon\naddress and a Bitcoin secp256k1 secret key are held by the same\nperson" + }, + "babylon.btcstkconsumer.v1.ConsumerRegister": { + "type": "object", + "properties": { + "consumer_id": { + "type": "string", + "title": "consumer_id is the ID of the consumer\n- for Cosmos SDK chains, the consumer ID will be the IBC client ID\n- for ETH L2 chains, the consumer ID will be the chain ID of the ETH L2\n chain" + }, + "consumer_name": { + "type": "string", + "title": "consumer_name is the name of the consumer" + }, + "consumer_description": { + "type": "string", + "title": "consumer_description is a description for the consumer (can be empty)" + }, + "cosmos_consumer_metadata": { + "$ref": "#/definitions/babylon.btcstkconsumer.v1.CosmosConsumerMetadata" + }, + "eth_l2_consumer_metadata": { + "$ref": "#/definitions/babylon.btcstkconsumer.v1.ETHL2ConsumerMetadata" + } + }, + "title": "ConsumerRegister is the registration information of a consumer" + }, + "babylon.btcstkconsumer.v1.CosmosConsumerMetadata": { + "type": "object", + "properties": { + "channel_id": { + "type": "string", + "title": "channel_id defines the IBC channel ID for the consumer chain" + } + }, + "title": "CosmosConsumerMetadata is the metadata for the Cosmos integration" + }, + "babylon.btcstkconsumer.v1.ETHL2ConsumerMetadata": { + "type": "object", + "properties": { + "finality_contract_address": { + "type": "string", + "title": "finality_contract_address is the address of the finality contract for\nthe ETH L2 integration" + } + }, + "title": "ETHL2ConsumerMetadata is the metadata for the ETH L2 integration" + }, + "babylon.btcstkconsumer.v1.FinalityProviderResponse": { + "type": "object", + "properties": { + "description": { + "$ref": "#/definitions/cosmos.staking.v1beta1.Description", + "description": "description defines the description terms for the finality provider." + }, + "commission": { + "type": "string", + "description": "commission defines the commission rate of the finality provider." + }, + "addr": { + "type": "string", + "title": "babylon_pk is the Babylon secp256k1 PK of this finality provider" + }, + "btc_pk": { + "type": "string", + "format": "byte", + "title": "btc_pk is the Bitcoin secp256k1 PK of this finality provider\nthe PK follows encoding in BIP-340 spec" + }, + "pop": { + "$ref": "#/definitions/babylon.btcstaking.v1.ProofOfPossessionBTC", + "title": "pop is the proof of possession of babylon_pk and btc_pk" + }, + "slashed_babylon_height": { + "type": "string", + "format": "uint64", + "title": "slashed_babylon_height indicates the Babylon height when\nthe finality provider is slashed.\nif it's 0 then the finality provider is not slashed" + }, + "slashed_btc_height": { + "type": "integer", + "format": "int64", + "title": "slashed_btc_height indicates the BTC height when\nthe finality provider is slashed.\nif it's 0 then the finality provider is not slashed" + }, + "height": { + "type": "string", + "format": "uint64", + "title": "height is the queried Babylon height" + }, + "voting_power": { + "type": "string", + "format": "uint64", + "title": "voting_power is the voting power of this finality provider at the given height" + }, + "consumer_id": { + "type": "string", + "title": "consumer_id is the consumer id this finality provider is registered to" + } + }, + "description": "FinalityProviderResponse defines a finality provider with voting power information." + }, + "babylon.btcstkconsumer.v1.Params": { + "type": "object", + "properties": { + "permissioned_integration": { + "type": "boolean", + "description": "permissioned_integration is a flag to enable permissioned integration, i.e.,\nrequiring governance proposal to approve new integrations." + } + }, + "description": "Params defines the parameters for the module." + }, + "babylon.btcstkconsumer.v1.QueryConsumerRegistryListResponse": { + "type": "object", + "properties": { + "consumer_ids": { + "type": "array", + "items": { + "type": "string" + }, + "title": "consumer_ids are IDs of the consumers in ascending alphabetical order" + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "title": "pagination defines the pagination in the response" + } + }, + "title": "QueryConsumerRegistryListResponse is response type for the Query/ConsumerRegistryList RPC method" + }, + "babylon.btcstkconsumer.v1.QueryConsumersRegistryResponse": { + "type": "object", + "properties": { + "consumers_register": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.btcstkconsumer.v1.ConsumerRegister" + } + } + }, + "description": "QueryConsumersRegistryResponse is response type for the Query/ConsumersRegistry RPC method." + }, + "babylon.btcstkconsumer.v1.QueryFinalityProviderConsumerResponse": { + "type": "object", + "properties": { + "consumer_id": { + "type": "string" + } + }, + "title": "QueryFinalityProviderConsumerResponse returns the CZ finality provier consumer id" + }, + "babylon.btcstkconsumer.v1.QueryFinalityProviderResponse": { + "type": "object", + "properties": { + "finality_provider": { + "$ref": "#/definitions/babylon.btcstkconsumer.v1.FinalityProviderResponse", + "title": "finality_provider contains the FinalityProvider" + } + }, + "title": "QueryFinalityProviderResponse contains information about a finality provider" + }, + "babylon.btcstkconsumer.v1.QueryFinalityProvidersResponse": { + "type": "object", + "properties": { + "finality_providers": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.btcstkconsumer.v1.FinalityProviderResponse" + }, + "title": "finality_providers contains all the finality providers" + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "description": "pagination defines the pagination in the response." + } + }, + "description": "QueryFinalityProvidersResponse is the response type for the\nQuery/FinalityProviders RPC method." + }, + "babylon.btcstkconsumer.v1.QueryParamsResponse": { + "type": "object", + "properties": { + "params": { + "$ref": "#/definitions/babylon.btcstkconsumer.v1.Params", + "description": "params holds all the parameters of this module." + } + }, + "description": "QueryParamsResponse is response type for the Query/Params RPC method." + }, + "cosmos.base.query.v1beta1.PageRequest": { + "type": "object", + "properties": { + "key": { + "type": "string", + "format": "byte", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set." + }, + "offset": { + "type": "string", + "format": "uint64", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set." + }, + "limit": { + "type": "string", + "format": "uint64", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app." + }, + "count_total": { + "type": "boolean", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set." + }, + "reverse": { + "type": "boolean", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43" + } + }, + "description": "message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }", + "title": "PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:" + }, + "cosmos.base.query.v1beta1.PageResponse": { + "type": "object", + "properties": { + "next_key": { + "type": "string", + "format": "byte", + "description": "next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results." + }, + "total": { + "type": "string", + "format": "uint64", + "title": "total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise" + } + }, + "description": "PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }" + }, + "cosmos.staking.v1beta1.Description": { + "type": "object", + "properties": { + "moniker": { + "type": "string", + "description": "moniker defines a human-readable name for the validator." + }, + "identity": { + "type": "string", + "description": "identity defines an optional identity signature (ex. UPort or Keybase)." + }, + "website": { + "type": "string", + "description": "website defines an optional website link." + }, + "security_contact": { + "type": "string", + "description": "security_contact defines an optional email for security contact." + }, + "details": { + "type": "string", + "description": "details define other optional details." + } + }, + "description": "Description defines a validator description." + }, + "google.protobuf.Any": { + "type": "object", + "properties": { + "type_url": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + }, + "value": { + "type": "string", + "format": "byte", + "description": "Must be a valid serialized protocol buffer of the above specified type." + } + }, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "grpc.gateway.runtime.Error": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/google.protobuf.Any" + } + } + } + } + } +} diff --git a/tmp-swagger-gen/babylon/checkpointing/v1/query.swagger.json b/tmp-swagger-gen/babylon/checkpointing/v1/query.swagger.json new file mode 100644 index 000000000..ac6f87562 --- /dev/null +++ b/tmp-swagger-gen/babylon/checkpointing/v1/query.swagger.json @@ -0,0 +1,655 @@ +{ + "swagger": "2.0", + "info": { + "title": "babylon/checkpointing/v1/query.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/babylon/checkpointing/v1/bls_public_keys/{epoch_num}": { + "get": { + "summary": "BlsPublicKeyList queries a list of bls public keys of the validators at a\ngiven epoch number.", + "operationId": "BlsPublicKeyList", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.checkpointing.v1.QueryBlsPublicKeyListResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "epoch_num", + "description": "epoch_num defines the epoch for the queried bls public keys", + "in": "path", + "required": true, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/checkpointing/v1/epochs/{epoch_num}/status": { + "get": { + "summary": "EpochStatus queries the status of the checkpoint at a given epoch", + "operationId": "EpochStatus", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.checkpointing.v1.QueryEpochStatusResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "epoch_num", + "in": "path", + "required": true, + "type": "string", + "format": "uint64" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/checkpointing/v1/epochs:status_count": { + "get": { + "summary": "RecentEpochStatusCount queries the number of epochs with each status in\nrecent epochs", + "operationId": "RecentEpochStatusCount", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.checkpointing.v1.QueryRecentEpochStatusCountResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "epoch_count", + "description": "epoch_count is the number of the most recent epochs to include in the\naggregation.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/checkpointing/v1/last_raw_checkpoint/{status}": { + "get": { + "summary": "LastCheckpointWithStatus queries the last checkpoint with a given status or\na more matured status", + "operationId": "LastCheckpointWithStatus", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.checkpointing.v1.QueryLastCheckpointWithStatusResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "status", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "CKPT_STATUS_ACCUMULATING", + "CKPT_STATUS_SEALED", + "CKPT_STATUS_SUBMITTED", + "CKPT_STATUS_CONFIRMED", + "CKPT_STATUS_FINALIZED" + ] + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/checkpointing/v1/raw_checkpoint/{epoch_num}": { + "get": { + "summary": "RawCheckpoint queries a checkpoints at a given epoch number.", + "operationId": "RawCheckpoint", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.checkpointing.v1.QueryRawCheckpointResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "epoch_num", + "description": "epoch_num defines the epoch for the queried checkpoint", + "in": "path", + "required": true, + "type": "string", + "format": "uint64" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/checkpointing/v1/raw_checkpoints": { + "get": { + "summary": "RawCheckpoints queries checkpoints for a epoch range specified in pagination params.", + "operationId": "RawCheckpoints", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.checkpointing.v1.QueryRawCheckpointsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/checkpointing/v1/raw_checkpoints/{status}": { + "get": { + "summary": "RawCheckpointList queries all checkpoints that match the given status.", + "operationId": "RawCheckpointList", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.checkpointing.v1.QueryRawCheckpointListResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "status", + "description": "status defines the status of the raw checkpoints of the query", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "CKPT_STATUS_ACCUMULATING", + "CKPT_STATUS_SEALED", + "CKPT_STATUS_SUBMITTED", + "CKPT_STATUS_CONFIRMED", + "CKPT_STATUS_FINALIZED" + ] + }, + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + } + }, + "definitions": { + "babylon.checkpointing.v1.BlsPublicKeyListResponse": { + "type": "object", + "properties": { + "validator_address": { + "type": "string", + "title": "validator_address is the address of the validator" + }, + "bls_pub_key_hex": { + "type": "string", + "title": "bls_pub_key is the BLS public key of the validator" + }, + "voting_power": { + "type": "string", + "format": "uint64", + "title": "voting_power is the voting power of the validator at the given epoch" + } + }, + "title": "BlsPublicKeyListResponse couples validator address, voting power, and its bls\npublic key" + }, + "babylon.checkpointing.v1.CheckpointStateUpdateResponse": { + "type": "object", + "properties": { + "state": { + "$ref": "#/definitions/babylon.checkpointing.v1.CheckpointStatus", + "title": "state defines the event of a state transition towards this state" + }, + "status_desc": { + "type": "string", + "description": "status_desc represents the description of status enum." + }, + "block_height": { + "type": "string", + "format": "uint64", + "title": "block_height is the height of the Babylon block that triggers the state\nupdate" + }, + "block_time": { + "type": "string", + "format": "date-time", + "title": "block_time is the timestamp in the Babylon block that triggers the state\nupdate" + } + }, + "description": "CheckpointStateUpdateResponse defines a state transition on the checkpoint." + }, + "babylon.checkpointing.v1.CheckpointStatus": { + "type": "string", + "enum": [ + "CKPT_STATUS_ACCUMULATING", + "CKPT_STATUS_SEALED", + "CKPT_STATUS_SUBMITTED", + "CKPT_STATUS_CONFIRMED", + "CKPT_STATUS_FINALIZED" + ], + "default": "CKPT_STATUS_ACCUMULATING", + "description": "CheckpointStatus is the status of a checkpoint.\n\n - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures.\n - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures.\n - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC.\n - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC.\n - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC." + }, + "babylon.checkpointing.v1.QueryBlsPublicKeyListResponse": { + "type": "object", + "properties": { + "validator_with_bls_keys": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.checkpointing.v1.BlsPublicKeyListResponse" + } + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "description": "pagination defines the pagination in the response." + } + }, + "description": "QueryBlsPublicKeyListResponse is the response type for the\nQuery/BlsPublicKeys RPC method." + }, + "babylon.checkpointing.v1.QueryEpochStatusResponse": { + "type": "object", + "properties": { + "status": { + "$ref": "#/definitions/babylon.checkpointing.v1.CheckpointStatus" + } + }, + "description": "QueryEpochStatusResponse is the response type for the Query/EpochStatus\nRPC method." + }, + "babylon.checkpointing.v1.QueryLastCheckpointWithStatusResponse": { + "type": "object", + "properties": { + "raw_checkpoint": { + "$ref": "#/definitions/babylon.checkpointing.v1.RawCheckpointResponse" + } + }, + "description": "QueryLastCheckpointWithStatusResponse is the response type for the\nQuery/LastCheckpointWithStatus RPC method." + }, + "babylon.checkpointing.v1.QueryRawCheckpointListResponse": { + "type": "object", + "properties": { + "raw_checkpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.checkpointing.v1.RawCheckpointWithMetaResponse" + }, + "title": "the order is going from the newest to oldest based on the epoch number" + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "description": "pagination defines the pagination in the response." + } + }, + "description": "QueryRawCheckpointListResponse is the response type for the\nQuery/RawCheckpoints RPC method." + }, + "babylon.checkpointing.v1.QueryRawCheckpointResponse": { + "type": "object", + "properties": { + "raw_checkpoint": { + "$ref": "#/definitions/babylon.checkpointing.v1.RawCheckpointWithMetaResponse" + } + }, + "description": "QueryRawCheckpointResponse is the response type for the Query/RawCheckpoint\nRPC method." + }, + "babylon.checkpointing.v1.QueryRawCheckpointsResponse": { + "type": "object", + "properties": { + "raw_checkpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.checkpointing.v1.RawCheckpointWithMetaResponse" + }, + "title": "the order is going from the newest to oldest based on the epoch number" + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "description": "pagination defines the pagination in the response." + } + }, + "description": "QueryRawCheckpointsResponse is the response type for the Query/RawCheckpoints\nRPC method." + }, + "babylon.checkpointing.v1.QueryRecentEpochStatusCountResponse": { + "type": "object", + "properties": { + "tip_epoch": { + "type": "string", + "format": "uint64" + }, + "epoch_count": { + "type": "string", + "format": "uint64" + }, + "status_count": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "uint64" + } + } + }, + "description": "QueryRecentEpochStatusCountResponse is the response type for the\nQuery/EpochStatusCount RPC method." + }, + "babylon.checkpointing.v1.RawCheckpointResponse": { + "type": "object", + "properties": { + "epoch_num": { + "type": "string", + "format": "uint64", + "title": "epoch_num defines the epoch number the raw checkpoint is for" + }, + "block_hash_hex": { + "type": "string", + "title": "block_hash_hex defines the 'BlockID.Hash', which is the hash of\nthe block that individual BLS sigs are signed on as hex string" + }, + "bitmap": { + "type": "string", + "format": "byte", + "title": "bitmap defines the bitmap that indicates the signers of the BLS multi sig" + }, + "bls_multi_sig": { + "type": "string", + "format": "byte", + "title": "bls_multi_sig defines the multi sig that is aggregated from individual BLS\nsigs" + } + }, + "title": "RawCheckpointResponse wraps the BLS multi sig with metadata" + }, + "babylon.checkpointing.v1.RawCheckpointWithMetaResponse": { + "type": "object", + "properties": { + "ckpt": { + "$ref": "#/definitions/babylon.checkpointing.v1.RawCheckpointResponse" + }, + "status": { + "$ref": "#/definitions/babylon.checkpointing.v1.CheckpointStatus", + "title": "status defines the status of the checkpoint" + }, + "status_desc": { + "type": "string", + "description": "status_desc represents the description of status enum." + }, + "bls_aggr_pk": { + "type": "string", + "format": "byte", + "title": "bls_aggr_pk defines the aggregated BLS public key" + }, + "power_sum": { + "type": "string", + "format": "uint64", + "title": "power_sum defines the accumulated voting power for the checkpoint" + }, + "lifecycle": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.checkpointing.v1.CheckpointStateUpdateResponse" + }, + "description": "lifecycle defines the lifecycle of this checkpoint, i.e., each state\ntransition and the time (in both timestamp and block height) of this\ntransition." + } + }, + "description": "RawCheckpointWithMetaResponse wraps the raw checkpoint with metadata." + }, + "cosmos.base.query.v1beta1.PageRequest": { + "type": "object", + "properties": { + "key": { + "type": "string", + "format": "byte", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set." + }, + "offset": { + "type": "string", + "format": "uint64", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set." + }, + "limit": { + "type": "string", + "format": "uint64", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app." + }, + "count_total": { + "type": "boolean", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set." + }, + "reverse": { + "type": "boolean", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43" + } + }, + "description": "message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }", + "title": "PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:" + }, + "cosmos.base.query.v1beta1.PageResponse": { + "type": "object", + "properties": { + "next_key": { + "type": "string", + "format": "byte", + "description": "next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results." + }, + "total": { + "type": "string", + "format": "uint64", + "title": "total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise" + } + }, + "description": "PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }" + }, + "google.protobuf.Any": { + "type": "object", + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "type": "string", + "format": "byte" + } + } + }, + "grpc.gateway.runtime.Error": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/google.protobuf.Any" + } + } + } + } + } +} diff --git a/tmp-swagger-gen/babylon/epoching/v1/query.swagger.json b/tmp-swagger-gen/babylon/epoching/v1/query.swagger.json new file mode 100644 index 000000000..88c11c822 --- /dev/null +++ b/tmp-swagger-gen/babylon/epoching/v1/query.swagger.json @@ -0,0 +1,835 @@ +{ + "swagger": "2.0", + "info": { + "title": "babylon/epoching/v1/query.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/babylon/epoching/v1/current_epoch": { + "get": { + "summary": "CurrentEpoch queries the current epoch", + "operationId": "CurrentEpoch", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.epoching.v1.QueryCurrentEpochResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "tags": [ + "Query" + ] + } + }, + "/babylon/epoching/v1/delegation_lifecycle/{del_addr}": { + "get": { + "summary": "DelegationLifecycle queries the lifecycle of a given delegation", + "operationId": "DelegationLifecycle", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.epoching.v1.QueryDelegationLifecycleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "del_addr", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/epoching/v1/epochs": { + "get": { + "summary": "EpochsInfo queries the metadata of epochs in a given range, depending on\nthe parameters in the pagination request. Th main use case will be querying\nthe latest epochs in time order.", + "operationId": "EpochsInfo", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.epoching.v1.QueryEpochsInfoResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/epoching/v1/epochs/{epoch_num}": { + "get": { + "summary": "EpochInfo queries the information of a given epoch", + "operationId": "EpochInfo", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.epoching.v1.QueryEpochInfoResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "epoch_num", + "in": "path", + "required": true, + "type": "string", + "format": "uint64" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/epoching/v1/epochs/{epoch_num}/messages": { + "get": { + "summary": "EpochMsgs queries the messages of a given epoch", + "operationId": "EpochMsgs", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.epoching.v1.QueryEpochMsgsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "epoch_num", + "description": "epoch_num is the number of epoch of the requested msg queue", + "in": "path", + "required": true, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/epoching/v1/epochs/{epoch_num}/validator_set": { + "get": { + "summary": "EpochValSet queries the validator set of a given epoch", + "operationId": "EpochValSet", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.epoching.v1.QueryEpochValSetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "epoch_num", + "in": "path", + "required": true, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/epoching/v1/epochs:latest/messages": { + "get": { + "summary": "LatestEpochMsgs queries the messages within a given number of most recent\nepochs", + "operationId": "LatestEpochMsgs", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.epoching.v1.QueryLatestEpochMsgsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "end_epoch", + "description": "end_epoch is the number of the last epoch to query.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "epoch_count", + "description": "epoch_count is the number of epochs to query.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/epoching/v1/params": { + "get": { + "summary": "Params queries the parameters of the module.", + "operationId": "Params", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.epoching.v1.QueryParamsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "tags": [ + "Query" + ] + } + }, + "/babylon/epoching/v1/validator_lifecycle/{val_addr}": { + "get": { + "summary": "ValidatorLifecycle queries the lifecycle of a given validator", + "operationId": "ValidatorLifecycle", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.epoching.v1.QueryValidatorLifecycleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "val_addr", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Query" + ] + } + } + }, + "definitions": { + "babylon.epoching.v1.BondState": { + "type": "string", + "enum": [ + "CREATED", + "BONDED", + "UNBONDING", + "UNBONDED", + "REMOVED" + ], + "default": "CREATED", + "description": "- CREATED: CREATED is when the validator/delegation has been created\n - BONDED: CREATED is when the validator/delegation has become bonded\n - UNBONDING: CREATED is when the validator/delegation has become unbonding\n - UNBONDED: CREATED is when the validator/delegation has become unbonded\n - REMOVED: CREATED is when the validator/delegation has been removed", + "title": "BondState is the bond state of a validator or delegation" + }, + "babylon.epoching.v1.DelegationLifecycle": { + "type": "object", + "properties": { + "del_addr": { + "type": "string" + }, + "del_life": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.epoching.v1.DelegationStateUpdate" + } + } + }, + "title": "ValidatorLifecycle is a message that records the lifecycle of\na delegation" + }, + "babylon.epoching.v1.DelegationStateUpdate": { + "type": "object", + "properties": { + "state": { + "$ref": "#/definitions/babylon.epoching.v1.BondState" + }, + "val_addr": { + "type": "string" + }, + "amount": { + "$ref": "#/definitions/cosmos.base.v1beta1.Coin" + }, + "block_height": { + "type": "string", + "format": "uint64" + }, + "block_time": { + "type": "string", + "format": "date-time" + } + }, + "title": "DelegationStateUpdate is the message that records a state update of a\ndelegation" + }, + "babylon.epoching.v1.EpochResponse": { + "type": "object", + "properties": { + "epoch_number": { + "type": "string", + "format": "uint64", + "title": "epoch_number is the number of this epoch" + }, + "current_epoch_interval": { + "type": "string", + "format": "uint64", + "title": "current_epoch_interval is the epoch interval at the time of this epoch" + }, + "first_block_height": { + "type": "string", + "format": "uint64", + "title": "first_block_height is the height of the first block in this epoch" + }, + "last_block_time": { + "type": "string", + "format": "date-time", + "description": "last_block_time is the time of the last block in this epoch.\nBabylon needs to remember the last header's time of each epoch to complete\nunbonding validators/delegations when a previous epoch's checkpoint is\nfinalised. The last_block_time field is nil in the epoch's beginning, and\nis set upon the end of this epoch." + }, + "sealer_app_hash_hex": { + "type": "string", + "description": "sealer is the last block of the sealed epoch\nsealer_app_hash points to the sealer but stored in the 1st header\nof the next epoch as hex string." + }, + "sealer_block_hash": { + "type": "string", + "description": "sealer_block_hash is the hash of the sealer\nthe validator set has generated a BLS multisig on the hash,\ni.e., hash of the last block in the epoch as hex string." + } + }, + "title": "EpochResponse is a structure that contains the metadata of an epoch" + }, + "babylon.epoching.v1.Params": { + "type": "object", + "properties": { + "epoch_interval": { + "type": "string", + "format": "uint64", + "title": "epoch_interval is the number of consecutive blocks to form an epoch" + } + }, + "description": "Params defines the parameters for the module." + }, + "babylon.epoching.v1.QueryCurrentEpochResponse": { + "type": "object", + "properties": { + "current_epoch": { + "type": "string", + "format": "uint64", + "title": "current_epoch is the current epoch number" + }, + "epoch_boundary": { + "type": "string", + "format": "uint64", + "title": "epoch_boundary is the height of this epoch's last block" + } + }, + "title": "QueryCurrentEpochResponse is the response type for the Query/CurrentEpoch RPC\nmethod" + }, + "babylon.epoching.v1.QueryDelegationLifecycleResponse": { + "type": "object", + "properties": { + "del_life": { + "$ref": "#/definitions/babylon.epoching.v1.DelegationLifecycle" + } + }, + "title": "QueryDelegationLifecycleRequest is the response type for the\nQuery/DelegationLifecycle RPC method" + }, + "babylon.epoching.v1.QueryEpochInfoResponse": { + "type": "object", + "properties": { + "epoch": { + "$ref": "#/definitions/babylon.epoching.v1.EpochResponse" + } + }, + "title": "QueryEpochInfoRequest is the response type for the Query/EpochInfo method" + }, + "babylon.epoching.v1.QueryEpochMsgsResponse": { + "type": "object", + "properties": { + "msgs": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.epoching.v1.QueuedMessageResponse" + }, + "title": "msgs is the list of messages queued in the current epoch" + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "title": "pagination defines the pagination in the response" + } + }, + "title": "QueryEpochMsgsResponse is the response type for the Query/EpochMsgs RPC\nmethod" + }, + "babylon.epoching.v1.QueryEpochValSetResponse": { + "type": "object", + "properties": { + "validators": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.epoching.v1.Validator" + } + }, + "total_voting_power": { + "type": "string", + "format": "int64" + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse" + } + }, + "title": "QueryEpochValSetRequest is the response type for the Query/EpochValSet RPC\nmethod" + }, + "babylon.epoching.v1.QueryEpochsInfoResponse": { + "type": "object", + "properties": { + "epochs": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.epoching.v1.EpochResponse" + } + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "title": "pagination defines the pagination in the response" + } + }, + "title": "QueryEpochsInfoResponse is the response type for the Query/EpochInfos method" + }, + "babylon.epoching.v1.QueryLatestEpochMsgsResponse": { + "type": "object", + "properties": { + "latest_epoch_msgs": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.epoching.v1.QueuedMessageList" + }, + "title": "latest_epoch_msgs is a list of QueuedMessageList\neach QueuedMessageList has a field identifying the epoch number" + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse" + } + }, + "title": "QueryLatestEpochMsgsResponse is the response type for the\nQuery/LatestEpochMsgs RPC method" + }, + "babylon.epoching.v1.QueryParamsResponse": { + "type": "object", + "properties": { + "params": { + "$ref": "#/definitions/babylon.epoching.v1.Params", + "description": "params holds all the parameters of this module." + } + }, + "description": "QueryParamsResponse is the response type for the Query/Params RPC method." + }, + "babylon.epoching.v1.QueryValidatorLifecycleResponse": { + "type": "object", + "properties": { + "val_addr": { + "type": "string" + }, + "val_life": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.epoching.v1.ValStateUpdateResponse" + } + } + }, + "title": "QueryValidatorLifecycleResponse is the response type for the\nQuery/ValidatorLifecycle RPC method" + }, + "babylon.epoching.v1.QueuedMessageList": { + "type": "object", + "properties": { + "epoch_number": { + "type": "string", + "format": "uint64" + }, + "msgs": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.epoching.v1.QueuedMessageResponse" + } + } + }, + "title": "QueuedMessageList is a message that contains a list of staking-related\nmessages queued for an epoch" + }, + "babylon.epoching.v1.QueuedMessageResponse": { + "type": "object", + "properties": { + "tx_id": { + "type": "string", + "description": "tx_id is the ID of the tx that contains the message as hex." + }, + "msg_id": { + "type": "string", + "description": "msg_id is the original message ID, i.e., hash of the marshaled message as hex." + }, + "block_height": { + "type": "string", + "format": "uint64", + "title": "block_height is the height when this msg is submitted to Babylon" + }, + "block_time": { + "type": "string", + "format": "date-time", + "title": "block_time is the timestamp when this msg is submitted to Babylon" + }, + "msg": { + "type": "string", + "description": "msg is the actual message that is sent by a user and is queued by the\nepoching module as string." + } + }, + "title": "QueuedMessageResponse is a message that can change the validator set and is delayed\nto the end of an epoch" + }, + "babylon.epoching.v1.ValStateUpdateResponse": { + "type": "object", + "properties": { + "state_desc": { + "type": "string", + "description": "StateDesc defines the descriptive state." + }, + "block_height": { + "type": "string", + "format": "uint64" + }, + "block_time": { + "type": "string", + "format": "date-time" + } + }, + "description": "ValStateUpdateResponse is a message response that records a state update of a validator." + }, + "babylon.epoching.v1.Validator": { + "type": "object", + "properties": { + "addr": { + "type": "string", + "format": "byte", + "title": "addr is the validator's address (in sdk.ValAddress)" + }, + "power": { + "type": "string", + "format": "int64", + "title": "power is the validator's voting power" + } + }, + "title": "Validator is a message that denotes a validator" + }, + "cosmos.base.query.v1beta1.PageRequest": { + "type": "object", + "properties": { + "key": { + "type": "string", + "format": "byte", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set." + }, + "offset": { + "type": "string", + "format": "uint64", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set." + }, + "limit": { + "type": "string", + "format": "uint64", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app." + }, + "count_total": { + "type": "boolean", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set." + }, + "reverse": { + "type": "boolean", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43" + } + }, + "description": "message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }", + "title": "PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:" + }, + "cosmos.base.query.v1beta1.PageResponse": { + "type": "object", + "properties": { + "next_key": { + "type": "string", + "format": "byte", + "description": "next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results." + }, + "total": { + "type": "string", + "format": "uint64", + "title": "total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise" + } + }, + "description": "PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }" + }, + "cosmos.base.v1beta1.Coin": { + "type": "object", + "properties": { + "denom": { + "type": "string" + }, + "amount": { + "type": "string" + } + }, + "description": "Coin defines a token with a denomination and an amount.\n\nNOTE: The amount field is an Int which implements the custom method\nsignatures required by gogoproto." + }, + "google.protobuf.Any": { + "type": "object", + "properties": { + "type_url": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + }, + "value": { + "type": "string", + "format": "byte", + "description": "Must be a valid serialized protocol buffer of the above specified type." + } + }, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "grpc.gateway.runtime.Error": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/google.protobuf.Any" + } + } + } + } + } +} diff --git a/tmp-swagger-gen/babylon/finality/v1/query.swagger.json b/tmp-swagger-gen/babylon/finality/v1/query.swagger.json new file mode 100644 index 000000000..13dc31ec3 --- /dev/null +++ b/tmp-swagger-gen/babylon/finality/v1/query.swagger.json @@ -0,0 +1,1151 @@ +{ + "swagger": "2.0", + "info": { + "title": "babylon/finality/v1/query.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/babylon/finality/v1/activated_height": { + "get": { + "summary": "ActivatedHeight queries the height when BTC staking protocol is activated, i.e., the first height when\nthere exists 1 finality provider with voting power", + "operationId": "ActivatedHeight", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.finality.v1.QueryActivatedHeightResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "tags": [ + "Query" + ] + } + }, + "/babylon/finality/v1/blocks": { + "get": { + "summary": "ListBlocks is a range query for blocks at a given status", + "operationId": "ListBlocks", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.finality.v1.QueryListBlocksResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "status", + "description": "status indicates the status of blocks that the querier wants to query.\n\n - NON_FINALIZED: NON_FINALIZED means the block is not finalised\n - FINALIZED: FINALIZED means the block is finalized\n - ANY: ANY means the block can be in any status", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "NON_FINALIZED", + "FINALIZED", + "ANY" + ], + "default": "NON_FINALIZED" + }, + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/finality/v1/blocks/{height}": { + "get": { + "summary": "Block queries a block at a given height", + "operationId": "Block", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.finality.v1.QueryBlockResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "height", + "description": "height is the height of the Babylon block", + "in": "path", + "required": true, + "type": "string", + "format": "uint64" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/finality/v1/evidences": { + "get": { + "summary": "ListEvidences queries is a range query for evidences", + "operationId": "ListEvidences", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.finality.v1.QueryListEvidencesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "start_height", + "description": "start_height is the starting height that the querier specifies\nsuch that the RPC will only return evidences since this height.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/finality/v1/finality_providers/{fp_btc_pk_hex}/evidence": { + "get": { + "summary": "Evidence queries the first evidence which can be used for extracting the BTC SK", + "operationId": "Evidence", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.finality.v1.QueryEvidenceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "fp_btc_pk_hex", + "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK\n(in BIP340 format) of the finality provider", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/finality/v1/finality_providers/{fp_btc_pk_hex}/power": { + "get": { + "summary": "FinalityProviderCurrentPower queries the voting power of a finality provider at the current height", + "operationId": "FinalityProviderCurrentPower", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.finality.v1.QueryFinalityProviderCurrentPowerResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "fp_btc_pk_hex", + "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality provider that\nthis BTC delegation delegates to\nthe PK follows encoding in BIP-340 spec", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/finality/v1/finality_providers/{fp_btc_pk_hex}/power/{height}": { + "get": { + "summary": "FinalityProviderPowerAtHeight queries the voting power of a finality provider at a given height", + "operationId": "FinalityProviderPowerAtHeight", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.finality.v1.QueryFinalityProviderPowerAtHeightResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "fp_btc_pk_hex", + "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality provider that\nthis BTC delegation delegates to\nthe PK follows encoding in BIP-340 spec", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "height", + "description": "height is used for querying the given finality provider's voting power at this height", + "in": "path", + "required": true, + "type": "string", + "format": "uint64" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/finality/v1/finality_providers/{fp_btc_pk_hex}/pub_rand_commit_list": { + "get": { + "summary": "ListPubRandCommit is a range query for public randomness commitments of a given finality provider", + "operationId": "ListPubRandCommit", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.finality.v1.QueryListPubRandCommitResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "fp_btc_pk_hex", + "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality provider", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/finality/v1/finality_providers/{fp_btc_pk_hex}/public_randomness_list": { + "get": { + "summary": "ListPublicRandomness is a range query for public randomness of a given finality provider\nNOTE: Babylon only has the knowledge of public randomness that is already revealed by\nfinality providers, i.e., the finality provider already provides a finality signature\nat the corresponding height", + "operationId": "ListPublicRandomness", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.finality.v1.QueryListPublicRandomnessResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "fp_btc_pk_hex", + "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality provider", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/finality/v1/finality_providers/{height}": { + "get": { + "summary": "ActiveFinalityProvidersAtHeight queries finality providers with non zero voting power at given height.", + "operationId": "ActiveFinalityProvidersAtHeight", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.finality.v1.QueryActiveFinalityProvidersAtHeightResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "height", + "description": "height defines at which Babylon height to query the finality providers info.", + "in": "path", + "required": true, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/finality/v1/params": { + "get": { + "summary": "Parameters queries the parameters of the module.", + "operationId": "Params", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.finality.v1.QueryParamsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "tags": [ + "Query" + ] + } + }, + "/babylon/finality/v1/signing_infos": { + "get": { + "summary": "SigningInfos queries the signing info of all the active finality providers", + "operationId": "SigningInfos", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.finality.v1.QuerySigningInfosResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/finality/v1/signing_infos/{fp_btc_pk_hex}": { + "get": { + "summary": "SigningInfo queries the signing info of given finality provider BTC public key", + "operationId": "SigningInfo", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.finality.v1.QuerySigningInfoResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "fp_btc_pk_hex", + "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK\n(in BIP340 format) of the finality provider", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/finality/v1/votes/{height}": { + "get": { + "summary": "VotesAtHeight queries finality providers who have signed the block at given height.", + "operationId": "VotesAtHeight", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.finality.v1.QueryVotesAtHeightResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "height", + "description": "height defines at which height to query the finality providers.", + "in": "path", + "required": true, + "type": "string", + "format": "uint64" + } + ], + "tags": [ + "Query" + ] + } + } + }, + "definitions": { + "babylon.finality.v1.ActiveFinalityProvidersAtHeightResponse": { + "type": "object", + "properties": { + "btc_pk_hex": { + "type": "string", + "title": "btc_pk is the Bitcoin secp256k1 PK of thisfinality provider\nthe PK follows encoding in BIP-340 spec" + }, + "height": { + "type": "string", + "format": "uint64", + "title": "height is the queried Babylon height" + }, + "voting_power": { + "type": "string", + "format": "uint64", + "title": "voting_power is the voting power of this finality provider at the given height" + }, + "slashed_babylon_height": { + "type": "string", + "format": "uint64", + "title": "slashed_babylon_height indicates the Babylon height when\nthe finality provider is slashed.\nif it's 0 then the finality provider is not slashed" + }, + "slashed_btc_height": { + "type": "integer", + "format": "int64", + "title": "slashed_btc_height indicates the BTC height when\nthe finality provider is slashed.\nif it's 0 then the finality provider is not slashed" + }, + "jailed": { + "type": "boolean", + "title": "jailed defines whether the finality provider is detected jailed" + }, + "highest_voted_height": { + "type": "integer", + "format": "int64", + "title": "highest_voted_height is the highest height for which the\nfinality provider has voted" + } + }, + "description": "ActiveFinalityProvidersAtHeightResponse wraps the FinalityProvider with metadata." + }, + "babylon.finality.v1.EvidenceResponse": { + "type": "object", + "properties": { + "fp_btc_pk_hex": { + "type": "string", + "title": "fp_btc_pk_hex is the BTC PK of the finality provider that casts this vote" + }, + "block_height": { + "type": "string", + "format": "uint64", + "title": "block_height is the height of the conflicting blocks" + }, + "pub_rand": { + "type": "string", + "format": "byte", + "title": "pub_rand is the public randomness the finality provider has committed to" + }, + "canonical_app_hash": { + "type": "string", + "format": "byte", + "title": "canonical_app_hash is the AppHash of the canonical block" + }, + "fork_app_hash": { + "type": "string", + "format": "byte", + "title": "fork_app_hash is the AppHash of the fork block" + }, + "canonical_finality_sig": { + "type": "string", + "format": "byte", + "title": "canonical_finality_sig is the finality signature to the canonical block\nwhere finality signature is an EOTS signature, i.e.,\nthe `s` in a Schnorr signature `(r, s)`\n`r` is the public randomness that is already committed by the finality provider" + }, + "fork_finality_sig": { + "type": "string", + "format": "byte", + "title": "fork_finality_sig is the finality signature to the fork block\nwhere finality signature is an EOTS signature" + } + }, + "title": "Evidence is the evidence that a finality provider has signed finality\nsignatures with correct public randomness on two conflicting Babylon headers" + }, + "babylon.finality.v1.IndexedBlock": { + "type": "object", + "properties": { + "height": { + "type": "string", + "format": "uint64", + "title": "height is the height of the block" + }, + "app_hash": { + "type": "string", + "format": "byte", + "title": "app_hash is the AppHash of the block" + }, + "finalized": { + "type": "boolean", + "title": "finalized indicates whether the IndexedBlock is finalised by 2/3\nfinality providers or not" + } + }, + "title": "IndexedBlock is the necessary metadata and finalization status of a block" + }, + "babylon.finality.v1.Params": { + "type": "object", + "properties": { + "max_active_finality_providers": { + "type": "integer", + "format": "int64", + "title": "max_active_finality_providers is the maximum number of active finality providers in the BTC staking protocol" + }, + "signed_blocks_window": { + "type": "string", + "format": "int64", + "title": "signed_blocks_window defines the size of the sliding window for tracking finality provider liveness" + }, + "finality_sig_timeout": { + "type": "string", + "format": "int64", + "title": "finality_sig_timeout defines how much time (in terms of blocks) finality providers have to cast a finality\nvote before being judged as missing their voting turn on the given block" + }, + "min_signed_per_window": { + "type": "string", + "format": "byte", + "title": "min_signed_per_window defines the minimum number of blocks that a finality provider is required to sign\nwithin the sliding window to avoid being jailed" + }, + "min_pub_rand": { + "type": "string", + "format": "uint64", + "title": "min_pub_rand is the minimum number of public randomness each\nmessage should commit" + }, + "jail_duration": { + "type": "string", + "title": "jail_duration is the minimum period of time that a finality provider remains jailed" + }, + "finality_activation_height": { + "type": "string", + "format": "uint64", + "description": "finality_activation_height is the babylon block height which the finality module will\nstart to accept finality voting and the minimum allowed value for the public randomness\ncommit start height." + } + }, + "description": "Params defines the parameters for the module." + }, + "babylon.finality.v1.PubRandCommitResponse": { + "type": "object", + "properties": { + "num_pub_rand": { + "type": "string", + "format": "uint64", + "title": "num_pub_rand is the number of committed public randomness" + }, + "commitment": { + "type": "string", + "format": "byte", + "title": "commitment is the value of the commitment" + }, + "epoch_num": { + "type": "string", + "format": "uint64", + "title": "epoch_num defines the epoch number that the commit falls into" + } + }, + "title": "PubRandCommitResponse is the response type for a public randomness commitment" + }, + "babylon.finality.v1.QueriedBlockStatus": { + "type": "string", + "enum": [ + "NON_FINALIZED", + "FINALIZED", + "ANY" + ], + "default": "NON_FINALIZED", + "description": "QueriedBlockStatus is the status of blocks that the querier wants to query.\n\n - NON_FINALIZED: NON_FINALIZED means the block is not finalised\n - FINALIZED: FINALIZED means the block is finalized\n - ANY: ANY means the block can be in any status" + }, + "babylon.finality.v1.QueryActivatedHeightResponse": { + "type": "object", + "properties": { + "height": { + "type": "string", + "format": "uint64" + } + }, + "description": "QueryActivatedHeightResponse is the response type for the Query/ActivatedHeight RPC method." + }, + "babylon.finality.v1.QueryActiveFinalityProvidersAtHeightResponse": { + "type": "object", + "properties": { + "finality_providers": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.finality.v1.ActiveFinalityProvidersAtHeightResponse" + }, + "description": "finality_providers contains all the queried finality providersn." + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "description": "pagination defines the pagination in the response." + } + }, + "description": "QueryActiveFinalityProvidersAtHeightResponse is the response type for the\nQuery/ActiveFinalityProvidersAtHeight RPC method." + }, + "babylon.finality.v1.QueryBlockResponse": { + "type": "object", + "properties": { + "block": { + "$ref": "#/definitions/babylon.finality.v1.IndexedBlock", + "title": "block is the Babylon at the given height" + } + }, + "description": "QueryBlockResponse is the response type for the\nQuery/Block RPC method." + }, + "babylon.finality.v1.QueryEvidenceResponse": { + "type": "object", + "properties": { + "evidence": { + "$ref": "#/definitions/babylon.finality.v1.EvidenceResponse" + } + }, + "description": "QueryEvidenceResponse is the response type for the\nQuery/Evidence RPC method." + }, + "babylon.finality.v1.QueryFinalityProviderCurrentPowerResponse": { + "type": "object", + "properties": { + "height": { + "type": "string", + "format": "uint64", + "title": "height is the current height" + }, + "voting_power": { + "type": "string", + "format": "uint64", + "title": "voting_power is the voting power of the finality provider" + } + }, + "description": "QueryFinalityProviderCurrentPowerResponse is the response type for the\nQuery/FinalityProviderCurrentPower RPC method." + }, + "babylon.finality.v1.QueryFinalityProviderPowerAtHeightResponse": { + "type": "object", + "properties": { + "voting_power": { + "type": "string", + "format": "uint64", + "title": "voting_power is the voting power of the finality provider" + } + }, + "description": "QueryFinalityProviderPowerAtHeightResponse is the response type for the\nQuery/FinalityProviderPowerAtHeight RPC method." + }, + "babylon.finality.v1.QueryListBlocksResponse": { + "type": "object", + "properties": { + "blocks": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.finality.v1.IndexedBlock" + }, + "title": "blocks is the list of blocks at the given status" + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "description": "pagination defines the pagination in the response." + } + }, + "description": "QueryListBlocksResponse is the response type for the\nQuery/ListBlocks RPC method." + }, + "babylon.finality.v1.QueryListEvidencesResponse": { + "type": "object", + "properties": { + "evidences": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.finality.v1.EvidenceResponse" + }, + "title": "blocks is the list of evidences" + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "description": "pagination defines the pagination in the response." + } + }, + "description": "QueryListEvidencesResponse is the response type for the\nQuery/ListEvidences RPC method." + }, + "babylon.finality.v1.QueryListPubRandCommitResponse": { + "type": "object", + "properties": { + "pub_rand_commit_map": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/babylon.finality.v1.PubRandCommitResponse" + }, + "title": "pub_rand_commit_map is the map where the key is the start height and the value\nis the public randomness commitment at this height for the given finality provider" + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "description": "pagination defines the pagination in the response." + } + }, + "description": "QueryListPubRandCommitResponse is the response type for the\nQuery/ListPubRandCommit RPC method." + }, + "babylon.finality.v1.QueryListPublicRandomnessResponse": { + "type": "object", + "properties": { + "pub_rand_map": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "byte" + }, + "title": "pub_rand_map is the map where the key is the height and the value\nis the public randomness at this height for the given finality provider" + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "description": "pagination defines the pagination in the response." + } + }, + "description": "QueryListPublicRandomnessResponse is the response type for the\nQuery/ListPublicRandomness RPC method." + }, + "babylon.finality.v1.QueryParamsResponse": { + "type": "object", + "properties": { + "params": { + "$ref": "#/definitions/babylon.finality.v1.Params", + "description": "params holds all the parameters of this module." + } + }, + "description": "QueryParamsResponse is response type for the Query/Params RPC method." + }, + "babylon.finality.v1.QuerySigningInfoResponse": { + "type": "object", + "properties": { + "signing_info": { + "$ref": "#/definitions/babylon.finality.v1.SigningInfoResponse" + } + }, + "title": "QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC\nmethod" + }, + "babylon.finality.v1.QuerySigningInfosResponse": { + "type": "object", + "properties": { + "signing_infos": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.finality.v1.SigningInfoResponse" + }, + "title": "info is the signing info of all finality providers with signing info" + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse" + } + }, + "title": "QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC\nmethod" + }, + "babylon.finality.v1.QueryVotesAtHeightResponse": { + "type": "object", + "properties": { + "btc_pks": { + "type": "array", + "items": { + "type": "string", + "format": "byte" + }, + "title": "btc_pk is the Bitcoin secp256k1 PK of finality providers who have signed the block at given height.\nthe PK follows encoding in BIP-340 spec" + } + }, + "description": "QueryVotesAtHeightResponse is the response type for the\nQuery/VotesAtHeight RPC method." + }, + "babylon.finality.v1.SigningInfoResponse": { + "type": "object", + "properties": { + "fp_btc_pk_hex": { + "type": "string", + "title": "fp_btc_pk is the BTC PK of the finality provider that casts this vote" + }, + "start_height": { + "type": "string", + "format": "int64", + "title": "start_height is the block height at which finality provider become active" + }, + "missed_blocks_counter": { + "type": "string", + "format": "int64", + "description": "missed_blocks_counter defines a counter to avoid unnecessary array reads.\nNote that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`." + }, + "jailed_until": { + "type": "string", + "format": "date-time", + "description": "Timestamp until which the validator is jailed due to liveness downtime." + } + }, + "description": "SigningInfoResponse defines the API response containing a finality provider's signing info\nfor monitoring their liveness activity." + }, + "cosmos.base.query.v1beta1.PageRequest": { + "type": "object", + "properties": { + "key": { + "type": "string", + "format": "byte", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set." + }, + "offset": { + "type": "string", + "format": "uint64", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set." + }, + "limit": { + "type": "string", + "format": "uint64", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app." + }, + "count_total": { + "type": "boolean", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set." + }, + "reverse": { + "type": "boolean", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43" + } + }, + "description": "message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }", + "title": "PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:" + }, + "cosmos.base.query.v1beta1.PageResponse": { + "type": "object", + "properties": { + "next_key": { + "type": "string", + "format": "byte", + "description": "next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results." + }, + "total": { + "type": "string", + "format": "uint64", + "title": "total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise" + } + }, + "description": "PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }" + }, + "google.protobuf.Any": { + "type": "object", + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "type": "string", + "format": "byte" + } + } + }, + "grpc.gateway.runtime.Error": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/google.protobuf.Any" + } + } + } + } + } +} diff --git a/tmp-swagger-gen/babylon/incentive/query.swagger.json b/tmp-swagger-gen/babylon/incentive/query.swagger.json new file mode 100644 index 000000000..5c2e44acd --- /dev/null +++ b/tmp-swagger-gen/babylon/incentive/query.swagger.json @@ -0,0 +1,268 @@ +{ + "swagger": "2.0", + "info": { + "title": "babylon/incentive/query.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/babylon/incentive/address/{address}/reward_gauge": { + "get": { + "summary": "RewardGauge queries the reward gauge of a given stakeholder address", + "operationId": "RewardGauges", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.incentive.QueryRewardGaugesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "address", + "description": "address is the address of the stakeholder in bech32 string", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/incentive/btc_staking_gauge/{height}": { + "get": { + "summary": "BTCStakingGauge queries the BTC staking gauge of a given height", + "operationId": "BTCStakingGauge", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.incentive.QueryBTCStakingGaugeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "height", + "description": "height is the queried Babylon height", + "in": "path", + "required": true, + "type": "string", + "format": "uint64" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/incentive/delegators/{delegator_address}/withdraw_address": { + "get": { + "summary": "DelegatorWithdrawAddress queries withdraw address of a delegator.", + "operationId": "DelegatorWithdrawAddress", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.incentive.QueryDelegatorWithdrawAddressResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "delegator_address", + "description": "delegator_address defines the delegator address to query for.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/incentive/params": { + "get": { + "summary": "Parameters queries the parameters of the module.", + "operationId": "Params", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.incentive.QueryParamsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "tags": [ + "Query" + ] + } + } + }, + "definitions": { + "babylon.incentive.BTCStakingGaugeResponse": { + "type": "object", + "properties": { + "coins": { + "type": "array", + "items": { + "$ref": "#/definitions/cosmos.base.v1beta1.Coin" + }, + "title": "coins that have been in the gauge\ncan have multiple coin denoms" + } + }, + "description": "BTCStakingGaugeResponse is response type for the Query/BTCStakingGauge RPC method." + }, + "babylon.incentive.Params": { + "type": "object", + "properties": { + "btc_staking_portion": { + "type": "string", + "title": "btc_staking_portion is the portion of rewards that goes to Finality Providers/delegations\nNOTE: the portion of each Finality Provider/delegation is calculated by using its voting\npower and finality provider's commission" + } + }, + "title": "Params defines the parameters for the module, including portions of rewards\ndistributed to each type of stakeholder. Note that sum of the portions should\nbe strictly less than 1 so that the rest will go to Comet validators/delegations\nadapted from https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/proto/cosmos/distribution/v1beta1/distribution.proto" + }, + "babylon.incentive.QueryBTCStakingGaugeResponse": { + "type": "object", + "properties": { + "gauge": { + "$ref": "#/definitions/babylon.incentive.BTCStakingGaugeResponse", + "title": "gauge is the BTC staking gauge at the queried height" + } + }, + "description": "QueryBTCStakingGaugeResponse is response type for the Query/BTCStakingGauge RPC method." + }, + "babylon.incentive.QueryDelegatorWithdrawAddressResponse": { + "type": "object", + "properties": { + "withdraw_address": { + "type": "string", + "description": "withdraw_address defines the delegator address to query for." + } + }, + "description": "QueryDelegatorWithdrawAddressResponse is the response type for the\nQuery/DelegatorWithdrawAddress RPC method." + }, + "babylon.incentive.QueryParamsResponse": { + "type": "object", + "properties": { + "params": { + "$ref": "#/definitions/babylon.incentive.Params", + "description": "params holds all the parameters of this module." + } + }, + "description": "QueryParamsResponse is response type for the Query/Params RPC method." + }, + "babylon.incentive.QueryRewardGaugesResponse": { + "type": "object", + "properties": { + "reward_gauges": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/babylon.incentive.RewardGaugesResponse" + }, + "title": "reward_gauges is the map of reward gauges, where key is the stakeholder type\nand value is the reward gauge holding all rewards for the stakeholder in that type" + } + }, + "description": "QueryRewardGaugesResponse is response type for the Query/RewardGauges RPC method." + }, + "babylon.incentive.RewardGaugesResponse": { + "type": "object", + "properties": { + "coins": { + "type": "array", + "items": { + "$ref": "#/definitions/cosmos.base.v1beta1.Coin" + }, + "title": "coins are coins that have been in the gauge\nCan have multiple coin denoms" + }, + "withdrawn_coins": { + "type": "array", + "items": { + "$ref": "#/definitions/cosmos.base.v1beta1.Coin" + }, + "title": "withdrawn_coins are coins that have been withdrawn by the stakeholder already" + } + }, + "title": "RewardGaugesResponse is an object that stores rewards distributed to a BTC staking stakeholder" + }, + "cosmos.base.v1beta1.Coin": { + "type": "object", + "properties": { + "denom": { + "type": "string" + }, + "amount": { + "type": "string" + } + }, + "description": "Coin defines a token with a denomination and an amount.\n\nNOTE: The amount field is an Int which implements the custom method\nsignatures required by gogoproto." + }, + "google.protobuf.Any": { + "type": "object", + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "type": "string", + "format": "byte" + } + } + }, + "grpc.gateway.runtime.Error": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/google.protobuf.Any" + } + } + } + } + } +} diff --git a/tmp-swagger-gen/babylon/mint/v1/query.swagger.json b/tmp-swagger-gen/babylon/mint/v1/query.swagger.json new file mode 100644 index 000000000..dcd9156d9 --- /dev/null +++ b/tmp-swagger-gen/babylon/mint/v1/query.swagger.json @@ -0,0 +1,152 @@ +{ + "swagger": "2.0", + "info": { + "title": "babylon/mint/v1/query.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/cosmos/mint/v1beta1/annual_provisions": { + "get": { + "summary": "AnnualProvisions returns the current annual provisions.", + "operationId": "AnnualProvisions", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.mint.v1.QueryAnnualProvisionsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "tags": [ + "Query" + ] + } + }, + "/cosmos/mint/v1beta1/genesis_time": { + "get": { + "summary": "GenesisTime returns the genesis time.", + "operationId": "GenesisTime", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.mint.v1.QueryGenesisTimeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "tags": [ + "Query" + ] + } + }, + "/cosmos/mint/v1beta1/inflation_rate": { + "get": { + "summary": "InflationRate returns the current inflation rate.", + "operationId": "InflationRate", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.mint.v1.QueryInflationRateResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "tags": [ + "Query" + ] + } + } + }, + "definitions": { + "babylon.mint.v1.QueryAnnualProvisionsResponse": { + "type": "object", + "properties": { + "annual_provisions": { + "type": "string", + "format": "byte", + "description": "AnnualProvisions is the current annual provisions." + } + }, + "description": "QueryAnnualProvisionsResponse is the response type for the\nQuery/AnnualProvisions RPC method." + }, + "babylon.mint.v1.QueryGenesisTimeResponse": { + "type": "object", + "properties": { + "genesis_time": { + "type": "string", + "format": "date-time", + "description": "GenesisTime is the timestamp associated with the first block." + } + }, + "description": "QueryGenesisTimeResponse is the response type for the Query/GenesisTime RPC\nmethod." + }, + "babylon.mint.v1.QueryInflationRateResponse": { + "type": "object", + "properties": { + "inflation_rate": { + "type": "string", + "format": "byte", + "description": "InflationRate is the current inflation rate." + } + }, + "description": "QueryInflationRateResponse is the response type for the Query/InflationRate\nRPC method." + }, + "google.protobuf.Any": { + "type": "object", + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "type": "string", + "format": "byte" + } + } + }, + "grpc.gateway.runtime.Error": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/google.protobuf.Any" + } + } + } + } + } +} diff --git a/tmp-swagger-gen/babylon/monitor/v1/query.swagger.json b/tmp-swagger-gen/babylon/monitor/v1/query.swagger.json new file mode 100644 index 000000000..725408147 --- /dev/null +++ b/tmp-swagger-gen/babylon/monitor/v1/query.swagger.json @@ -0,0 +1,136 @@ +{ + "swagger": "2.0", + "info": { + "title": "babylon/monitor/v1/query.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/babylon/monitor/v1/checkpoints/{ckpt_hash}": { + "get": { + "summary": "ReportedCheckpointBtcHeight returns the BTC light client height at which\nthe checkpoint with the given hash is reported back to Babylon", + "operationId": "ReportedCheckpointBtcHeight", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.monitor.v1.QueryReportedCheckpointBtcHeightResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "ckpt_hash", + "description": "ckpt_hash is hex encoded byte string of the hash of the checkpoint", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/monitor/v1/epochs/{epoch_num}": { + "get": { + "summary": "EndedEpochBtcHeight returns the BTC light client height at provided epoch\nfinish", + "operationId": "EndedEpochBtcHeight", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.monitor.v1.QueryEndedEpochBtcHeightResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "epoch_num", + "in": "path", + "required": true, + "type": "string", + "format": "uint64" + } + ], + "tags": [ + "Query" + ] + } + } + }, + "definitions": { + "babylon.monitor.v1.QueryEndedEpochBtcHeightResponse": { + "type": "object", + "properties": { + "btc_light_client_height": { + "type": "integer", + "format": "int64", + "title": "height of btc light client when epoch ended" + } + }, + "title": "QueryEndedEpochBtcHeightResponse defines a response type for\nEndedEpochBtcHeight RPC method" + }, + "babylon.monitor.v1.QueryReportedCheckpointBtcHeightResponse": { + "type": "object", + "properties": { + "btc_light_client_height": { + "type": "integer", + "format": "int64", + "title": "height of btc light client when checkpoint is reported" + } + }, + "title": "QueryReportedCheckpointBtcHeightResponse defines a response type for\nReportedCheckpointBtcHeight RPC method" + }, + "google.protobuf.Any": { + "type": "object", + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "type": "string", + "format": "byte" + } + } + }, + "grpc.gateway.runtime.Error": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/google.protobuf.Any" + } + } + } + } + } +} diff --git a/tmp-swagger-gen/babylon/zoneconcierge/v1/query.swagger.json b/tmp-swagger-gen/babylon/zoneconcierge/v1/query.swagger.json new file mode 100644 index 000000000..e6bdeb2b7 --- /dev/null +++ b/tmp-swagger-gen/babylon/zoneconcierge/v1/query.swagger.json @@ -0,0 +1,950 @@ +{ + "swagger": "2.0", + "info": { + "title": "babylon/zoneconcierge/v1/query.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/babylon/zoneconcierge/v1/chain_info/{consumer_id}/header/{height}": { + "get": { + "summary": "Header queries the CZ header and fork headers at a given height.", + "operationId": "Header", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryHeaderResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "consumer_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "height", + "in": "path", + "required": true, + "type": "string", + "format": "uint64" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/zoneconcierge/v1/chains": { + "get": { + "summary": "ChainList queries the list of chains that checkpoint to Babylon", + "operationId": "ChainList", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryChainListResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/zoneconcierge/v1/chains_info": { + "get": { + "summary": "ChainsInfo queries the latest info for a given list of chains in Babylon's view", + "operationId": "ChainsInfo", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryChainsInfoResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "consumer_ids", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/zoneconcierge/v1/epoch_chains_info": { + "get": { + "summary": "EpochChainsInfo queries the latest info for a list of chains\nin a given epoch in Babylon's view", + "operationId": "EpochChainsInfo", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryEpochChainsInfoResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "epoch_num", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "consumer_ids", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/zoneconcierge/v1/finalized_chain_info/{consumer_id}/height/{height}": { + "get": { + "summary": "FinalizedChainInfoUntilHeight queries the BTC-finalised info no later than\nthe provided CZ height, with proofs", + "operationId": "FinalizedChainInfoUntilHeight", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryFinalizedChainInfoUntilHeightResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "consumer_id", + "description": "consumer_id is the ID of the CZ", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "height", + "description": "height is the height of the CZ chain\nsuch that the returned finalised chain info will be no later than this\nheight", + "in": "path", + "required": true, + "type": "string", + "format": "uint64" + }, + { + "name": "prove", + "description": "prove indicates whether the querier wants to get proofs of this timestamp.", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/zoneconcierge/v1/finalized_chains_info": { + "get": { + "summary": "FinalizedChainsInfo queries the BTC-finalised info of chains with given IDs, with proofs", + "operationId": "FinalizedChainsInfo", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryFinalizedChainsInfoResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "consumer_ids", + "description": "consumer_ids is the list of ids of CZs.", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "prove", + "description": "prove indicates whether the querier wants to get proofs of this timestamp.", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/zoneconcierge/v1/headers/{consumer_id}": { + "get": { + "summary": "ListHeaders queries the headers of a chain in Babylon's view, with\npagination support", + "operationId": "ListHeaders", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryListHeadersResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "consumer_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "pagination.key", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "pagination.offset", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.limit", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", + "in": "query", + "required": false, + "type": "string", + "format": "uint64" + }, + { + "name": "pagination.count_total", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "pagination.reverse", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/zoneconcierge/v1/headers/{consumer_id}/epochs/{epoch_num}": { + "get": { + "summary": "ListEpochHeaders queries the headers of a chain timestamped in a given\nepoch of Babylon, with pagination support", + "operationId": "ListEpochHeaders", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryListEpochHeadersResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "parameters": [ + { + "name": "consumer_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "epoch_num", + "in": "path", + "required": true, + "type": "string", + "format": "uint64" + } + ], + "tags": [ + "Query" + ] + } + }, + "/babylon/zoneconcierge/v1/params": { + "get": { + "summary": "Params queries the parameters of the module.", + "operationId": "Params", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryParamsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/grpc.gateway.runtime.Error" + } + } + }, + "tags": [ + "Query" + ] + } + } + }, + "definitions": { + "babylon.btccheckpoint.v1.SubmissionKey": { + "type": "object", + "properties": { + "key": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.btccheckpoint.v1.TransactionKey" + } + } + }, + "title": "Checkpoint can be composed from multiple transactions, so to identify whole\nsubmission we need list of transaction keys.\nEach submission can generally be identified by this list of (txIdx,\nblockHash) tuples. Note: this could possibly be optimized as if transactions\nwere in one block they would have the same block hash and different indexes,\nbut each blockhash is only 33 (1 byte for prefix encoding and 32 byte hash),\nso there should be other strong arguments for this optimization" + }, + "babylon.btccheckpoint.v1.TransactionInfo": { + "type": "object", + "properties": { + "key": { + "$ref": "#/definitions/babylon.btccheckpoint.v1.TransactionKey", + "description": "key is the position (txIdx, blockHash) of this tx on BTC blockchain\nAlthough it is already a part of SubmissionKey, we store it here again\nto make TransactionInfo self-contained.\nFor example, storing the key allows TransactionInfo to not relay on\nthe fact that TransactionInfo will be ordered in the same order as\nTransactionKeys in SubmissionKey." + }, + "transaction": { + "type": "string", + "format": "byte", + "title": "transaction is the full transaction in bytes" + }, + "proof": { + "type": "string", + "format": "byte", + "title": "proof is the Merkle proof that this tx is included in the position in `key`\nTODO: maybe it could use here better format as we already processed and\nvalidated the proof?" + } + }, + "title": "TransactionInfo is the info of a tx on Bitcoin,\nincluding\n- the position of the tx on BTC blockchain\n- the full tx content\n- the Merkle proof that this tx is on the above position" + }, + "babylon.btccheckpoint.v1.TransactionKey": { + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int64" + }, + "hash": { + "type": "string", + "format": "byte" + } + }, + "title": "Each provided OP_RETURN transaction can be identified by hash of block in\nwhich transaction was included and transaction index in the block" + }, + "babylon.checkpointing.v1.RawCheckpoint": { + "type": "object", + "properties": { + "epoch_num": { + "type": "string", + "format": "uint64", + "title": "epoch_num defines the epoch number the raw checkpoint is for" + }, + "block_hash": { + "type": "string", + "format": "byte", + "title": "block_hash defines the 'BlockID.Hash', which is the hash of\nthe block that individual BLS sigs are signed on" + }, + "bitmap": { + "type": "string", + "format": "byte", + "title": "bitmap defines the bitmap that indicates the signers of the BLS multi sig" + }, + "bls_multi_sig": { + "type": "string", + "format": "byte", + "title": "bls_multi_sig defines the multi sig that is aggregated from individual BLS\nsigs" + } + }, + "title": "RawCheckpoint wraps the BLS multi sig with metadata" + }, + "babylon.checkpointing.v1.ValidatorWithBlsKey": { + "type": "object", + "properties": { + "validator_address": { + "type": "string", + "title": "validator_address is the address of the validator" + }, + "bls_pub_key": { + "type": "string", + "format": "byte", + "title": "bls_pub_key is the BLS public key of the validator" + }, + "voting_power": { + "type": "string", + "format": "uint64", + "title": "voting_power is the voting power of the validator at the given epoch" + } + }, + "title": "ValidatorWithBlsKey couples validator address, voting power, and its bls\npublic key" + }, + "babylon.epoching.v1.Epoch": { + "type": "object", + "properties": { + "epoch_number": { + "type": "string", + "format": "uint64", + "title": "epoch_number is the number of this epoch" + }, + "current_epoch_interval": { + "type": "string", + "format": "uint64", + "title": "current_epoch_interval is the epoch interval at the time of this epoch" + }, + "first_block_height": { + "type": "string", + "format": "uint64", + "title": "first_block_height is the height of the first block in this epoch" + }, + "last_block_time": { + "type": "string", + "format": "date-time", + "description": "last_block_time is the time of the last block in this epoch.\nBabylon needs to remember the last header's time of each epoch to complete\nunbonding validators/delegations when a previous epoch's checkpoint is\nfinalised. The last_block_time field is nil in the epoch's beginning, and\nis set upon the end of this epoch." + }, + "sealer_app_hash": { + "type": "string", + "format": "byte", + "title": "sealer is the last block of the sealed epoch\nsealer_app_hash points to the sealer but stored in the 1st header\nof the next epoch" + }, + "sealer_block_hash": { + "type": "string", + "format": "byte", + "title": "sealer_block_hash is the hash of the sealer\nthe validator set has generated a BLS multisig on the hash,\ni.e., hash of the last block in the epoch" + } + }, + "title": "Epoch is a structure that contains the metadata of an epoch" + }, + "babylon.zoneconcierge.v1.ChainInfo": { + "type": "object", + "properties": { + "consumer_id": { + "type": "string", + "title": "consumer_id is the ID of the consumer" + }, + "latest_header": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.IndexedHeader", + "title": "latest_header is the latest header in CZ's canonical chain" + }, + "latest_forks": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.Forks", + "title": "latest_forks is the latest forks, formed as a series of IndexedHeader (from\nlow to high)" + }, + "timestamped_headers_count": { + "type": "string", + "format": "uint64", + "title": "timestamped_headers_count is the number of timestamped headers in CZ's\ncanonical chain" + } + }, + "title": "ChainInfo is the information of a CZ" + }, + "babylon.zoneconcierge.v1.FinalizedChainInfo": { + "type": "object", + "properties": { + "consumer_id": { + "type": "string", + "title": "consumer_id is the ID of the consumer" + }, + "finalized_chain_info": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.ChainInfo", + "title": "finalized_chain_info is the info of the CZ" + }, + "epoch_info": { + "$ref": "#/definitions/babylon.epoching.v1.Epoch", + "title": "epoch_info is the metadata of the last BTC-finalised epoch" + }, + "raw_checkpoint": { + "$ref": "#/definitions/babylon.checkpointing.v1.RawCheckpoint", + "title": "raw_checkpoint is the raw checkpoint of this epoch" + }, + "btc_submission_key": { + "$ref": "#/definitions/babylon.btccheckpoint.v1.SubmissionKey", + "title": "btc_submission_key is position of two BTC txs that include the raw\ncheckpoint of this epoch" + }, + "proof": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.ProofFinalizedChainInfo", + "title": "proof is the proof that the chain info is finalized" + } + }, + "title": "FinalizedChainInfo is the information of a CZ that is BTC-finalised" + }, + "babylon.zoneconcierge.v1.Forks": { + "type": "object", + "properties": { + "headers": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.IndexedHeader" + }, + "title": "blocks is the list of non-canonical indexed headers at the same height" + } + }, + "description": "Forks is a list of non-canonical `IndexedHeader`s at the same height.\nFor example, assuming the following blockchain\n```\nA \u003c- B \u003c- C \u003c- D \u003c- E\n \\ -- D1\n \\ -- D2\n```\nThen the fork will be {[D1, D2]} where each item is in struct `IndexedBlock`.\n\nNote that each `IndexedHeader` in the fork should have a valid quorum\ncertificate. Such forks exist since Babylon considers CZs might have\ndishonest majority. Also note that the IBC-Go implementation will only\nconsider the first header in a fork valid, since the subsequent headers\ncannot be verified without knowing the validator set in the previous header." + }, + "babylon.zoneconcierge.v1.IndexedHeader": { + "type": "object", + "properties": { + "consumer_id": { + "type": "string", + "title": "consumer_id is the unique ID of the consumer" + }, + "hash": { + "type": "string", + "format": "byte", + "title": "hash is the hash of this header" + }, + "height": { + "type": "string", + "format": "uint64", + "title": "height is the height of this header on CZ ledger\n(hash, height) jointly provides the position of the header on CZ ledger" + }, + "time": { + "type": "string", + "format": "date-time", + "title": "time is the timestamp of this header on CZ ledger\nit is needed for CZ to unbond all mature validators/delegations\nbefore this timestamp when this header is BTC-finalised" + }, + "babylon_header_hash": { + "type": "string", + "format": "byte", + "title": "babylon_header_hash is the hash of the babylon block that includes this CZ\nheader" + }, + "babylon_header_height": { + "type": "string", + "format": "uint64", + "title": "babylon_header_height is the height of the babylon block that includes this CZ\nheader" + }, + "babylon_epoch": { + "type": "string", + "format": "uint64", + "title": "epoch is the epoch number of this header on Babylon ledger" + }, + "babylon_tx_hash": { + "type": "string", + "format": "byte", + "title": "babylon_tx_hash is the hash of the tx that includes this header\n(babylon_block_height, babylon_tx_hash) jointly provides the position of\nthe header on Babylon ledger" + } + }, + "title": "IndexedHeader is the metadata of a CZ header" + }, + "babylon.zoneconcierge.v1.Params": { + "type": "object", + "properties": { + "ibc_packet_timeout_seconds": { + "type": "integer", + "format": "int64", + "title": "ibc_packet_timeout_seconds is the time period after which an unrelayed \nIBC packet becomes timeout, measured in seconds" + } + }, + "description": "Params defines the parameters for the module." + }, + "babylon.zoneconcierge.v1.ProofEpochSealed": { + "type": "object", + "properties": { + "validator_set": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.checkpointing.v1.ValidatorWithBlsKey" + }, + "title": "validator_set is the validator set of the sealed epoch\nThis validator set has generated a BLS multisig on `app_hash` of\nthe sealer header" + }, + "proof_epoch_info": { + "$ref": "#/definitions/tendermint.crypto.ProofOps", + "title": "proof_epoch_info is the Merkle proof that the epoch's metadata is committed\nto `app_hash` of the sealer header" + }, + "proof_epoch_val_set": { + "$ref": "#/definitions/tendermint.crypto.ProofOps", + "title": "proof_epoch_info is the Merkle proof that the epoch's validator set is\ncommitted to `app_hash` of the sealer header" + } + }, + "title": "ProofEpochSealed is the proof that an epoch is sealed by the sealer header,\ni.e., the 2nd header of the next epoch With the access of metadata\n- Metadata of this epoch, which includes the sealer header\n- Raw checkpoint of this epoch\nThe verifier can perform the following verification rules:\n- The raw checkpoint's `app_hash` is same as in the sealer header\n- More than 2/3 (in voting power) validators in the validator set of this\nepoch have signed `app_hash` of the sealer header\n- The epoch metadata is committed to the `app_hash` of the sealer header\n- The validator set is committed to the `app_hash` of the sealer header" + }, + "babylon.zoneconcierge.v1.ProofFinalizedChainInfo": { + "type": "object", + "properties": { + "proof_cz_header_in_epoch": { + "$ref": "#/definitions/tendermint.crypto.ProofOps", + "title": "proof_cz_header_in_epoch is the proof that the CZ header is timestamped\nwithin a certain epoch" + }, + "proof_epoch_sealed": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.ProofEpochSealed", + "title": "proof_epoch_sealed is the proof that the epoch is sealed" + }, + "proof_epoch_submitted": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.btccheckpoint.v1.TransactionInfo" + }, + "title": "proof_epoch_submitted is the proof that the epoch's checkpoint is included\nin BTC ledger It is the two TransactionInfo in the best (i.e., earliest)\ncheckpoint submission" + } + }, + "title": "ProofFinalizedChainInfo is a set of proofs that attest a chain info is\nBTC-finalised" + }, + "babylon.zoneconcierge.v1.QueryChainListResponse": { + "type": "object", + "properties": { + "consumer_ids": { + "type": "array", + "items": { + "type": "string" + }, + "title": "consumer_ids are IDs of the chains in ascending alphabetical order" + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "title": "pagination defines the pagination in the response" + } + }, + "title": "QueryChainListResponse is response type for the Query/ChainList RPC method" + }, + "babylon.zoneconcierge.v1.QueryChainsInfoResponse": { + "type": "object", + "properties": { + "chains_info": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.ChainInfo" + } + } + }, + "description": "QueryChainsInfoResponse is response type for the Query/ChainsInfo RPC method." + }, + "babylon.zoneconcierge.v1.QueryEpochChainsInfoResponse": { + "type": "object", + "properties": { + "chains_info": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.ChainInfo" + }, + "title": "chain_info is the info of the CZ" + } + }, + "description": "QueryEpochChainsInfoResponse is response type for the Query/EpochChainsInfo RPC\nmethod." + }, + "babylon.zoneconcierge.v1.QueryFinalizedChainInfoUntilHeightResponse": { + "type": "object", + "properties": { + "finalized_chain_info": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.ChainInfo", + "title": "finalized_chain_info is the info of the CZ" + }, + "epoch_info": { + "$ref": "#/definitions/babylon.epoching.v1.Epoch", + "title": "epoch_info is the metadata of the last BTC-finalised epoch" + }, + "raw_checkpoint": { + "$ref": "#/definitions/babylon.checkpointing.v1.RawCheckpoint", + "title": "raw_checkpoint is the raw checkpoint of this epoch" + }, + "btc_submission_key": { + "$ref": "#/definitions/babylon.btccheckpoint.v1.SubmissionKey", + "title": "btc_submission_key is position of two BTC txs that include the raw\ncheckpoint of this epoch" + }, + "proof": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.ProofFinalizedChainInfo", + "title": "proof is the proof that the chain info is finalized" + } + }, + "description": "QueryFinalizedChainInfoUntilHeightResponse is response type for the\nQuery/FinalizedChainInfoUntilHeight RPC method." + }, + "babylon.zoneconcierge.v1.QueryFinalizedChainsInfoResponse": { + "type": "object", + "properties": { + "finalized_chains_info": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.FinalizedChainInfo" + } + } + }, + "description": "QueryFinalizedChainsInfoResponse is response type for the\nQuery/FinalizedChainsInfo RPC method." + }, + "babylon.zoneconcierge.v1.QueryHeaderResponse": { + "type": "object", + "properties": { + "header": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.IndexedHeader" + }, + "fork_headers": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.Forks" + } + }, + "description": "QueryHeaderResponse is response type for the Query/Header RPC method." + }, + "babylon.zoneconcierge.v1.QueryListEpochHeadersResponse": { + "type": "object", + "properties": { + "headers": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.IndexedHeader" + }, + "title": "headers is the list of headers" + } + }, + "description": "QueryListEpochHeadersResponse is response type for the Query/ListEpochHeaders\nRPC method." + }, + "babylon.zoneconcierge.v1.QueryListHeadersResponse": { + "type": "object", + "properties": { + "headers": { + "type": "array", + "items": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.IndexedHeader" + }, + "title": "headers is the list of headers" + }, + "pagination": { + "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", + "title": "pagination defines the pagination in the response" + } + }, + "description": "QueryListHeadersResponse is response type for the Query/ListHeaders RPC\nmethod." + }, + "babylon.zoneconcierge.v1.QueryParamsResponse": { + "type": "object", + "properties": { + "params": { + "$ref": "#/definitions/babylon.zoneconcierge.v1.Params", + "description": "params holds all the parameters of this module." + } + }, + "description": "QueryParamsResponse is the response type for the Query/Params RPC method." + }, + "cosmos.base.query.v1beta1.PageRequest": { + "type": "object", + "properties": { + "key": { + "type": "string", + "format": "byte", + "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set." + }, + "offset": { + "type": "string", + "format": "uint64", + "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set." + }, + "limit": { + "type": "string", + "format": "uint64", + "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app." + }, + "count_total": { + "type": "boolean", + "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set." + }, + "reverse": { + "type": "boolean", + "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43" + } + }, + "description": "message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }", + "title": "PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:" + }, + "cosmos.base.query.v1beta1.PageResponse": { + "type": "object", + "properties": { + "next_key": { + "type": "string", + "format": "byte", + "description": "next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results." + }, + "total": { + "type": "string", + "format": "uint64", + "title": "total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise" + } + }, + "description": "PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }" + }, + "google.protobuf.Any": { + "type": "object", + "properties": { + "type_url": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + }, + "value": { + "type": "string", + "format": "byte", + "description": "Must be a valid serialized protocol buffer of the above specified type." + } + }, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "grpc.gateway.runtime.Error": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/google.protobuf.Any" + } + } + } + }, + "tendermint.crypto.ProofOp": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "key": { + "type": "string", + "format": "byte" + }, + "data": { + "type": "string", + "format": "byte" + } + }, + "title": "ProofOp defines an operation used for calculating Merkle root\nThe data could be arbitrary format, providing nessecary data\nfor example neighbouring node hash" + }, + "tendermint.crypto.ProofOps": { + "type": "object", + "properties": { + "ops": { + "type": "array", + "items": { + "$ref": "#/definitions/tendermint.crypto.ProofOp" + } + } + }, + "title": "ProofOps is Merkle proof defined by the list of ProofOps" + } + } +} diff --git a/x/btcstaking/keeper/btc_consumer_delegations.go b/x/btcstaking/keeper/btc_consumer_delegations.go index 107036f54..f6935b777 100644 --- a/x/btcstaking/keeper/btc_consumer_delegations.go +++ b/x/btcstaking/keeper/btc_consumer_delegations.go @@ -12,14 +12,10 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" ) -// IndexBTCConsumerDelegation indexes a BTC delegation into the BTC consumer delegator store +// indexBTCConsumerDelegation indexes a BTC delegation into the BTC consumer delegator store // CONTRACT: this function only takes BTC delegations that have passed verifications // imposed in `x/btcstaking/msg_server.go` -func (k Keeper) IndexBTCConsumerDelegation(ctx sdk.Context, btcDel *bstypes.BTCDelegation) error { - if err := btcDel.ValidateBasic(); err != nil { - return err - } - +func (k Keeper) indexBTCConsumerDelegation(ctx sdk.Context, btcDel *bstypes.BTCDelegation) error { // get staking tx hash stakingTxHash, err := btcDel.GetStakingTxHash() if err != nil { @@ -58,7 +54,6 @@ func (k Keeper) GetBTCConsumerDelegatorDelegationsResponses( ctx sdk.Context, fpBTCPK *bbn.BIP340PubKey, pagination *query.PageRequest, - wValue uint32, btcHeight uint32, covenantQuorum uint32, ) ([]*bstypes.BTCDelegatorDelegationsResponse, *query.PageResponse, error) { diff --git a/x/btcstaking/keeper/btc_delegations.go b/x/btcstaking/keeper/btc_delegations.go index 1657fc3f4..cc638d8ce 100644 --- a/x/btcstaking/keeper/btc_delegations.go +++ b/x/btcstaking/keeper/btc_delegations.go @@ -266,6 +266,7 @@ func (k Keeper) validateRestakedFPs(ctx context.Context, fpBTCPKs []bbn.BIP340Pu } // restakedFPConsumerIDs returns the unique consumer IDs of non-Babylon finality providers +// The returned list is sorted in order to make sure the function is deterministic func (k Keeper) restakedFPConsumerIDs(ctx context.Context, fpBTCPKs []bbn.BIP340PubKey) ([]string, error) { consumerIDMap := make(map[string]struct{}) diff --git a/x/btcstaking/keeper/btc_staking_consumer_events_test.go b/x/btcstaking/keeper/btc_staking_consumer_events_test.go index e3ed0afca..3f80358b7 100644 --- a/x/btcstaking/keeper/btc_staking_consumer_events_test.go +++ b/x/btcstaking/keeper/btc_staking_consumer_events_test.go @@ -18,6 +18,8 @@ func FuzzSetBTCStakingEventStore_NewFp(f *testing.F) { datagen.AddRandomSeedsToFuzzer(f, 10) f.Fuzz(func(t *testing.T, seed int64) { + t.Parallel() + r := rand.New(rand.NewSource(seed)) ctrl := gomock.NewController(t) defer ctrl.Finish() @@ -75,6 +77,8 @@ func FuzzSetBTCStakingEventStore_ActiveDel(f *testing.F) { datagen.AddRandomSeedsToFuzzer(f, 10) f.Fuzz(func(t *testing.T, seed int64) { + t.Parallel() + r := rand.New(rand.NewSource(seed)) ctrl := gomock.NewController(t) defer ctrl.Finish() @@ -169,6 +173,8 @@ func FuzzSetBTCStakingEventStore_UnbondedDel(f *testing.F) { datagen.AddRandomSeedsToFuzzer(f, 10) f.Fuzz(func(t *testing.T, seed int64) { + t.Parallel() + r := rand.New(rand.NewSource(seed)) ctrl := gomock.NewController(t) defer ctrl.Finish() @@ -270,6 +276,8 @@ func FuzzDeleteBTCStakingEventStore(f *testing.F) { datagen.AddRandomSeedsToFuzzer(f, 10) f.Fuzz(func(t *testing.T, seed int64) { + t.Parallel() + r := rand.New(rand.NewSource(seed)) ctrl := gomock.NewController(t) defer ctrl.Finish() diff --git a/x/btcstaking/keeper/finality_providers.go b/x/btcstaking/keeper/finality_providers.go index 6d8cb4657..8a7bc9a15 100644 --- a/x/btcstaking/keeper/finality_providers.go +++ b/x/btcstaking/keeper/finality_providers.go @@ -36,7 +36,7 @@ func (k Keeper) AddFinalityProvider(goCtx context.Context, msg *types.MsgCreateF // default consumer ID is Babylon's chain ID consumerID := msg.GetConsumerId() if consumerID == "" { - // canonical chain id + // Babylon chain ID consumerID = ctx.ChainID() } diff --git a/x/btcstaking/keeper/grpc_query.go b/x/btcstaking/keeper/grpc_query.go index 00d21eb0c..4ff647d2a 100644 --- a/x/btcstaking/keeper/grpc_query.go +++ b/x/btcstaking/keeper/grpc_query.go @@ -143,7 +143,6 @@ func (k Keeper) FinalityProviderDelegations(ctx context.Context, req *types.Quer } sdkCtx := sdk.UnwrapSDKContext(ctx) - currentWValue := k.btccKeeper.GetParams(ctx).CheckpointFinalizationTimeout btcHeight := k.btclcKeeper.GetTipInfo(ctx).Height covenantQuorum := k.GetParams(ctx).CovenantQuorum @@ -188,7 +187,7 @@ func (k Keeper) FinalityProviderDelegations(ctx context.Context, req *types.Quer case k.BscKeeper.HasConsumerFinalityProvider(ctx, fpPK): // this is a consumer finality provider - btcDels, pageRes, err = k.GetBTCConsumerDelegatorDelegationsResponses(sdkCtx, fpPK, req.Pagination, currentWValue, btcHeight, covenantQuorum) + btcDels, pageRes, err = k.GetBTCConsumerDelegatorDelegationsResponses(sdkCtx, fpPK, req.Pagination, btcHeight, covenantQuorum) if err != nil { return nil, err } diff --git a/x/btcstaking/keeper/msg_server.go b/x/btcstaking/keeper/msg_server.go index 138f1b91f..66ee20146 100644 --- a/x/btcstaking/keeper/msg_server.go +++ b/x/btcstaking/keeper/msg_server.go @@ -297,7 +297,7 @@ func (ms msgServer) CreateBTCDelegation(goCtx context.Context, req *types.MsgCre // if this BTC delegation is restaked to consumers' FPs, add it to btcstkconsumer indexes // TODO: revisit the relationship between BTC staking module and BTC staking consumer module if restakedToConsumers { - if err := ms.IndexBTCConsumerDelegation(ctx, newBTCDel); err != nil { + if err := ms.indexBTCConsumerDelegation(ctx, newBTCDel); err != nil { panic(fmt.Errorf("failed to add BTC delegation restaked to consumers' finality providers despite it has passed verification: %w", err)) } } diff --git a/x/btcstkconsumer/keeper/finality_provider_registry.go b/x/btcstkconsumer/keeper/finality_provider_registry.go index 7cb343f8c..a9635478e 100644 --- a/x/btcstkconsumer/keeper/finality_provider_registry.go +++ b/x/btcstkconsumer/keeper/finality_provider_registry.go @@ -5,7 +5,6 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" - errorsmod "cosmossdk.io/errors" "cosmossdk.io/store/prefix" bbn "github.com/babylonlabs-io/babylon/types" @@ -71,41 +70,6 @@ func (k Keeper) IterateFPs(ctx context.Context, chainId string, handler func(fp } } -// HasFPs checks if the FPs list exists for a given chain id -func (k Keeper) HasFPs(ctx context.Context, chainID string) bool { - store := k.finalityProviderStore(ctx, chainID) - iter := store.Iterator(nil, nil) - defer iter.Close() - return iter.Valid() -} - -// GetFPs gets the list of FPs, i.e., the finality provider set for a given chain id -func (k Keeper) GetFPs(ctx context.Context, chainID string) map[string]btcstaking.FinalityProvider { - store := k.finalityProviderStore(ctx, chainID) - iter := store.Iterator(nil, nil) - defer iter.Close() - - // if no finality provider for this chain id, return nil - if !iter.Valid() { - return nil - } - - // get all finality providers for this chain id - fpSet := map[string]btcstaking.FinalityProvider{} - for ; iter.Valid(); iter.Next() { - fpBTCPK, err := bbn.NewBIP340PubKey(iter.Key()) - if err != nil { - // failing to unmarshal finality provider BTC PK in KVStore is a programming error - panic(errorsmod.Wrapf(bbn.ErrUnmarshal, "Failed to unmarshall FP BTC PK %s: %v", iter.Key(), err)) - } - var fp btcstaking.FinalityProvider - k.cdc.MustUnmarshal(iter.Value(), &fp) - fpSet[fpBTCPK.MarshalHex()] = fp - } - - return fpSet -} - // finalityProviderStore returns the KVStore of the finality provider set per chain // prefix: ConsumerFinalityProviderKey || chain id // key: Bitcoin PubKey diff --git a/x/finality/types/tx.pb.go b/x/finality/types/tx.pb.go index 8726910b7..92757559d 100644 --- a/x/finality/types/tx.pb.go +++ b/x/finality/types/tx.pb.go @@ -766,7 +766,6 @@ type MsgClient interface { CommitPubRandList(ctx context.Context, in *MsgCommitPubRandList, opts ...grpc.CallOption) (*MsgCommitPubRandListResponse, error) // AddFinalitySig adds a finality signature to a given block AddFinalitySig(ctx context.Context, in *MsgAddFinalitySig, opts ...grpc.CallOption) (*MsgAddFinalitySigResponse, error) - // TODO: msg for evidence of equivocation. this is not specified yet // UpdateParams updates the finality module parameters. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) // UnjailFinalityProvider defines a method for unjailing a jailed @@ -847,7 +846,6 @@ type MsgServer interface { CommitPubRandList(context.Context, *MsgCommitPubRandList) (*MsgCommitPubRandListResponse, error) // AddFinalitySig adds a finality signature to a given block AddFinalitySig(context.Context, *MsgAddFinalitySig) (*MsgAddFinalitySigResponse, error) - // TODO: msg for evidence of equivocation. this is not specified yet // UpdateParams updates the finality module parameters. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) // UnjailFinalityProvider defines a method for unjailing a jailed From 1a0f10f4f7918a5b792a42dcc1b18c6b13c17d73 Mon Sep 17 00:00:00 2001 From: Runchao Han Date: Tue, 21 Jan 2025 11:03:29 +1100 Subject: [PATCH 2/4] rm tmp swaggeer files --- .../btccheckpoint/v1/query.swagger.json | 409 ------ .../btclightclient/v1/query.swagger.json | 506 -------- .../babylon/btcstaking/v1/query.swagger.json | 945 -------------- .../btcstkconsumer/v1/query.swagger.json | 593 --------- .../checkpointing/v1/query.swagger.json | 655 ---------- .../babylon/epoching/v1/query.swagger.json | 835 ------------ .../babylon/finality/v1/query.swagger.json | 1151 ----------------- .../babylon/incentive/query.swagger.json | 268 ---- .../babylon/mint/v1/query.swagger.json | 152 --- .../babylon/monitor/v1/query.swagger.json | 136 -- .../zoneconcierge/v1/query.swagger.json | 950 -------------- 11 files changed, 6600 deletions(-) delete mode 100644 tmp-swagger-gen/babylon/btccheckpoint/v1/query.swagger.json delete mode 100644 tmp-swagger-gen/babylon/btclightclient/v1/query.swagger.json delete mode 100644 tmp-swagger-gen/babylon/btcstaking/v1/query.swagger.json delete mode 100644 tmp-swagger-gen/babylon/btcstkconsumer/v1/query.swagger.json delete mode 100644 tmp-swagger-gen/babylon/checkpointing/v1/query.swagger.json delete mode 100644 tmp-swagger-gen/babylon/epoching/v1/query.swagger.json delete mode 100644 tmp-swagger-gen/babylon/finality/v1/query.swagger.json delete mode 100644 tmp-swagger-gen/babylon/incentive/query.swagger.json delete mode 100644 tmp-swagger-gen/babylon/mint/v1/query.swagger.json delete mode 100644 tmp-swagger-gen/babylon/monitor/v1/query.swagger.json delete mode 100644 tmp-swagger-gen/babylon/zoneconcierge/v1/query.swagger.json diff --git a/tmp-swagger-gen/babylon/btccheckpoint/v1/query.swagger.json b/tmp-swagger-gen/babylon/btccheckpoint/v1/query.swagger.json deleted file mode 100644 index 2c30a7fce..000000000 --- a/tmp-swagger-gen/babylon/btccheckpoint/v1/query.swagger.json +++ /dev/null @@ -1,409 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "babylon/btccheckpoint/v1/query.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/babylon/btccheckpoint/v1": { - "get": { - "summary": "BtcCheckpointsInfo returns checkpoint info for a range of epochs", - "operationId": "BtcCheckpointsInfo", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btccheckpoint.v1.QueryBtcCheckpointsInfoResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btccheckpoint/v1/params": { - "get": { - "summary": "Parameters queries the parameters of the module.", - "operationId": "Params", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btccheckpoint.v1.QueryParamsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "tags": [ - "Query" - ] - } - }, - "/babylon/btccheckpoint/v1/{epoch_num}": { - "get": { - "summary": "BtcCheckpointInfo returns checkpoint info for a given epoch", - "operationId": "BtcCheckpointInfo", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btccheckpoint.v1.QueryBtcCheckpointInfoResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "epoch_num", - "description": "Number of epoch for which the earliest checkpointing btc height is\nrequested", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btccheckpoint/v1/{epoch_num}/submissions": { - "get": { - "summary": "EpochSubmissions returns all submissions for a given epoch", - "operationId": "EpochSubmissions", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btccheckpoint.v1.QueryEpochSubmissionsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "epoch_num", - "description": "Number of epoch for which submissions are requested", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Query" - ] - } - } - }, - "definitions": { - "babylon.btccheckpoint.v1.BTCCheckpointInfoResponse": { - "type": "object", - "properties": { - "epoch_number": { - "type": "string", - "format": "uint64", - "description": "EpochNumber of this checkpoint." - }, - "best_submission_btc_block_height": { - "type": "integer", - "format": "int64", - "title": "btc height of the best submission of the epoch" - }, - "best_submission_btc_block_hash": { - "type": "string", - "title": "hash of the btc block which determines checkpoint btc block height i.e.\nyoungest block of best submission Hexadecimal" - }, - "best_submission_transactions": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.btccheckpoint.v1.TransactionInfoResponse" - }, - "title": "the BTC checkpoint transactions of the best submission" - }, - "best_submission_vigilante_address_list": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.btccheckpoint.v1.CheckpointAddressesResponse" - }, - "title": "list of vigilantes' addresses of the best submission" - } - }, - "description": "BTCCheckpointInfoResponse contains all data about best submission of checkpoint for\ngiven epoch. Best submission is the submission which is deeper in btc ledger." - }, - "babylon.btccheckpoint.v1.CheckpointAddressesResponse": { - "type": "object", - "properties": { - "submitter": { - "type": "string", - "description": "submitter is the address of the checkpoint submitter to BTC, extracted from\nthe checkpoint itself." - }, - "reporter": { - "type": "string", - "title": "reporter is the address of the reporter who reported the submissions,\ncalculated from submission message MsgInsertBTCSpvProof itself" - } - }, - "title": "CheckpointAddressesResponse contains the addresses of the submitter and reporter of a\ngiven checkpoint" - }, - "babylon.btccheckpoint.v1.Params": { - "type": "object", - "properties": { - "btc_confirmation_depth": { - "type": "integer", - "format": "int64", - "title": "btc_confirmation_depth is the confirmation depth in BTC.\nA block is considered irreversible only when it is at least k-deep in BTC\n(k in research paper)" - }, - "checkpoint_finalization_timeout": { - "type": "integer", - "format": "int64", - "title": "checkpoint_finalization_timeout is the maximum time window (measured in BTC\nblocks) between a checkpoint\n- being submitted to BTC, and\n- being reported back to BBN\nIf a checkpoint has not been reported back within w BTC blocks, then BBN\nhas dishonest majority and is stalling checkpoints (w in research paper)" - }, - "checkpoint_tag": { - "type": "string", - "title": "4byte tag in hex format, required to be present in the OP_RETURN transaction\nrelated to babylon" - } - }, - "description": "Params defines the parameters for the module." - }, - "babylon.btccheckpoint.v1.QueryBtcCheckpointInfoResponse": { - "type": "object", - "properties": { - "info": { - "$ref": "#/definitions/babylon.btccheckpoint.v1.BTCCheckpointInfoResponse" - } - }, - "title": "QueryBtcCheckpointInfoResponse is response type for the\nQuery/BtcCheckpointInfo RPC method" - }, - "babylon.btccheckpoint.v1.QueryBtcCheckpointsInfoResponse": { - "type": "object", - "properties": { - "info_list": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.btccheckpoint.v1.BTCCheckpointInfoResponse" - } - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "title": "pagination defines the pagination in the response" - } - }, - "title": "QueryBtcCheckpointsInfoResponse is response type for the\nQuery/BtcCheckpointsInfo RPC method" - }, - "babylon.btccheckpoint.v1.QueryEpochSubmissionsResponse": { - "type": "object", - "properties": { - "keys": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.btccheckpoint.v1.SubmissionKeyResponse" - }, - "description": "Keys All submissions transactions key saved during an epoch." - } - }, - "title": "QueryEpochSubmissionsResponse defines a response to get all submissions in\ngiven epoch (QueryEpochSubmissionsRequest)" - }, - "babylon.btccheckpoint.v1.QueryParamsResponse": { - "type": "object", - "properties": { - "params": { - "$ref": "#/definitions/babylon.btccheckpoint.v1.Params", - "description": "params holds all the parameters of this module." - } - }, - "description": "QueryParamsResponse is response type for the Query/Params RPC method." - }, - "babylon.btccheckpoint.v1.SubmissionKeyResponse": { - "type": "object", - "properties": { - "first_tx_block_hash": { - "type": "string", - "description": "FirstTxBlockHash is the BTCHeaderHashBytes in hex." - }, - "first_tx_index": { - "type": "integer", - "format": "int64" - }, - "second_tx_block_hash": { - "type": "string", - "description": "SecondBlockHash is the BTCHeaderHashBytes in hex." - }, - "second_tx_index": { - "type": "integer", - "format": "int64" - } - }, - "title": "SubmissionKeyResponse Checkpoint can be composed from multiple transactions,\nso to identify whole submission we need list of transaction keys.\nEach submission can generally be identified by this list of (txIdx,\nblockHash) tuples. Note: this could possibly be optimized as if transactions\nwere in one block they would have the same block hash and different indexes,\nbut each blockhash is only 33 (1 byte for prefix encoding and 32 byte hash),\nso there should be other strong arguments for this optimization" - }, - "babylon.btccheckpoint.v1.TransactionInfoResponse": { - "type": "object", - "properties": { - "index": { - "type": "integer", - "format": "int64", - "description": "Index Bitcoin Transaction index in block." - }, - "hash": { - "type": "string", - "description": "Hash BTC Header hash as hex." - }, - "transaction": { - "type": "string", - "description": "transaction is the full transaction data as str hex." - }, - "proof": { - "type": "string", - "title": "proof is the Merkle proof that this tx is included in the position in `key`" - } - }, - "title": "TransactionInfoResponse is the info of a tx on Bitcoin,\nincluding\n- the position of the tx on BTC blockchain\n- the full tx content\n- the Merkle proof that this tx is on the above position" - }, - "cosmos.base.query.v1beta1.PageRequest": { - "type": "object", - "properties": { - "key": { - "type": "string", - "format": "byte", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set." - }, - "offset": { - "type": "string", - "format": "uint64", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set." - }, - "limit": { - "type": "string", - "format": "uint64", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app." - }, - "count_total": { - "type": "boolean", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set." - }, - "reverse": { - "type": "boolean", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43" - } - }, - "description": "message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }", - "title": "PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:" - }, - "cosmos.base.query.v1beta1.PageResponse": { - "type": "object", - "properties": { - "next_key": { - "type": "string", - "format": "byte", - "description": "next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results." - }, - "total": { - "type": "string", - "format": "uint64", - "title": "total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise" - } - }, - "description": "PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }" - }, - "google.protobuf.Any": { - "type": "object", - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "grpc.gateway.runtime.Error": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/google.protobuf.Any" - } - } - } - } - } -} diff --git a/tmp-swagger-gen/babylon/btclightclient/v1/query.swagger.json b/tmp-swagger-gen/babylon/btclightclient/v1/query.swagger.json deleted file mode 100644 index 81a2263d3..000000000 --- a/tmp-swagger-gen/babylon/btclightclient/v1/query.swagger.json +++ /dev/null @@ -1,506 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "babylon/btclightclient/v1/query.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/babylon/btclightclient/v1/baseheader": { - "get": { - "summary": "BaseHeader returns the base BTC header of the chain. This header is defined\non genesis.", - "operationId": "BaseHeader", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btclightclient.v1.QueryBaseHeaderResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "tags": [ - "Query" - ] - } - }, - "/babylon/btclightclient/v1/contains": { - "get": { - "summary": "Contains checks whether a hash is maintained by the module.", - "operationId": "Contains", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btclightclient.v1.QueryContainsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "hash", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btclightclient/v1/containsBytes": { - "get": { - "summary": "ContainsBytes is a temporary method that\nchecks whether a hash is maintained by the module.\nSee discussion at https://github.com/babylonlabs-io/babylon/pull/132\nfor more details.", - "operationId": "ContainsBytes", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btclightclient.v1.QueryContainsBytesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "hash", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btclightclient/v1/depth/{hash}": { - "get": { - "summary": "HeaderDepth returns the depth of the header in main chain or error if the\nblock is not found or it exists on fork", - "operationId": "HeaderDepth", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btclightclient.v1.QueryHeaderDepthResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "hash", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btclightclient/v1/hashes": { - "get": { - "summary": "Hashes retrieves the hashes maintained by the module.", - "operationId": "Hashes", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btclightclient.v1.QueryHashesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btclightclient/v1/mainchain": { - "get": { - "summary": "MainChain returns the canonical chain", - "operationId": "MainChain", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btclightclient.v1.QueryMainChainResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btclightclient/v1/params": { - "get": { - "summary": "Params queries the parameters of the module.", - "operationId": "Params", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btclightclient.v1.QueryParamsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "tags": [ - "Query" - ] - } - }, - "/babylon/btclightclient/v1/tip": { - "get": { - "summary": "Tip return best header on canonical chain", - "operationId": "Tip", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btclightclient.v1.QueryTipResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "tags": [ - "Query" - ] - } - } - }, - "definitions": { - "babylon.btclightclient.v1.BTCHeaderInfoResponse": { - "type": "object", - "properties": { - "header_hex": { - "type": "string" - }, - "hash_hex": { - "type": "string" - }, - "height": { - "type": "integer", - "format": "int64" - }, - "work": { - "type": "string", - "description": "Work is the sdkmath.Uint as string." - } - }, - "description": "BTCHeaderInfoResponse is a structure that contains all relevant information about a\nBTC header response\n - Full header as string hex.\n - Header hash for easy retrieval as string hex.\n - Height of the header in the BTC chain.\n - Total work spent on the header. This is the sum of the work corresponding\n to the header Bits field\n and the total work of the header." - }, - "babylon.btclightclient.v1.Params": { - "type": "object", - "properties": { - "insert_headers_allow_list": { - "type": "array", - "items": { - "type": "string" - }, - "title": "List of addresses which are allowed to insert headers to btc light client\nif the list is empty, any address can insert headers" - } - }, - "description": "Params defines the parameters for the module." - }, - "babylon.btclightclient.v1.QueryBaseHeaderResponse": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/babylon.btclightclient.v1.BTCHeaderInfoResponse" - } - }, - "description": "QueryBaseHeaderResponse is the response type for the Query/BaseHeader RPC\nmethod." - }, - "babylon.btclightclient.v1.QueryContainsBytesResponse": { - "type": "object", - "properties": { - "contains": { - "type": "boolean" - } - }, - "description": "QueryContainsResponse is response type for the temporary Query/ContainsBytes\nRPC method." - }, - "babylon.btclightclient.v1.QueryContainsResponse": { - "type": "object", - "properties": { - "contains": { - "type": "boolean" - } - }, - "description": "QueryContainsResponse is response type for the Query/Contains RPC method." - }, - "babylon.btclightclient.v1.QueryHashesResponse": { - "type": "object", - "properties": { - "hashes": { - "type": "array", - "items": { - "type": "string", - "format": "byte" - } - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse" - } - }, - "description": "QueryHashesResponse is response type for the Query/Hashes RPC method." - }, - "babylon.btclightclient.v1.QueryHeaderDepthResponse": { - "type": "object", - "properties": { - "depth": { - "type": "integer", - "format": "int64" - } - }, - "title": "QueryMainChainDepthResponse is the response type for the Query/MainChainDepth RPC\nit contains depth of the block in main chain" - }, - "babylon.btclightclient.v1.QueryMainChainResponse": { - "type": "object", - "properties": { - "headers": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.btclightclient.v1.BTCHeaderInfoResponse" - } - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse" - } - }, - "description": "QueryMainChainResponse is response type for the Query/MainChain RPC method." - }, - "babylon.btclightclient.v1.QueryParamsResponse": { - "type": "object", - "properties": { - "params": { - "$ref": "#/definitions/babylon.btclightclient.v1.Params", - "description": "params holds all the parameters of this module." - } - }, - "description": "QueryParamsResponse is the response type for the Query/Params RPC method." - }, - "babylon.btclightclient.v1.QueryTipResponse": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/babylon.btclightclient.v1.BTCHeaderInfoResponse" - } - }, - "description": "QueryTipResponse is the response type for the Query/Tip RPC method." - }, - "cosmos.base.query.v1beta1.PageRequest": { - "type": "object", - "properties": { - "key": { - "type": "string", - "format": "byte", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set." - }, - "offset": { - "type": "string", - "format": "uint64", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set." - }, - "limit": { - "type": "string", - "format": "uint64", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app." - }, - "count_total": { - "type": "boolean", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set." - }, - "reverse": { - "type": "boolean", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43" - } - }, - "description": "message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }", - "title": "PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:" - }, - "cosmos.base.query.v1beta1.PageResponse": { - "type": "object", - "properties": { - "next_key": { - "type": "string", - "format": "byte", - "description": "next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results." - }, - "total": { - "type": "string", - "format": "uint64", - "title": "total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise" - } - }, - "description": "PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }" - }, - "google.protobuf.Any": { - "type": "object", - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "grpc.gateway.runtime.Error": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/google.protobuf.Any" - } - } - } - } - } -} diff --git a/tmp-swagger-gen/babylon/btcstaking/v1/query.swagger.json b/tmp-swagger-gen/babylon/btcstaking/v1/query.swagger.json deleted file mode 100644 index f347473e6..000000000 --- a/tmp-swagger-gen/babylon/btcstaking/v1/query.swagger.json +++ /dev/null @@ -1,945 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "babylon/btcstaking/v1/query.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/babylon/btcstaking/v1/btc_delegation/{staking_tx_hash_hex}": { - "get": { - "summary": "BTCDelegation retrieves delegation by corresponding staking tx hash", - "operationId": "BTCDelegation", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btcstaking.v1.QueryBTCDelegationResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "staking_tx_hash_hex", - "description": "Hash of staking transaction in btc format", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btcstaking/v1/btc_delegations/{status}": { - "get": { - "summary": "BTCDelegations queries all BTC delegations under a given status", - "operationId": "BTCDelegations", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btcstaking.v1.QueryBTCDelegationsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "status", - "description": "status is the queried status for BTC delegations", - "in": "path", - "required": true, - "type": "string", - "enum": [ - "PENDING", - "VERIFIED", - "ACTIVE", - "UNBONDED", - "EXPIRED", - "ANY" - ] - }, - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btcstaking/v1/finality_providers": { - "get": { - "summary": "FinalityProviders queries all finality providers", - "operationId": "FinalityProviders", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btcstaking.v1.QueryFinalityProvidersResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btcstaking/v1/finality_providers/{fp_btc_pk_hex}/delegations": { - "get": { - "summary": "FinalityProviderDelegations queries all BTC delegations of the given finality provider", - "operationId": "FinalityProviderDelegations", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btcstaking.v1.QueryFinalityProviderDelegationsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "fp_btc_pk_hex", - "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality providerthat\nthis BTC delegation delegates to\nthe PK follows encoding in BIP-340 spec", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btcstaking/v1/finality_providers/{fp_btc_pk_hex}/finality_provider": { - "get": { - "summary": "FinalityProvider info about one finality provider", - "operationId": "FinalityProvider", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btcstaking.v1.QueryFinalityProviderResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "fp_btc_pk_hex", - "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality provider", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btcstaking/v1/params": { - "get": { - "summary": "Parameters queries the parameters of the module.", - "operationId": "Params", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btcstaking.v1.QueryParamsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "tags": [ - "Query" - ] - } - }, - "/babylon/btcstaking/v1/params/btc_height/{btc_height}": { - "get": { - "summary": "ParamsByBTCHeight queries the parameters of the module for a specific BTC height", - "operationId": "ParamsByBTCHeight", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btcstaking.v1.QueryParamsByBTCHeightResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "btc_height", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btcstaking/v1/params/{version}": { - "get": { - "summary": "ParamsByVersion queries the parameters of the module for a specific version of past params.", - "operationId": "ParamsByVersion", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btcstaking.v1.QueryParamsByVersionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "version", - "in": "path", - "required": true, - "type": "integer", - "format": "int64" - } - ], - "tags": [ - "Query" - ] - } - } - }, - "definitions": { - "babylon.btcstaking.v1.BTCDelegationResponse": { - "type": "object", - "properties": { - "staker_addr": { - "type": "string", - "description": "staker_addr is the address to receive rewards from BTC delegation." - }, - "btc_pk": { - "type": "string", - "format": "byte", - "title": "btc_pk is the Bitcoin secp256k1 PK of this BTC delegation\nthe PK follows encoding in BIP-340 spec" - }, - "fp_btc_pk_list": { - "type": "array", - "items": { - "type": "string", - "format": "byte" - }, - "title": "fp_btc_pk_list is the list of BIP-340 PKs of the finality providers that\nthis BTC delegation delegates to" - }, - "staking_time": { - "type": "integer", - "format": "int64", - "title": "staking_time is the number of blocks for which the delegation is locked on BTC chain" - }, - "start_height": { - "type": "integer", - "format": "int64", - "title": "start_height is the start BTC height of the BTC delegation\nit is the start BTC height of the timelock" - }, - "end_height": { - "type": "integer", - "format": "int64", - "title": "end_height is the end height of the BTC delegation\nit is the end BTC height of the timelock - w" - }, - "total_sat": { - "type": "string", - "format": "uint64", - "title": "total_sat is the total amount of BTC stakes in this delegation\nquantified in satoshi" - }, - "staking_tx_hex": { - "type": "string", - "title": "staking_tx_hex is the hex string of staking tx" - }, - "slashing_tx_hex": { - "type": "string", - "title": "slashing_tx_hex is the hex string of slashing tx" - }, - "delegator_slash_sig_hex": { - "type": "string", - "description": "delegator_slash_sig_hex is the signature on the slashing tx\nby the delegator (i.e., SK corresponding to btc_pk) as string hex.\nIt will be a part of the witness for the staking tx output." - }, - "covenant_sigs": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.btcstaking.v1.CovenantAdaptorSignatures" - }, - "description": "covenant_sigs is a list of adaptor signatures on the slashing tx\nby each covenant member\nIt will be a part of the witness for the staking tx output." - }, - "staking_output_idx": { - "type": "integer", - "format": "int64", - "title": "staking_output_idx is the index of the staking output in the staking tx" - }, - "active": { - "type": "boolean", - "title": "whether this delegation is active" - }, - "status_desc": { - "type": "string", - "description": "descriptive status of current delegation." - }, - "unbonding_time": { - "type": "integer", - "format": "int64", - "title": "unbonding_time used in unbonding output timelock path and in slashing transactions\nchange outputs" - }, - "undelegation_response": { - "$ref": "#/definitions/babylon.btcstaking.v1.BTCUndelegationResponse", - "description": "undelegation_response is the undelegation info of this delegation." - }, - "params_version": { - "type": "integer", - "format": "int64", - "title": "params version used to validate delegation" - } - }, - "description": "BTCDelegationResponse is the client needed information from a BTCDelegation with the current status based on parameters." - }, - "babylon.btcstaking.v1.BTCDelegationStatus": { - "type": "string", - "enum": [ - "PENDING", - "VERIFIED", - "ACTIVE", - "UNBONDED", - "EXPIRED", - "ANY" - ], - "default": "PENDING", - "description": "BTCDelegationStatus is the status of a delegation.\nThere are two possible valid state transition paths for a BTC delegation:\n- PENDING -\u003e VERIFIED -\u003e ACTIVE -\u003e UNBONDED -\u003e EXPIRED\n- PENDING -\u003e VERIFIED -\u003e ACTIVE -\u003e UNBONDED/EXPIRED\nand one invalid state transition path:\n- PENDING -\u003e VERIFIED -\u003e UNBONDED i.e the staker unbonded before\nactivating delegation on Babylon chain.\nIn valid transition paths, the delegation becomes UNBONDED when:\n- either the staking transaction timelock expires\n- or the staker requests early undelegation through MsgBTCUndelegate message.\n\n - PENDING: PENDING defines a delegation that is waiting for covenant signatures.\n - VERIFIED: VERIFIED defines a delegation that has covenant signatures but is not yet\nincluded in the BTC chain.\n - ACTIVE: ACTIVE defines a delegation that has voting power\n - UNBONDED: UNBONDED defines a delegation no longer has voting power\nby receiving unbonding tx with signatures from staker and covenant committee\n - EXPIRED: EXPIRED defines a delegation no longer has voting power\nfor reaching the end of staking transaction timelock\n - ANY: ANY is any of the above status" - }, - "babylon.btcstaking.v1.BTCDelegatorDelegationsResponse": { - "type": "object", - "properties": { - "dels": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.btcstaking.v1.BTCDelegationResponse" - } - } - }, - "description": "BTCDelegatorDelegationsResponse is a collection of BTC delegations responses from the same delegator." - }, - "babylon.btcstaking.v1.BTCSigType": { - "type": "string", - "enum": [ - "BIP340", - "BIP322", - "ECDSA" - ], - "default": "BIP340", - "description": "- BIP340: BIP340 means the btc_sig will follow the BIP-340 encoding\n - BIP322: BIP322 means the btc_sig will follow the BIP-322 encoding\n - ECDSA: ECDSA means the btc_sig will follow the ECDSA encoding\nref: https://github.com/okx/js-wallet-sdk/blob/a57c2acbe6ce917c0aa4e951d96c4e562ad58444/packages/coin-bitcoin/src/BtcWallet.ts#L331", - "title": "BTCSigType indicates the type of btc_sig in a pop" - }, - "babylon.btcstaking.v1.BTCUndelegationResponse": { - "type": "object", - "properties": { - "unbonding_tx_hex": { - "type": "string", - "description": "unbonding_tx is the transaction which will transfer the funds from staking\noutput to unbonding output. Unbonding output will usually have lower timelock\nthan staking output. The unbonding tx as string hex." - }, - "covenant_unbonding_sig_list": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.btcstaking.v1.SignatureInfo" - }, - "title": "covenant_unbonding_sig_list is the list of signatures on the unbonding tx\nby covenant members" - }, - "slashing_tx_hex": { - "type": "string", - "title": "slashingTxHex is the hex string of slashing tx" - }, - "delegator_slashing_sig_hex": { - "type": "string", - "description": "delegator_slashing_sig is the signature on the slashing tx\nby the delegator (i.e., SK corresponding to btc_pk).\nIt will be a part of the witness for the unbonding tx output.\nThe delegator slashing sig as string hex." - }, - "covenant_slashing_sigs": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.btcstaking.v1.CovenantAdaptorSignatures" - }, - "description": "covenant_slashing_sigs is a list of adaptor signatures on the\nunbonding slashing tx by each covenant member\nIt will be a part of the witness for the staking tx output." - }, - "delegator_unbonding_info_response": { - "$ref": "#/definitions/babylon.btcstaking.v1.DelegatorUnbondingInfoResponse", - "title": "btc_undelegation_info contains all necessary info about the transaction\nwhich spent the staking output" - } - }, - "title": "BTCUndelegationResponse provides all necessary info about the undeleagation" - }, - "babylon.btcstaking.v1.CovenantAdaptorSignatures": { - "type": "object", - "properties": { - "cov_pk": { - "type": "string", - "format": "byte", - "title": "cov_pk is the public key of the covenant emulator, used as the public key of the adaptor signature" - }, - "adaptor_sigs": { - "type": "array", - "items": { - "type": "string", - "format": "byte" - }, - "title": "adaptor_sigs is a list of adaptor signatures, each encrypted by a restaked BTC finality provider's public key" - } - }, - "title": "CovenantAdaptorSignatures is a list adaptor signatures signed by the\ncovenant with different finality provider's public keys as encryption keys" - }, - "babylon.btcstaking.v1.DelegatorUnbondingInfoResponse": { - "type": "object", - "properties": { - "spend_stake_tx_hex": { - "type": "string", - "title": "spend_stake_tx_hex is the transaction which spent the staking output. It is\nfilled only if the spend_stake_tx_hex is different than the unbonding_tx_hex" - } - }, - "title": "DelegatorUnbondingInfoResponse provides all necessary info about transaction\nwhich spent the staking output" - }, - "babylon.btcstaking.v1.FinalityProviderResponse": { - "type": "object", - "properties": { - "description": { - "$ref": "#/definitions/cosmos.staking.v1beta1.Description", - "description": "description defines the description terms for the finality provider." - }, - "commission": { - "type": "string", - "description": "commission defines the commission rate of the finality provider." - }, - "addr": { - "type": "string", - "description": "addr is the address to receive commission from delegations." - }, - "btc_pk": { - "type": "string", - "format": "byte", - "title": "btc_pk is the Bitcoin secp256k1 PK of this finality provider\nthe PK follows encoding in BIP-340 spec" - }, - "pop": { - "$ref": "#/definitions/babylon.btcstaking.v1.ProofOfPossessionBTC", - "description": "pop is the proof of possession of the BTC_PK by the fp addr.\nEssentially is the signature where the BTC SK sigs the fp addr." - }, - "slashed_babylon_height": { - "type": "string", - "format": "uint64", - "title": "slashed_babylon_height indicates the Babylon height when\nthe finality provider is slashed.\nif it's 0 then the finality provider is not slashed" - }, - "slashed_btc_height": { - "type": "integer", - "format": "int64", - "title": "slashed_btc_height indicates the BTC height when\nthe finality provider is slashed.\nif it's 0 then the finality provider is not slashed" - }, - "height": { - "type": "string", - "format": "uint64", - "title": "height is the queried Babylon height" - }, - "jailed": { - "type": "boolean", - "title": "jailed defines whether the finality provider is jailed" - }, - "highest_voted_height": { - "type": "integer", - "format": "int64", - "title": "highest_voted_height is the highest height for which the\nfinality provider has voted" - } - }, - "description": "FinalityProviderResponse defines a finality provider with voting power information." - }, - "babylon.btcstaking.v1.Params": { - "type": "object", - "properties": { - "covenant_pks": { - "type": "array", - "items": { - "type": "string", - "format": "byte" - }, - "title": "PARAMETERS COVERING STAKING\ncovenant_pks is the list of public keys held by the covenant committee\neach PK follows encoding in BIP-340 spec on Bitcoin" - }, - "covenant_quorum": { - "type": "integer", - "format": "int64", - "title": "covenant_quorum is the minimum number of signatures needed for the covenant\nmultisignature" - }, - "min_staking_value_sat": { - "type": "string", - "format": "int64", - "title": "min_staking_value_sat is the minimum of satoshis locked in staking output" - }, - "max_staking_value_sat": { - "type": "string", - "format": "int64", - "title": "max_staking_value_sat is the maximum of satoshis locked in staking output" - }, - "min_staking_time_blocks": { - "type": "integer", - "format": "int64", - "title": "min_staking_time is the minimum lock time specified in staking output script" - }, - "max_staking_time_blocks": { - "type": "integer", - "format": "int64", - "title": "max_staking_time_blocks is the maximum lock time time specified in staking output script" - }, - "slashing_pk_script": { - "type": "string", - "format": "byte", - "title": "PARAMETERS COVERING SLASHING\nslashing_pk_script is the pk_script expected in slashing output ie. the first\noutput of slashing transaction" - }, - "min_slashing_tx_fee_sat": { - "type": "string", - "format": "int64", - "title": "min_slashing_tx_fee_sat is the minimum amount of tx fee (quantified\nin Satoshi) needed for the pre-signed slashing tx. It covers both:\nstaking slashing transaction and unbonding slashing transaction" - }, - "slashing_rate": { - "type": "string", - "title": "slashing_rate determines the portion of the staked amount to be slashed,\nexpressed as a decimal (e.g., 0.5 for 50%). Maximal precion is 2 decimal\nplaces" - }, - "unbonding_time_blocks": { - "type": "integer", - "format": "int64", - "title": "PARAMETERS COVERING UNBONDING\nunbonding_time is the exact unbonding time required from unbonding transaction\nit must be larger than `checkpoint_finalization_timeout` from `btccheckpoint` module" - }, - "unbonding_fee_sat": { - "type": "string", - "format": "int64", - "title": "unbonding_fee exact fee required for unbonding transaction" - }, - "min_commission_rate": { - "type": "string", - "title": "PARAMETERS COVERING FINALITY PROVIDERS\nmin_commission_rate is the chain-wide minimum commission rate that a finality provider\ncan charge their delegators expressed as a decimal (e.g., 0.5 for 50%). Maximal precion\nis 2 decimal places" - }, - "delegation_creation_base_gas_fee": { - "type": "string", - "format": "uint64", - "title": "base gas fee for delegation creation" - }, - "allow_list_expiration_height": { - "type": "string", - "format": "uint64", - "title": "allow_list_expiration_height is the height at which the allow list expires\ni.e all staking transactions are allowed to enter Babylon chain afterwards\nsetting it to 0 means allow list is disabled" - }, - "btc_activation_height": { - "type": "integer", - "format": "int64", - "title": "btc_activation_height is the btc height from which parameters are activated (inclusive)" - } - }, - "description": "Params defines the parameters for the module." - }, - "babylon.btcstaking.v1.ProofOfPossessionBTC": { - "type": "object", - "properties": { - "btc_sig_type": { - "$ref": "#/definitions/babylon.btcstaking.v1.BTCSigType", - "title": "btc_sig_type indicates the type of btc_sig in the pop" - }, - "btc_sig": { - "type": "string", - "format": "byte", - "title": "btc_sig is the signature generated via sign(sk_btc, babylon_staker_address)\nthe signature follows encoding in either BIP-340 spec or BIP-322 spec" - } - }, - "title": "ProofOfPossessionBTC is the proof of possession that a Babylon\naddress and a Bitcoin secp256k1 secret key are held by the same\nperson" - }, - "babylon.btcstaking.v1.QueryBTCDelegationResponse": { - "type": "object", - "properties": { - "btc_delegation": { - "$ref": "#/definitions/babylon.btcstaking.v1.BTCDelegationResponse", - "description": "BTCDelegation represents the client needed information of an BTCDelegation." - } - }, - "title": "QueryBTCDelegationResponse is response type matching QueryBTCDelegationRequest\nand containing BTC delegation information" - }, - "babylon.btcstaking.v1.QueryBTCDelegationsResponse": { - "type": "object", - "properties": { - "btc_delegations": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.btcstaking.v1.BTCDelegationResponse" - }, - "title": "btc_delegations contains all the queried BTC delegations under the given status" - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "description": "pagination defines the pagination in the response." - } - }, - "description": "QueryBTCDelegationsResponse is the response type for the\nQuery/BTCDelegations RPC method." - }, - "babylon.btcstaking.v1.QueryFinalityProviderDelegationsResponse": { - "type": "object", - "properties": { - "btc_delegator_delegations": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.btcstaking.v1.BTCDelegatorDelegationsResponse" - }, - "description": "btc_delegator_delegations contains all the queried BTC delegations." - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "description": "pagination defines the pagination in the response." - } - }, - "description": "QueryFinalityProviderDelegationsResponse is the response type for the\nQuery/FinalityProviderDelegations RPC method." - }, - "babylon.btcstaking.v1.QueryFinalityProviderResponse": { - "type": "object", - "properties": { - "finality_provider": { - "$ref": "#/definitions/babylon.btcstaking.v1.FinalityProviderResponse", - "title": "finality_provider contains the FinalityProvider" - } - }, - "title": "QueryFinalityProviderResponse contains information about a finality provider" - }, - "babylon.btcstaking.v1.QueryFinalityProvidersResponse": { - "type": "object", - "properties": { - "finality_providers": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.btcstaking.v1.FinalityProviderResponse" - }, - "title": "finality_providers contains all the finality providers" - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "description": "pagination defines the pagination in the response." - } - }, - "description": "QueryFinalityProvidersResponse is the response type for the\nQuery/FinalityProviders RPC method." - }, - "babylon.btcstaking.v1.QueryParamsByBTCHeightResponse": { - "type": "object", - "properties": { - "params": { - "$ref": "#/definitions/babylon.btcstaking.v1.Params", - "description": "params holds all the parameters of this module." - }, - "version": { - "type": "integer", - "format": "int64", - "title": "version is the version of the params for the given BTC height" - } - }, - "description": "QueryParamsByBTCHeightResponse is response type for the Query/QueryParamsByBTCHeightResponse RPC method." - }, - "babylon.btcstaking.v1.QueryParamsByVersionResponse": { - "type": "object", - "properties": { - "params": { - "$ref": "#/definitions/babylon.btcstaking.v1.Params", - "description": "params holds all the parameters of this module." - } - }, - "description": "QueryParamsResponse is response type for the Query/Params RPC method." - }, - "babylon.btcstaking.v1.QueryParamsResponse": { - "type": "object", - "properties": { - "params": { - "$ref": "#/definitions/babylon.btcstaking.v1.Params", - "description": "params holds all the parameters of this module." - } - }, - "description": "QueryParamsResponse is response type for the Query/Params RPC method." - }, - "babylon.btcstaking.v1.SignatureInfo": { - "type": "object", - "properties": { - "pk": { - "type": "string", - "format": "byte" - }, - "sig": { - "type": "string", - "format": "byte" - } - }, - "title": "SignatureInfo is a BIP-340 signature together with its signer's BIP-340 PK" - }, - "cosmos.base.query.v1beta1.PageRequest": { - "type": "object", - "properties": { - "key": { - "type": "string", - "format": "byte", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set." - }, - "offset": { - "type": "string", - "format": "uint64", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set." - }, - "limit": { - "type": "string", - "format": "uint64", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app." - }, - "count_total": { - "type": "boolean", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set." - }, - "reverse": { - "type": "boolean", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43" - } - }, - "description": "message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }", - "title": "PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:" - }, - "cosmos.base.query.v1beta1.PageResponse": { - "type": "object", - "properties": { - "next_key": { - "type": "string", - "format": "byte", - "description": "next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results." - }, - "total": { - "type": "string", - "format": "uint64", - "title": "total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise" - } - }, - "description": "PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }" - }, - "cosmos.staking.v1beta1.Description": { - "type": "object", - "properties": { - "moniker": { - "type": "string", - "description": "moniker defines a human-readable name for the validator." - }, - "identity": { - "type": "string", - "description": "identity defines an optional identity signature (ex. UPort or Keybase)." - }, - "website": { - "type": "string", - "description": "website defines an optional website link." - }, - "security_contact": { - "type": "string", - "description": "security_contact defines an optional email for security contact." - }, - "details": { - "type": "string", - "description": "details define other optional details." - } - }, - "description": "Description defines a validator description." - }, - "google.protobuf.Any": { - "type": "object", - "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "grpc.gateway.runtime.Error": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/google.protobuf.Any" - } - } - } - } - } -} diff --git a/tmp-swagger-gen/babylon/btcstkconsumer/v1/query.swagger.json b/tmp-swagger-gen/babylon/btcstkconsumer/v1/query.swagger.json deleted file mode 100644 index 629a7bde7..000000000 --- a/tmp-swagger-gen/babylon/btcstkconsumer/v1/query.swagger.json +++ /dev/null @@ -1,593 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "babylon/btcstkconsumer/v1/query.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/babylon/btcstkconsumer/v1/consumer_registry_list": { - "get": { - "summary": "ConsumerRegistryList queries the list of consumers that are registered to Babylon", - "operationId": "ConsumerRegistryList", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btcstkconsumer.v1.QueryConsumerRegistryListResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btcstkconsumer/v1/consumers_registry/{consumer_ids}": { - "get": { - "summary": "ConsumersRegistry queries the latest info for a given list of consumers in Babylon's view", - "operationId": "ConsumersRegistry", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btcstkconsumer.v1.QueryConsumersRegistryResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "consumer_ids", - "in": "path", - "required": true, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "csv", - "minItems": 1 - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btcstkconsumer/v1/finality_provider/{consumer_id}/{fp_btc_pk_hex}": { - "get": { - "summary": "FinalityProvider info about one finality provider", - "operationId": "FinalityProvider", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btcstkconsumer.v1.QueryFinalityProviderResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "consumer_id", - "description": "consumer id is the consumer id this finality provider is registered to", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "fp_btc_pk_hex", - "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality provider", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btcstkconsumer/v1/finality_provider_consumer/{fp_btc_pk_hex}": { - "get": { - "summary": "FinalityProviderConsumer info about one finality provider's consumer id", - "operationId": "FinalityProviderConsumer", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btcstkconsumer.v1.QueryFinalityProviderConsumerResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "fp_btc_pk_hex", - "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality provider", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btcstkconsumer/v1/finality_providers/{consumer_id}": { - "get": { - "summary": "FinalityProviders queries all finality providers for a given consumer", - "operationId": "FinalityProviders", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btcstkconsumer.v1.QueryFinalityProvidersResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "consumer_id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/btcstkconsumer/v1/params": { - "get": { - "summary": "Parameters queries the parameters of the module.", - "operationId": "Params", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.btcstkconsumer.v1.QueryParamsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "tags": [ - "Query" - ] - } - } - }, - "definitions": { - "babylon.btcstaking.v1.BTCSigType": { - "type": "string", - "enum": [ - "BIP340", - "BIP322", - "ECDSA" - ], - "default": "BIP340", - "description": "- BIP340: BIP340 means the btc_sig will follow the BIP-340 encoding\n - BIP322: BIP322 means the btc_sig will follow the BIP-322 encoding\n - ECDSA: ECDSA means the btc_sig will follow the ECDSA encoding\nref: https://github.com/okx/js-wallet-sdk/blob/a57c2acbe6ce917c0aa4e951d96c4e562ad58444/packages/coin-bitcoin/src/BtcWallet.ts#L331", - "title": "BTCSigType indicates the type of btc_sig in a pop" - }, - "babylon.btcstaking.v1.ProofOfPossessionBTC": { - "type": "object", - "properties": { - "btc_sig_type": { - "$ref": "#/definitions/babylon.btcstaking.v1.BTCSigType", - "title": "btc_sig_type indicates the type of btc_sig in the pop" - }, - "btc_sig": { - "type": "string", - "format": "byte", - "title": "btc_sig is the signature generated via sign(sk_btc, babylon_staker_address)\nthe signature follows encoding in either BIP-340 spec or BIP-322 spec" - } - }, - "title": "ProofOfPossessionBTC is the proof of possession that a Babylon\naddress and a Bitcoin secp256k1 secret key are held by the same\nperson" - }, - "babylon.btcstkconsumer.v1.ConsumerRegister": { - "type": "object", - "properties": { - "consumer_id": { - "type": "string", - "title": "consumer_id is the ID of the consumer\n- for Cosmos SDK chains, the consumer ID will be the IBC client ID\n- for ETH L2 chains, the consumer ID will be the chain ID of the ETH L2\n chain" - }, - "consumer_name": { - "type": "string", - "title": "consumer_name is the name of the consumer" - }, - "consumer_description": { - "type": "string", - "title": "consumer_description is a description for the consumer (can be empty)" - }, - "cosmos_consumer_metadata": { - "$ref": "#/definitions/babylon.btcstkconsumer.v1.CosmosConsumerMetadata" - }, - "eth_l2_consumer_metadata": { - "$ref": "#/definitions/babylon.btcstkconsumer.v1.ETHL2ConsumerMetadata" - } - }, - "title": "ConsumerRegister is the registration information of a consumer" - }, - "babylon.btcstkconsumer.v1.CosmosConsumerMetadata": { - "type": "object", - "properties": { - "channel_id": { - "type": "string", - "title": "channel_id defines the IBC channel ID for the consumer chain" - } - }, - "title": "CosmosConsumerMetadata is the metadata for the Cosmos integration" - }, - "babylon.btcstkconsumer.v1.ETHL2ConsumerMetadata": { - "type": "object", - "properties": { - "finality_contract_address": { - "type": "string", - "title": "finality_contract_address is the address of the finality contract for\nthe ETH L2 integration" - } - }, - "title": "ETHL2ConsumerMetadata is the metadata for the ETH L2 integration" - }, - "babylon.btcstkconsumer.v1.FinalityProviderResponse": { - "type": "object", - "properties": { - "description": { - "$ref": "#/definitions/cosmos.staking.v1beta1.Description", - "description": "description defines the description terms for the finality provider." - }, - "commission": { - "type": "string", - "description": "commission defines the commission rate of the finality provider." - }, - "addr": { - "type": "string", - "title": "babylon_pk is the Babylon secp256k1 PK of this finality provider" - }, - "btc_pk": { - "type": "string", - "format": "byte", - "title": "btc_pk is the Bitcoin secp256k1 PK of this finality provider\nthe PK follows encoding in BIP-340 spec" - }, - "pop": { - "$ref": "#/definitions/babylon.btcstaking.v1.ProofOfPossessionBTC", - "title": "pop is the proof of possession of babylon_pk and btc_pk" - }, - "slashed_babylon_height": { - "type": "string", - "format": "uint64", - "title": "slashed_babylon_height indicates the Babylon height when\nthe finality provider is slashed.\nif it's 0 then the finality provider is not slashed" - }, - "slashed_btc_height": { - "type": "integer", - "format": "int64", - "title": "slashed_btc_height indicates the BTC height when\nthe finality provider is slashed.\nif it's 0 then the finality provider is not slashed" - }, - "height": { - "type": "string", - "format": "uint64", - "title": "height is the queried Babylon height" - }, - "voting_power": { - "type": "string", - "format": "uint64", - "title": "voting_power is the voting power of this finality provider at the given height" - }, - "consumer_id": { - "type": "string", - "title": "consumer_id is the consumer id this finality provider is registered to" - } - }, - "description": "FinalityProviderResponse defines a finality provider with voting power information." - }, - "babylon.btcstkconsumer.v1.Params": { - "type": "object", - "properties": { - "permissioned_integration": { - "type": "boolean", - "description": "permissioned_integration is a flag to enable permissioned integration, i.e.,\nrequiring governance proposal to approve new integrations." - } - }, - "description": "Params defines the parameters for the module." - }, - "babylon.btcstkconsumer.v1.QueryConsumerRegistryListResponse": { - "type": "object", - "properties": { - "consumer_ids": { - "type": "array", - "items": { - "type": "string" - }, - "title": "consumer_ids are IDs of the consumers in ascending alphabetical order" - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "title": "pagination defines the pagination in the response" - } - }, - "title": "QueryConsumerRegistryListResponse is response type for the Query/ConsumerRegistryList RPC method" - }, - "babylon.btcstkconsumer.v1.QueryConsumersRegistryResponse": { - "type": "object", - "properties": { - "consumers_register": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.btcstkconsumer.v1.ConsumerRegister" - } - } - }, - "description": "QueryConsumersRegistryResponse is response type for the Query/ConsumersRegistry RPC method." - }, - "babylon.btcstkconsumer.v1.QueryFinalityProviderConsumerResponse": { - "type": "object", - "properties": { - "consumer_id": { - "type": "string" - } - }, - "title": "QueryFinalityProviderConsumerResponse returns the CZ finality provier consumer id" - }, - "babylon.btcstkconsumer.v1.QueryFinalityProviderResponse": { - "type": "object", - "properties": { - "finality_provider": { - "$ref": "#/definitions/babylon.btcstkconsumer.v1.FinalityProviderResponse", - "title": "finality_provider contains the FinalityProvider" - } - }, - "title": "QueryFinalityProviderResponse contains information about a finality provider" - }, - "babylon.btcstkconsumer.v1.QueryFinalityProvidersResponse": { - "type": "object", - "properties": { - "finality_providers": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.btcstkconsumer.v1.FinalityProviderResponse" - }, - "title": "finality_providers contains all the finality providers" - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "description": "pagination defines the pagination in the response." - } - }, - "description": "QueryFinalityProvidersResponse is the response type for the\nQuery/FinalityProviders RPC method." - }, - "babylon.btcstkconsumer.v1.QueryParamsResponse": { - "type": "object", - "properties": { - "params": { - "$ref": "#/definitions/babylon.btcstkconsumer.v1.Params", - "description": "params holds all the parameters of this module." - } - }, - "description": "QueryParamsResponse is response type for the Query/Params RPC method." - }, - "cosmos.base.query.v1beta1.PageRequest": { - "type": "object", - "properties": { - "key": { - "type": "string", - "format": "byte", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set." - }, - "offset": { - "type": "string", - "format": "uint64", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set." - }, - "limit": { - "type": "string", - "format": "uint64", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app." - }, - "count_total": { - "type": "boolean", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set." - }, - "reverse": { - "type": "boolean", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43" - } - }, - "description": "message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }", - "title": "PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:" - }, - "cosmos.base.query.v1beta1.PageResponse": { - "type": "object", - "properties": { - "next_key": { - "type": "string", - "format": "byte", - "description": "next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results." - }, - "total": { - "type": "string", - "format": "uint64", - "title": "total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise" - } - }, - "description": "PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }" - }, - "cosmos.staking.v1beta1.Description": { - "type": "object", - "properties": { - "moniker": { - "type": "string", - "description": "moniker defines a human-readable name for the validator." - }, - "identity": { - "type": "string", - "description": "identity defines an optional identity signature (ex. UPort or Keybase)." - }, - "website": { - "type": "string", - "description": "website defines an optional website link." - }, - "security_contact": { - "type": "string", - "description": "security_contact defines an optional email for security contact." - }, - "details": { - "type": "string", - "description": "details define other optional details." - } - }, - "description": "Description defines a validator description." - }, - "google.protobuf.Any": { - "type": "object", - "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "grpc.gateway.runtime.Error": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/google.protobuf.Any" - } - } - } - } - } -} diff --git a/tmp-swagger-gen/babylon/checkpointing/v1/query.swagger.json b/tmp-swagger-gen/babylon/checkpointing/v1/query.swagger.json deleted file mode 100644 index ac6f87562..000000000 --- a/tmp-swagger-gen/babylon/checkpointing/v1/query.swagger.json +++ /dev/null @@ -1,655 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "babylon/checkpointing/v1/query.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/babylon/checkpointing/v1/bls_public_keys/{epoch_num}": { - "get": { - "summary": "BlsPublicKeyList queries a list of bls public keys of the validators at a\ngiven epoch number.", - "operationId": "BlsPublicKeyList", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.checkpointing.v1.QueryBlsPublicKeyListResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "epoch_num", - "description": "epoch_num defines the epoch for the queried bls public keys", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/checkpointing/v1/epochs/{epoch_num}/status": { - "get": { - "summary": "EpochStatus queries the status of the checkpoint at a given epoch", - "operationId": "EpochStatus", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.checkpointing.v1.QueryEpochStatusResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "epoch_num", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/checkpointing/v1/epochs:status_count": { - "get": { - "summary": "RecentEpochStatusCount queries the number of epochs with each status in\nrecent epochs", - "operationId": "RecentEpochStatusCount", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.checkpointing.v1.QueryRecentEpochStatusCountResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "epoch_count", - "description": "epoch_count is the number of the most recent epochs to include in the\naggregation.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/checkpointing/v1/last_raw_checkpoint/{status}": { - "get": { - "summary": "LastCheckpointWithStatus queries the last checkpoint with a given status or\na more matured status", - "operationId": "LastCheckpointWithStatus", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.checkpointing.v1.QueryLastCheckpointWithStatusResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "status", - "in": "path", - "required": true, - "type": "string", - "enum": [ - "CKPT_STATUS_ACCUMULATING", - "CKPT_STATUS_SEALED", - "CKPT_STATUS_SUBMITTED", - "CKPT_STATUS_CONFIRMED", - "CKPT_STATUS_FINALIZED" - ] - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/checkpointing/v1/raw_checkpoint/{epoch_num}": { - "get": { - "summary": "RawCheckpoint queries a checkpoints at a given epoch number.", - "operationId": "RawCheckpoint", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.checkpointing.v1.QueryRawCheckpointResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "epoch_num", - "description": "epoch_num defines the epoch for the queried checkpoint", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/checkpointing/v1/raw_checkpoints": { - "get": { - "summary": "RawCheckpoints queries checkpoints for a epoch range specified in pagination params.", - "operationId": "RawCheckpoints", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.checkpointing.v1.QueryRawCheckpointsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/checkpointing/v1/raw_checkpoints/{status}": { - "get": { - "summary": "RawCheckpointList queries all checkpoints that match the given status.", - "operationId": "RawCheckpointList", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.checkpointing.v1.QueryRawCheckpointListResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "status", - "description": "status defines the status of the raw checkpoints of the query", - "in": "path", - "required": true, - "type": "string", - "enum": [ - "CKPT_STATUS_ACCUMULATING", - "CKPT_STATUS_SEALED", - "CKPT_STATUS_SUBMITTED", - "CKPT_STATUS_CONFIRMED", - "CKPT_STATUS_FINALIZED" - ] - }, - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - } - }, - "definitions": { - "babylon.checkpointing.v1.BlsPublicKeyListResponse": { - "type": "object", - "properties": { - "validator_address": { - "type": "string", - "title": "validator_address is the address of the validator" - }, - "bls_pub_key_hex": { - "type": "string", - "title": "bls_pub_key is the BLS public key of the validator" - }, - "voting_power": { - "type": "string", - "format": "uint64", - "title": "voting_power is the voting power of the validator at the given epoch" - } - }, - "title": "BlsPublicKeyListResponse couples validator address, voting power, and its bls\npublic key" - }, - "babylon.checkpointing.v1.CheckpointStateUpdateResponse": { - "type": "object", - "properties": { - "state": { - "$ref": "#/definitions/babylon.checkpointing.v1.CheckpointStatus", - "title": "state defines the event of a state transition towards this state" - }, - "status_desc": { - "type": "string", - "description": "status_desc represents the description of status enum." - }, - "block_height": { - "type": "string", - "format": "uint64", - "title": "block_height is the height of the Babylon block that triggers the state\nupdate" - }, - "block_time": { - "type": "string", - "format": "date-time", - "title": "block_time is the timestamp in the Babylon block that triggers the state\nupdate" - } - }, - "description": "CheckpointStateUpdateResponse defines a state transition on the checkpoint." - }, - "babylon.checkpointing.v1.CheckpointStatus": { - "type": "string", - "enum": [ - "CKPT_STATUS_ACCUMULATING", - "CKPT_STATUS_SEALED", - "CKPT_STATUS_SUBMITTED", - "CKPT_STATUS_CONFIRMED", - "CKPT_STATUS_FINALIZED" - ], - "default": "CKPT_STATUS_ACCUMULATING", - "description": "CheckpointStatus is the status of a checkpoint.\n\n - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures.\n - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures.\n - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC.\n - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC.\n - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC." - }, - "babylon.checkpointing.v1.QueryBlsPublicKeyListResponse": { - "type": "object", - "properties": { - "validator_with_bls_keys": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.checkpointing.v1.BlsPublicKeyListResponse" - } - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "description": "pagination defines the pagination in the response." - } - }, - "description": "QueryBlsPublicKeyListResponse is the response type for the\nQuery/BlsPublicKeys RPC method." - }, - "babylon.checkpointing.v1.QueryEpochStatusResponse": { - "type": "object", - "properties": { - "status": { - "$ref": "#/definitions/babylon.checkpointing.v1.CheckpointStatus" - } - }, - "description": "QueryEpochStatusResponse is the response type for the Query/EpochStatus\nRPC method." - }, - "babylon.checkpointing.v1.QueryLastCheckpointWithStatusResponse": { - "type": "object", - "properties": { - "raw_checkpoint": { - "$ref": "#/definitions/babylon.checkpointing.v1.RawCheckpointResponse" - } - }, - "description": "QueryLastCheckpointWithStatusResponse is the response type for the\nQuery/LastCheckpointWithStatus RPC method." - }, - "babylon.checkpointing.v1.QueryRawCheckpointListResponse": { - "type": "object", - "properties": { - "raw_checkpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.checkpointing.v1.RawCheckpointWithMetaResponse" - }, - "title": "the order is going from the newest to oldest based on the epoch number" - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "description": "pagination defines the pagination in the response." - } - }, - "description": "QueryRawCheckpointListResponse is the response type for the\nQuery/RawCheckpoints RPC method." - }, - "babylon.checkpointing.v1.QueryRawCheckpointResponse": { - "type": "object", - "properties": { - "raw_checkpoint": { - "$ref": "#/definitions/babylon.checkpointing.v1.RawCheckpointWithMetaResponse" - } - }, - "description": "QueryRawCheckpointResponse is the response type for the Query/RawCheckpoint\nRPC method." - }, - "babylon.checkpointing.v1.QueryRawCheckpointsResponse": { - "type": "object", - "properties": { - "raw_checkpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.checkpointing.v1.RawCheckpointWithMetaResponse" - }, - "title": "the order is going from the newest to oldest based on the epoch number" - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "description": "pagination defines the pagination in the response." - } - }, - "description": "QueryRawCheckpointsResponse is the response type for the Query/RawCheckpoints\nRPC method." - }, - "babylon.checkpointing.v1.QueryRecentEpochStatusCountResponse": { - "type": "object", - "properties": { - "tip_epoch": { - "type": "string", - "format": "uint64" - }, - "epoch_count": { - "type": "string", - "format": "uint64" - }, - "status_count": { - "type": "object", - "additionalProperties": { - "type": "string", - "format": "uint64" - } - } - }, - "description": "QueryRecentEpochStatusCountResponse is the response type for the\nQuery/EpochStatusCount RPC method." - }, - "babylon.checkpointing.v1.RawCheckpointResponse": { - "type": "object", - "properties": { - "epoch_num": { - "type": "string", - "format": "uint64", - "title": "epoch_num defines the epoch number the raw checkpoint is for" - }, - "block_hash_hex": { - "type": "string", - "title": "block_hash_hex defines the 'BlockID.Hash', which is the hash of\nthe block that individual BLS sigs are signed on as hex string" - }, - "bitmap": { - "type": "string", - "format": "byte", - "title": "bitmap defines the bitmap that indicates the signers of the BLS multi sig" - }, - "bls_multi_sig": { - "type": "string", - "format": "byte", - "title": "bls_multi_sig defines the multi sig that is aggregated from individual BLS\nsigs" - } - }, - "title": "RawCheckpointResponse wraps the BLS multi sig with metadata" - }, - "babylon.checkpointing.v1.RawCheckpointWithMetaResponse": { - "type": "object", - "properties": { - "ckpt": { - "$ref": "#/definitions/babylon.checkpointing.v1.RawCheckpointResponse" - }, - "status": { - "$ref": "#/definitions/babylon.checkpointing.v1.CheckpointStatus", - "title": "status defines the status of the checkpoint" - }, - "status_desc": { - "type": "string", - "description": "status_desc represents the description of status enum." - }, - "bls_aggr_pk": { - "type": "string", - "format": "byte", - "title": "bls_aggr_pk defines the aggregated BLS public key" - }, - "power_sum": { - "type": "string", - "format": "uint64", - "title": "power_sum defines the accumulated voting power for the checkpoint" - }, - "lifecycle": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.checkpointing.v1.CheckpointStateUpdateResponse" - }, - "description": "lifecycle defines the lifecycle of this checkpoint, i.e., each state\ntransition and the time (in both timestamp and block height) of this\ntransition." - } - }, - "description": "RawCheckpointWithMetaResponse wraps the raw checkpoint with metadata." - }, - "cosmos.base.query.v1beta1.PageRequest": { - "type": "object", - "properties": { - "key": { - "type": "string", - "format": "byte", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set." - }, - "offset": { - "type": "string", - "format": "uint64", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set." - }, - "limit": { - "type": "string", - "format": "uint64", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app." - }, - "count_total": { - "type": "boolean", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set." - }, - "reverse": { - "type": "boolean", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43" - } - }, - "description": "message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }", - "title": "PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:" - }, - "cosmos.base.query.v1beta1.PageResponse": { - "type": "object", - "properties": { - "next_key": { - "type": "string", - "format": "byte", - "description": "next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results." - }, - "total": { - "type": "string", - "format": "uint64", - "title": "total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise" - } - }, - "description": "PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }" - }, - "google.protobuf.Any": { - "type": "object", - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "grpc.gateway.runtime.Error": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/google.protobuf.Any" - } - } - } - } - } -} diff --git a/tmp-swagger-gen/babylon/epoching/v1/query.swagger.json b/tmp-swagger-gen/babylon/epoching/v1/query.swagger.json deleted file mode 100644 index 88c11c822..000000000 --- a/tmp-swagger-gen/babylon/epoching/v1/query.swagger.json +++ /dev/null @@ -1,835 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "babylon/epoching/v1/query.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/babylon/epoching/v1/current_epoch": { - "get": { - "summary": "CurrentEpoch queries the current epoch", - "operationId": "CurrentEpoch", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.epoching.v1.QueryCurrentEpochResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "tags": [ - "Query" - ] - } - }, - "/babylon/epoching/v1/delegation_lifecycle/{del_addr}": { - "get": { - "summary": "DelegationLifecycle queries the lifecycle of a given delegation", - "operationId": "DelegationLifecycle", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.epoching.v1.QueryDelegationLifecycleResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "del_addr", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/epoching/v1/epochs": { - "get": { - "summary": "EpochsInfo queries the metadata of epochs in a given range, depending on\nthe parameters in the pagination request. Th main use case will be querying\nthe latest epochs in time order.", - "operationId": "EpochsInfo", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.epoching.v1.QueryEpochsInfoResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/epoching/v1/epochs/{epoch_num}": { - "get": { - "summary": "EpochInfo queries the information of a given epoch", - "operationId": "EpochInfo", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.epoching.v1.QueryEpochInfoResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "epoch_num", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/epoching/v1/epochs/{epoch_num}/messages": { - "get": { - "summary": "EpochMsgs queries the messages of a given epoch", - "operationId": "EpochMsgs", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.epoching.v1.QueryEpochMsgsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "epoch_num", - "description": "epoch_num is the number of epoch of the requested msg queue", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/epoching/v1/epochs/{epoch_num}/validator_set": { - "get": { - "summary": "EpochValSet queries the validator set of a given epoch", - "operationId": "EpochValSet", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.epoching.v1.QueryEpochValSetResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "epoch_num", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/epoching/v1/epochs:latest/messages": { - "get": { - "summary": "LatestEpochMsgs queries the messages within a given number of most recent\nepochs", - "operationId": "LatestEpochMsgs", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.epoching.v1.QueryLatestEpochMsgsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "end_epoch", - "description": "end_epoch is the number of the last epoch to query.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "epoch_count", - "description": "epoch_count is the number of epochs to query.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/epoching/v1/params": { - "get": { - "summary": "Params queries the parameters of the module.", - "operationId": "Params", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.epoching.v1.QueryParamsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "tags": [ - "Query" - ] - } - }, - "/babylon/epoching/v1/validator_lifecycle/{val_addr}": { - "get": { - "summary": "ValidatorLifecycle queries the lifecycle of a given validator", - "operationId": "ValidatorLifecycle", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.epoching.v1.QueryValidatorLifecycleResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "val_addr", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "Query" - ] - } - } - }, - "definitions": { - "babylon.epoching.v1.BondState": { - "type": "string", - "enum": [ - "CREATED", - "BONDED", - "UNBONDING", - "UNBONDED", - "REMOVED" - ], - "default": "CREATED", - "description": "- CREATED: CREATED is when the validator/delegation has been created\n - BONDED: CREATED is when the validator/delegation has become bonded\n - UNBONDING: CREATED is when the validator/delegation has become unbonding\n - UNBONDED: CREATED is when the validator/delegation has become unbonded\n - REMOVED: CREATED is when the validator/delegation has been removed", - "title": "BondState is the bond state of a validator or delegation" - }, - "babylon.epoching.v1.DelegationLifecycle": { - "type": "object", - "properties": { - "del_addr": { - "type": "string" - }, - "del_life": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.epoching.v1.DelegationStateUpdate" - } - } - }, - "title": "ValidatorLifecycle is a message that records the lifecycle of\na delegation" - }, - "babylon.epoching.v1.DelegationStateUpdate": { - "type": "object", - "properties": { - "state": { - "$ref": "#/definitions/babylon.epoching.v1.BondState" - }, - "val_addr": { - "type": "string" - }, - "amount": { - "$ref": "#/definitions/cosmos.base.v1beta1.Coin" - }, - "block_height": { - "type": "string", - "format": "uint64" - }, - "block_time": { - "type": "string", - "format": "date-time" - } - }, - "title": "DelegationStateUpdate is the message that records a state update of a\ndelegation" - }, - "babylon.epoching.v1.EpochResponse": { - "type": "object", - "properties": { - "epoch_number": { - "type": "string", - "format": "uint64", - "title": "epoch_number is the number of this epoch" - }, - "current_epoch_interval": { - "type": "string", - "format": "uint64", - "title": "current_epoch_interval is the epoch interval at the time of this epoch" - }, - "first_block_height": { - "type": "string", - "format": "uint64", - "title": "first_block_height is the height of the first block in this epoch" - }, - "last_block_time": { - "type": "string", - "format": "date-time", - "description": "last_block_time is the time of the last block in this epoch.\nBabylon needs to remember the last header's time of each epoch to complete\nunbonding validators/delegations when a previous epoch's checkpoint is\nfinalised. The last_block_time field is nil in the epoch's beginning, and\nis set upon the end of this epoch." - }, - "sealer_app_hash_hex": { - "type": "string", - "description": "sealer is the last block of the sealed epoch\nsealer_app_hash points to the sealer but stored in the 1st header\nof the next epoch as hex string." - }, - "sealer_block_hash": { - "type": "string", - "description": "sealer_block_hash is the hash of the sealer\nthe validator set has generated a BLS multisig on the hash,\ni.e., hash of the last block in the epoch as hex string." - } - }, - "title": "EpochResponse is a structure that contains the metadata of an epoch" - }, - "babylon.epoching.v1.Params": { - "type": "object", - "properties": { - "epoch_interval": { - "type": "string", - "format": "uint64", - "title": "epoch_interval is the number of consecutive blocks to form an epoch" - } - }, - "description": "Params defines the parameters for the module." - }, - "babylon.epoching.v1.QueryCurrentEpochResponse": { - "type": "object", - "properties": { - "current_epoch": { - "type": "string", - "format": "uint64", - "title": "current_epoch is the current epoch number" - }, - "epoch_boundary": { - "type": "string", - "format": "uint64", - "title": "epoch_boundary is the height of this epoch's last block" - } - }, - "title": "QueryCurrentEpochResponse is the response type for the Query/CurrentEpoch RPC\nmethod" - }, - "babylon.epoching.v1.QueryDelegationLifecycleResponse": { - "type": "object", - "properties": { - "del_life": { - "$ref": "#/definitions/babylon.epoching.v1.DelegationLifecycle" - } - }, - "title": "QueryDelegationLifecycleRequest is the response type for the\nQuery/DelegationLifecycle RPC method" - }, - "babylon.epoching.v1.QueryEpochInfoResponse": { - "type": "object", - "properties": { - "epoch": { - "$ref": "#/definitions/babylon.epoching.v1.EpochResponse" - } - }, - "title": "QueryEpochInfoRequest is the response type for the Query/EpochInfo method" - }, - "babylon.epoching.v1.QueryEpochMsgsResponse": { - "type": "object", - "properties": { - "msgs": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.epoching.v1.QueuedMessageResponse" - }, - "title": "msgs is the list of messages queued in the current epoch" - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "title": "pagination defines the pagination in the response" - } - }, - "title": "QueryEpochMsgsResponse is the response type for the Query/EpochMsgs RPC\nmethod" - }, - "babylon.epoching.v1.QueryEpochValSetResponse": { - "type": "object", - "properties": { - "validators": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.epoching.v1.Validator" - } - }, - "total_voting_power": { - "type": "string", - "format": "int64" - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse" - } - }, - "title": "QueryEpochValSetRequest is the response type for the Query/EpochValSet RPC\nmethod" - }, - "babylon.epoching.v1.QueryEpochsInfoResponse": { - "type": "object", - "properties": { - "epochs": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.epoching.v1.EpochResponse" - } - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "title": "pagination defines the pagination in the response" - } - }, - "title": "QueryEpochsInfoResponse is the response type for the Query/EpochInfos method" - }, - "babylon.epoching.v1.QueryLatestEpochMsgsResponse": { - "type": "object", - "properties": { - "latest_epoch_msgs": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.epoching.v1.QueuedMessageList" - }, - "title": "latest_epoch_msgs is a list of QueuedMessageList\neach QueuedMessageList has a field identifying the epoch number" - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse" - } - }, - "title": "QueryLatestEpochMsgsResponse is the response type for the\nQuery/LatestEpochMsgs RPC method" - }, - "babylon.epoching.v1.QueryParamsResponse": { - "type": "object", - "properties": { - "params": { - "$ref": "#/definitions/babylon.epoching.v1.Params", - "description": "params holds all the parameters of this module." - } - }, - "description": "QueryParamsResponse is the response type for the Query/Params RPC method." - }, - "babylon.epoching.v1.QueryValidatorLifecycleResponse": { - "type": "object", - "properties": { - "val_addr": { - "type": "string" - }, - "val_life": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.epoching.v1.ValStateUpdateResponse" - } - } - }, - "title": "QueryValidatorLifecycleResponse is the response type for the\nQuery/ValidatorLifecycle RPC method" - }, - "babylon.epoching.v1.QueuedMessageList": { - "type": "object", - "properties": { - "epoch_number": { - "type": "string", - "format": "uint64" - }, - "msgs": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.epoching.v1.QueuedMessageResponse" - } - } - }, - "title": "QueuedMessageList is a message that contains a list of staking-related\nmessages queued for an epoch" - }, - "babylon.epoching.v1.QueuedMessageResponse": { - "type": "object", - "properties": { - "tx_id": { - "type": "string", - "description": "tx_id is the ID of the tx that contains the message as hex." - }, - "msg_id": { - "type": "string", - "description": "msg_id is the original message ID, i.e., hash of the marshaled message as hex." - }, - "block_height": { - "type": "string", - "format": "uint64", - "title": "block_height is the height when this msg is submitted to Babylon" - }, - "block_time": { - "type": "string", - "format": "date-time", - "title": "block_time is the timestamp when this msg is submitted to Babylon" - }, - "msg": { - "type": "string", - "description": "msg is the actual message that is sent by a user and is queued by the\nepoching module as string." - } - }, - "title": "QueuedMessageResponse is a message that can change the validator set and is delayed\nto the end of an epoch" - }, - "babylon.epoching.v1.ValStateUpdateResponse": { - "type": "object", - "properties": { - "state_desc": { - "type": "string", - "description": "StateDesc defines the descriptive state." - }, - "block_height": { - "type": "string", - "format": "uint64" - }, - "block_time": { - "type": "string", - "format": "date-time" - } - }, - "description": "ValStateUpdateResponse is a message response that records a state update of a validator." - }, - "babylon.epoching.v1.Validator": { - "type": "object", - "properties": { - "addr": { - "type": "string", - "format": "byte", - "title": "addr is the validator's address (in sdk.ValAddress)" - }, - "power": { - "type": "string", - "format": "int64", - "title": "power is the validator's voting power" - } - }, - "title": "Validator is a message that denotes a validator" - }, - "cosmos.base.query.v1beta1.PageRequest": { - "type": "object", - "properties": { - "key": { - "type": "string", - "format": "byte", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set." - }, - "offset": { - "type": "string", - "format": "uint64", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set." - }, - "limit": { - "type": "string", - "format": "uint64", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app." - }, - "count_total": { - "type": "boolean", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set." - }, - "reverse": { - "type": "boolean", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43" - } - }, - "description": "message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }", - "title": "PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:" - }, - "cosmos.base.query.v1beta1.PageResponse": { - "type": "object", - "properties": { - "next_key": { - "type": "string", - "format": "byte", - "description": "next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results." - }, - "total": { - "type": "string", - "format": "uint64", - "title": "total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise" - } - }, - "description": "PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }" - }, - "cosmos.base.v1beta1.Coin": { - "type": "object", - "properties": { - "denom": { - "type": "string" - }, - "amount": { - "type": "string" - } - }, - "description": "Coin defines a token with a denomination and an amount.\n\nNOTE: The amount field is an Int which implements the custom method\nsignatures required by gogoproto." - }, - "google.protobuf.Any": { - "type": "object", - "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "grpc.gateway.runtime.Error": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/google.protobuf.Any" - } - } - } - } - } -} diff --git a/tmp-swagger-gen/babylon/finality/v1/query.swagger.json b/tmp-swagger-gen/babylon/finality/v1/query.swagger.json deleted file mode 100644 index 13dc31ec3..000000000 --- a/tmp-swagger-gen/babylon/finality/v1/query.swagger.json +++ /dev/null @@ -1,1151 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "babylon/finality/v1/query.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/babylon/finality/v1/activated_height": { - "get": { - "summary": "ActivatedHeight queries the height when BTC staking protocol is activated, i.e., the first height when\nthere exists 1 finality provider with voting power", - "operationId": "ActivatedHeight", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.finality.v1.QueryActivatedHeightResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "tags": [ - "Query" - ] - } - }, - "/babylon/finality/v1/blocks": { - "get": { - "summary": "ListBlocks is a range query for blocks at a given status", - "operationId": "ListBlocks", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.finality.v1.QueryListBlocksResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "status", - "description": "status indicates the status of blocks that the querier wants to query.\n\n - NON_FINALIZED: NON_FINALIZED means the block is not finalised\n - FINALIZED: FINALIZED means the block is finalized\n - ANY: ANY means the block can be in any status", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "NON_FINALIZED", - "FINALIZED", - "ANY" - ], - "default": "NON_FINALIZED" - }, - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/finality/v1/blocks/{height}": { - "get": { - "summary": "Block queries a block at a given height", - "operationId": "Block", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.finality.v1.QueryBlockResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "height", - "description": "height is the height of the Babylon block", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/finality/v1/evidences": { - "get": { - "summary": "ListEvidences queries is a range query for evidences", - "operationId": "ListEvidences", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.finality.v1.QueryListEvidencesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "start_height", - "description": "start_height is the starting height that the querier specifies\nsuch that the RPC will only return evidences since this height.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/finality/v1/finality_providers/{fp_btc_pk_hex}/evidence": { - "get": { - "summary": "Evidence queries the first evidence which can be used for extracting the BTC SK", - "operationId": "Evidence", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.finality.v1.QueryEvidenceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "fp_btc_pk_hex", - "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK\n(in BIP340 format) of the finality provider", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/finality/v1/finality_providers/{fp_btc_pk_hex}/power": { - "get": { - "summary": "FinalityProviderCurrentPower queries the voting power of a finality provider at the current height", - "operationId": "FinalityProviderCurrentPower", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.finality.v1.QueryFinalityProviderCurrentPowerResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "fp_btc_pk_hex", - "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality provider that\nthis BTC delegation delegates to\nthe PK follows encoding in BIP-340 spec", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/finality/v1/finality_providers/{fp_btc_pk_hex}/power/{height}": { - "get": { - "summary": "FinalityProviderPowerAtHeight queries the voting power of a finality provider at a given height", - "operationId": "FinalityProviderPowerAtHeight", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.finality.v1.QueryFinalityProviderPowerAtHeightResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "fp_btc_pk_hex", - "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality provider that\nthis BTC delegation delegates to\nthe PK follows encoding in BIP-340 spec", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "height", - "description": "height is used for querying the given finality provider's voting power at this height", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/finality/v1/finality_providers/{fp_btc_pk_hex}/pub_rand_commit_list": { - "get": { - "summary": "ListPubRandCommit is a range query for public randomness commitments of a given finality provider", - "operationId": "ListPubRandCommit", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.finality.v1.QueryListPubRandCommitResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "fp_btc_pk_hex", - "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality provider", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/finality/v1/finality_providers/{fp_btc_pk_hex}/public_randomness_list": { - "get": { - "summary": "ListPublicRandomness is a range query for public randomness of a given finality provider\nNOTE: Babylon only has the knowledge of public randomness that is already revealed by\nfinality providers, i.e., the finality provider already provides a finality signature\nat the corresponding height", - "operationId": "ListPublicRandomness", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.finality.v1.QueryListPublicRandomnessResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "fp_btc_pk_hex", - "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality provider", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/finality/v1/finality_providers/{height}": { - "get": { - "summary": "ActiveFinalityProvidersAtHeight queries finality providers with non zero voting power at given height.", - "operationId": "ActiveFinalityProvidersAtHeight", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.finality.v1.QueryActiveFinalityProvidersAtHeightResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "height", - "description": "height defines at which Babylon height to query the finality providers info.", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/finality/v1/params": { - "get": { - "summary": "Parameters queries the parameters of the module.", - "operationId": "Params", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.finality.v1.QueryParamsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "tags": [ - "Query" - ] - } - }, - "/babylon/finality/v1/signing_infos": { - "get": { - "summary": "SigningInfos queries the signing info of all the active finality providers", - "operationId": "SigningInfos", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.finality.v1.QuerySigningInfosResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/finality/v1/signing_infos/{fp_btc_pk_hex}": { - "get": { - "summary": "SigningInfo queries the signing info of given finality provider BTC public key", - "operationId": "SigningInfo", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.finality.v1.QuerySigningInfoResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "fp_btc_pk_hex", - "description": "fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK\n(in BIP340 format) of the finality provider", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/finality/v1/votes/{height}": { - "get": { - "summary": "VotesAtHeight queries finality providers who have signed the block at given height.", - "operationId": "VotesAtHeight", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.finality.v1.QueryVotesAtHeightResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "height", - "description": "height defines at which height to query the finality providers.", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Query" - ] - } - } - }, - "definitions": { - "babylon.finality.v1.ActiveFinalityProvidersAtHeightResponse": { - "type": "object", - "properties": { - "btc_pk_hex": { - "type": "string", - "title": "btc_pk is the Bitcoin secp256k1 PK of thisfinality provider\nthe PK follows encoding in BIP-340 spec" - }, - "height": { - "type": "string", - "format": "uint64", - "title": "height is the queried Babylon height" - }, - "voting_power": { - "type": "string", - "format": "uint64", - "title": "voting_power is the voting power of this finality provider at the given height" - }, - "slashed_babylon_height": { - "type": "string", - "format": "uint64", - "title": "slashed_babylon_height indicates the Babylon height when\nthe finality provider is slashed.\nif it's 0 then the finality provider is not slashed" - }, - "slashed_btc_height": { - "type": "integer", - "format": "int64", - "title": "slashed_btc_height indicates the BTC height when\nthe finality provider is slashed.\nif it's 0 then the finality provider is not slashed" - }, - "jailed": { - "type": "boolean", - "title": "jailed defines whether the finality provider is detected jailed" - }, - "highest_voted_height": { - "type": "integer", - "format": "int64", - "title": "highest_voted_height is the highest height for which the\nfinality provider has voted" - } - }, - "description": "ActiveFinalityProvidersAtHeightResponse wraps the FinalityProvider with metadata." - }, - "babylon.finality.v1.EvidenceResponse": { - "type": "object", - "properties": { - "fp_btc_pk_hex": { - "type": "string", - "title": "fp_btc_pk_hex is the BTC PK of the finality provider that casts this vote" - }, - "block_height": { - "type": "string", - "format": "uint64", - "title": "block_height is the height of the conflicting blocks" - }, - "pub_rand": { - "type": "string", - "format": "byte", - "title": "pub_rand is the public randomness the finality provider has committed to" - }, - "canonical_app_hash": { - "type": "string", - "format": "byte", - "title": "canonical_app_hash is the AppHash of the canonical block" - }, - "fork_app_hash": { - "type": "string", - "format": "byte", - "title": "fork_app_hash is the AppHash of the fork block" - }, - "canonical_finality_sig": { - "type": "string", - "format": "byte", - "title": "canonical_finality_sig is the finality signature to the canonical block\nwhere finality signature is an EOTS signature, i.e.,\nthe `s` in a Schnorr signature `(r, s)`\n`r` is the public randomness that is already committed by the finality provider" - }, - "fork_finality_sig": { - "type": "string", - "format": "byte", - "title": "fork_finality_sig is the finality signature to the fork block\nwhere finality signature is an EOTS signature" - } - }, - "title": "Evidence is the evidence that a finality provider has signed finality\nsignatures with correct public randomness on two conflicting Babylon headers" - }, - "babylon.finality.v1.IndexedBlock": { - "type": "object", - "properties": { - "height": { - "type": "string", - "format": "uint64", - "title": "height is the height of the block" - }, - "app_hash": { - "type": "string", - "format": "byte", - "title": "app_hash is the AppHash of the block" - }, - "finalized": { - "type": "boolean", - "title": "finalized indicates whether the IndexedBlock is finalised by 2/3\nfinality providers or not" - } - }, - "title": "IndexedBlock is the necessary metadata and finalization status of a block" - }, - "babylon.finality.v1.Params": { - "type": "object", - "properties": { - "max_active_finality_providers": { - "type": "integer", - "format": "int64", - "title": "max_active_finality_providers is the maximum number of active finality providers in the BTC staking protocol" - }, - "signed_blocks_window": { - "type": "string", - "format": "int64", - "title": "signed_blocks_window defines the size of the sliding window for tracking finality provider liveness" - }, - "finality_sig_timeout": { - "type": "string", - "format": "int64", - "title": "finality_sig_timeout defines how much time (in terms of blocks) finality providers have to cast a finality\nvote before being judged as missing their voting turn on the given block" - }, - "min_signed_per_window": { - "type": "string", - "format": "byte", - "title": "min_signed_per_window defines the minimum number of blocks that a finality provider is required to sign\nwithin the sliding window to avoid being jailed" - }, - "min_pub_rand": { - "type": "string", - "format": "uint64", - "title": "min_pub_rand is the minimum number of public randomness each\nmessage should commit" - }, - "jail_duration": { - "type": "string", - "title": "jail_duration is the minimum period of time that a finality provider remains jailed" - }, - "finality_activation_height": { - "type": "string", - "format": "uint64", - "description": "finality_activation_height is the babylon block height which the finality module will\nstart to accept finality voting and the minimum allowed value for the public randomness\ncommit start height." - } - }, - "description": "Params defines the parameters for the module." - }, - "babylon.finality.v1.PubRandCommitResponse": { - "type": "object", - "properties": { - "num_pub_rand": { - "type": "string", - "format": "uint64", - "title": "num_pub_rand is the number of committed public randomness" - }, - "commitment": { - "type": "string", - "format": "byte", - "title": "commitment is the value of the commitment" - }, - "epoch_num": { - "type": "string", - "format": "uint64", - "title": "epoch_num defines the epoch number that the commit falls into" - } - }, - "title": "PubRandCommitResponse is the response type for a public randomness commitment" - }, - "babylon.finality.v1.QueriedBlockStatus": { - "type": "string", - "enum": [ - "NON_FINALIZED", - "FINALIZED", - "ANY" - ], - "default": "NON_FINALIZED", - "description": "QueriedBlockStatus is the status of blocks that the querier wants to query.\n\n - NON_FINALIZED: NON_FINALIZED means the block is not finalised\n - FINALIZED: FINALIZED means the block is finalized\n - ANY: ANY means the block can be in any status" - }, - "babylon.finality.v1.QueryActivatedHeightResponse": { - "type": "object", - "properties": { - "height": { - "type": "string", - "format": "uint64" - } - }, - "description": "QueryActivatedHeightResponse is the response type for the Query/ActivatedHeight RPC method." - }, - "babylon.finality.v1.QueryActiveFinalityProvidersAtHeightResponse": { - "type": "object", - "properties": { - "finality_providers": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.finality.v1.ActiveFinalityProvidersAtHeightResponse" - }, - "description": "finality_providers contains all the queried finality providersn." - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "description": "pagination defines the pagination in the response." - } - }, - "description": "QueryActiveFinalityProvidersAtHeightResponse is the response type for the\nQuery/ActiveFinalityProvidersAtHeight RPC method." - }, - "babylon.finality.v1.QueryBlockResponse": { - "type": "object", - "properties": { - "block": { - "$ref": "#/definitions/babylon.finality.v1.IndexedBlock", - "title": "block is the Babylon at the given height" - } - }, - "description": "QueryBlockResponse is the response type for the\nQuery/Block RPC method." - }, - "babylon.finality.v1.QueryEvidenceResponse": { - "type": "object", - "properties": { - "evidence": { - "$ref": "#/definitions/babylon.finality.v1.EvidenceResponse" - } - }, - "description": "QueryEvidenceResponse is the response type for the\nQuery/Evidence RPC method." - }, - "babylon.finality.v1.QueryFinalityProviderCurrentPowerResponse": { - "type": "object", - "properties": { - "height": { - "type": "string", - "format": "uint64", - "title": "height is the current height" - }, - "voting_power": { - "type": "string", - "format": "uint64", - "title": "voting_power is the voting power of the finality provider" - } - }, - "description": "QueryFinalityProviderCurrentPowerResponse is the response type for the\nQuery/FinalityProviderCurrentPower RPC method." - }, - "babylon.finality.v1.QueryFinalityProviderPowerAtHeightResponse": { - "type": "object", - "properties": { - "voting_power": { - "type": "string", - "format": "uint64", - "title": "voting_power is the voting power of the finality provider" - } - }, - "description": "QueryFinalityProviderPowerAtHeightResponse is the response type for the\nQuery/FinalityProviderPowerAtHeight RPC method." - }, - "babylon.finality.v1.QueryListBlocksResponse": { - "type": "object", - "properties": { - "blocks": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.finality.v1.IndexedBlock" - }, - "title": "blocks is the list of blocks at the given status" - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "description": "pagination defines the pagination in the response." - } - }, - "description": "QueryListBlocksResponse is the response type for the\nQuery/ListBlocks RPC method." - }, - "babylon.finality.v1.QueryListEvidencesResponse": { - "type": "object", - "properties": { - "evidences": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.finality.v1.EvidenceResponse" - }, - "title": "blocks is the list of evidences" - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "description": "pagination defines the pagination in the response." - } - }, - "description": "QueryListEvidencesResponse is the response type for the\nQuery/ListEvidences RPC method." - }, - "babylon.finality.v1.QueryListPubRandCommitResponse": { - "type": "object", - "properties": { - "pub_rand_commit_map": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/babylon.finality.v1.PubRandCommitResponse" - }, - "title": "pub_rand_commit_map is the map where the key is the start height and the value\nis the public randomness commitment at this height for the given finality provider" - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "description": "pagination defines the pagination in the response." - } - }, - "description": "QueryListPubRandCommitResponse is the response type for the\nQuery/ListPubRandCommit RPC method." - }, - "babylon.finality.v1.QueryListPublicRandomnessResponse": { - "type": "object", - "properties": { - "pub_rand_map": { - "type": "object", - "additionalProperties": { - "type": "string", - "format": "byte" - }, - "title": "pub_rand_map is the map where the key is the height and the value\nis the public randomness at this height for the given finality provider" - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "description": "pagination defines the pagination in the response." - } - }, - "description": "QueryListPublicRandomnessResponse is the response type for the\nQuery/ListPublicRandomness RPC method." - }, - "babylon.finality.v1.QueryParamsResponse": { - "type": "object", - "properties": { - "params": { - "$ref": "#/definitions/babylon.finality.v1.Params", - "description": "params holds all the parameters of this module." - } - }, - "description": "QueryParamsResponse is response type for the Query/Params RPC method." - }, - "babylon.finality.v1.QuerySigningInfoResponse": { - "type": "object", - "properties": { - "signing_info": { - "$ref": "#/definitions/babylon.finality.v1.SigningInfoResponse" - } - }, - "title": "QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC\nmethod" - }, - "babylon.finality.v1.QuerySigningInfosResponse": { - "type": "object", - "properties": { - "signing_infos": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.finality.v1.SigningInfoResponse" - }, - "title": "info is the signing info of all finality providers with signing info" - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse" - } - }, - "title": "QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC\nmethod" - }, - "babylon.finality.v1.QueryVotesAtHeightResponse": { - "type": "object", - "properties": { - "btc_pks": { - "type": "array", - "items": { - "type": "string", - "format": "byte" - }, - "title": "btc_pk is the Bitcoin secp256k1 PK of finality providers who have signed the block at given height.\nthe PK follows encoding in BIP-340 spec" - } - }, - "description": "QueryVotesAtHeightResponse is the response type for the\nQuery/VotesAtHeight RPC method." - }, - "babylon.finality.v1.SigningInfoResponse": { - "type": "object", - "properties": { - "fp_btc_pk_hex": { - "type": "string", - "title": "fp_btc_pk is the BTC PK of the finality provider that casts this vote" - }, - "start_height": { - "type": "string", - "format": "int64", - "title": "start_height is the block height at which finality provider become active" - }, - "missed_blocks_counter": { - "type": "string", - "format": "int64", - "description": "missed_blocks_counter defines a counter to avoid unnecessary array reads.\nNote that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`." - }, - "jailed_until": { - "type": "string", - "format": "date-time", - "description": "Timestamp until which the validator is jailed due to liveness downtime." - } - }, - "description": "SigningInfoResponse defines the API response containing a finality provider's signing info\nfor monitoring their liveness activity." - }, - "cosmos.base.query.v1beta1.PageRequest": { - "type": "object", - "properties": { - "key": { - "type": "string", - "format": "byte", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set." - }, - "offset": { - "type": "string", - "format": "uint64", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set." - }, - "limit": { - "type": "string", - "format": "uint64", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app." - }, - "count_total": { - "type": "boolean", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set." - }, - "reverse": { - "type": "boolean", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43" - } - }, - "description": "message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }", - "title": "PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:" - }, - "cosmos.base.query.v1beta1.PageResponse": { - "type": "object", - "properties": { - "next_key": { - "type": "string", - "format": "byte", - "description": "next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results." - }, - "total": { - "type": "string", - "format": "uint64", - "title": "total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise" - } - }, - "description": "PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }" - }, - "google.protobuf.Any": { - "type": "object", - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "grpc.gateway.runtime.Error": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/google.protobuf.Any" - } - } - } - } - } -} diff --git a/tmp-swagger-gen/babylon/incentive/query.swagger.json b/tmp-swagger-gen/babylon/incentive/query.swagger.json deleted file mode 100644 index 5c2e44acd..000000000 --- a/tmp-swagger-gen/babylon/incentive/query.swagger.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "babylon/incentive/query.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/babylon/incentive/address/{address}/reward_gauge": { - "get": { - "summary": "RewardGauge queries the reward gauge of a given stakeholder address", - "operationId": "RewardGauges", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.incentive.QueryRewardGaugesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "address", - "description": "address is the address of the stakeholder in bech32 string", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/incentive/btc_staking_gauge/{height}": { - "get": { - "summary": "BTCStakingGauge queries the BTC staking gauge of a given height", - "operationId": "BTCStakingGauge", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.incentive.QueryBTCStakingGaugeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "height", - "description": "height is the queried Babylon height", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/incentive/delegators/{delegator_address}/withdraw_address": { - "get": { - "summary": "DelegatorWithdrawAddress queries withdraw address of a delegator.", - "operationId": "DelegatorWithdrawAddress", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.incentive.QueryDelegatorWithdrawAddressResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "delegator_address", - "description": "delegator_address defines the delegator address to query for.", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/incentive/params": { - "get": { - "summary": "Parameters queries the parameters of the module.", - "operationId": "Params", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.incentive.QueryParamsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "tags": [ - "Query" - ] - } - } - }, - "definitions": { - "babylon.incentive.BTCStakingGaugeResponse": { - "type": "object", - "properties": { - "coins": { - "type": "array", - "items": { - "$ref": "#/definitions/cosmos.base.v1beta1.Coin" - }, - "title": "coins that have been in the gauge\ncan have multiple coin denoms" - } - }, - "description": "BTCStakingGaugeResponse is response type for the Query/BTCStakingGauge RPC method." - }, - "babylon.incentive.Params": { - "type": "object", - "properties": { - "btc_staking_portion": { - "type": "string", - "title": "btc_staking_portion is the portion of rewards that goes to Finality Providers/delegations\nNOTE: the portion of each Finality Provider/delegation is calculated by using its voting\npower and finality provider's commission" - } - }, - "title": "Params defines the parameters for the module, including portions of rewards\ndistributed to each type of stakeholder. Note that sum of the portions should\nbe strictly less than 1 so that the rest will go to Comet validators/delegations\nadapted from https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/proto/cosmos/distribution/v1beta1/distribution.proto" - }, - "babylon.incentive.QueryBTCStakingGaugeResponse": { - "type": "object", - "properties": { - "gauge": { - "$ref": "#/definitions/babylon.incentive.BTCStakingGaugeResponse", - "title": "gauge is the BTC staking gauge at the queried height" - } - }, - "description": "QueryBTCStakingGaugeResponse is response type for the Query/BTCStakingGauge RPC method." - }, - "babylon.incentive.QueryDelegatorWithdrawAddressResponse": { - "type": "object", - "properties": { - "withdraw_address": { - "type": "string", - "description": "withdraw_address defines the delegator address to query for." - } - }, - "description": "QueryDelegatorWithdrawAddressResponse is the response type for the\nQuery/DelegatorWithdrawAddress RPC method." - }, - "babylon.incentive.QueryParamsResponse": { - "type": "object", - "properties": { - "params": { - "$ref": "#/definitions/babylon.incentive.Params", - "description": "params holds all the parameters of this module." - } - }, - "description": "QueryParamsResponse is response type for the Query/Params RPC method." - }, - "babylon.incentive.QueryRewardGaugesResponse": { - "type": "object", - "properties": { - "reward_gauges": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/babylon.incentive.RewardGaugesResponse" - }, - "title": "reward_gauges is the map of reward gauges, where key is the stakeholder type\nand value is the reward gauge holding all rewards for the stakeholder in that type" - } - }, - "description": "QueryRewardGaugesResponse is response type for the Query/RewardGauges RPC method." - }, - "babylon.incentive.RewardGaugesResponse": { - "type": "object", - "properties": { - "coins": { - "type": "array", - "items": { - "$ref": "#/definitions/cosmos.base.v1beta1.Coin" - }, - "title": "coins are coins that have been in the gauge\nCan have multiple coin denoms" - }, - "withdrawn_coins": { - "type": "array", - "items": { - "$ref": "#/definitions/cosmos.base.v1beta1.Coin" - }, - "title": "withdrawn_coins are coins that have been withdrawn by the stakeholder already" - } - }, - "title": "RewardGaugesResponse is an object that stores rewards distributed to a BTC staking stakeholder" - }, - "cosmos.base.v1beta1.Coin": { - "type": "object", - "properties": { - "denom": { - "type": "string" - }, - "amount": { - "type": "string" - } - }, - "description": "Coin defines a token with a denomination and an amount.\n\nNOTE: The amount field is an Int which implements the custom method\nsignatures required by gogoproto." - }, - "google.protobuf.Any": { - "type": "object", - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "grpc.gateway.runtime.Error": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/google.protobuf.Any" - } - } - } - } - } -} diff --git a/tmp-swagger-gen/babylon/mint/v1/query.swagger.json b/tmp-swagger-gen/babylon/mint/v1/query.swagger.json deleted file mode 100644 index dcd9156d9..000000000 --- a/tmp-swagger-gen/babylon/mint/v1/query.swagger.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "babylon/mint/v1/query.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/cosmos/mint/v1beta1/annual_provisions": { - "get": { - "summary": "AnnualProvisions returns the current annual provisions.", - "operationId": "AnnualProvisions", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.mint.v1.QueryAnnualProvisionsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "tags": [ - "Query" - ] - } - }, - "/cosmos/mint/v1beta1/genesis_time": { - "get": { - "summary": "GenesisTime returns the genesis time.", - "operationId": "GenesisTime", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.mint.v1.QueryGenesisTimeResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "tags": [ - "Query" - ] - } - }, - "/cosmos/mint/v1beta1/inflation_rate": { - "get": { - "summary": "InflationRate returns the current inflation rate.", - "operationId": "InflationRate", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.mint.v1.QueryInflationRateResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "tags": [ - "Query" - ] - } - } - }, - "definitions": { - "babylon.mint.v1.QueryAnnualProvisionsResponse": { - "type": "object", - "properties": { - "annual_provisions": { - "type": "string", - "format": "byte", - "description": "AnnualProvisions is the current annual provisions." - } - }, - "description": "QueryAnnualProvisionsResponse is the response type for the\nQuery/AnnualProvisions RPC method." - }, - "babylon.mint.v1.QueryGenesisTimeResponse": { - "type": "object", - "properties": { - "genesis_time": { - "type": "string", - "format": "date-time", - "description": "GenesisTime is the timestamp associated with the first block." - } - }, - "description": "QueryGenesisTimeResponse is the response type for the Query/GenesisTime RPC\nmethod." - }, - "babylon.mint.v1.QueryInflationRateResponse": { - "type": "object", - "properties": { - "inflation_rate": { - "type": "string", - "format": "byte", - "description": "InflationRate is the current inflation rate." - } - }, - "description": "QueryInflationRateResponse is the response type for the Query/InflationRate\nRPC method." - }, - "google.protobuf.Any": { - "type": "object", - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "grpc.gateway.runtime.Error": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/google.protobuf.Any" - } - } - } - } - } -} diff --git a/tmp-swagger-gen/babylon/monitor/v1/query.swagger.json b/tmp-swagger-gen/babylon/monitor/v1/query.swagger.json deleted file mode 100644 index 725408147..000000000 --- a/tmp-swagger-gen/babylon/monitor/v1/query.swagger.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "babylon/monitor/v1/query.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/babylon/monitor/v1/checkpoints/{ckpt_hash}": { - "get": { - "summary": "ReportedCheckpointBtcHeight returns the BTC light client height at which\nthe checkpoint with the given hash is reported back to Babylon", - "operationId": "ReportedCheckpointBtcHeight", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.monitor.v1.QueryReportedCheckpointBtcHeightResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "ckpt_hash", - "description": "ckpt_hash is hex encoded byte string of the hash of the checkpoint", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/monitor/v1/epochs/{epoch_num}": { - "get": { - "summary": "EndedEpochBtcHeight returns the BTC light client height at provided epoch\nfinish", - "operationId": "EndedEpochBtcHeight", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.monitor.v1.QueryEndedEpochBtcHeightResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "epoch_num", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Query" - ] - } - } - }, - "definitions": { - "babylon.monitor.v1.QueryEndedEpochBtcHeightResponse": { - "type": "object", - "properties": { - "btc_light_client_height": { - "type": "integer", - "format": "int64", - "title": "height of btc light client when epoch ended" - } - }, - "title": "QueryEndedEpochBtcHeightResponse defines a response type for\nEndedEpochBtcHeight RPC method" - }, - "babylon.monitor.v1.QueryReportedCheckpointBtcHeightResponse": { - "type": "object", - "properties": { - "btc_light_client_height": { - "type": "integer", - "format": "int64", - "title": "height of btc light client when checkpoint is reported" - } - }, - "title": "QueryReportedCheckpointBtcHeightResponse defines a response type for\nReportedCheckpointBtcHeight RPC method" - }, - "google.protobuf.Any": { - "type": "object", - "properties": { - "type_url": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "grpc.gateway.runtime.Error": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/google.protobuf.Any" - } - } - } - } - } -} diff --git a/tmp-swagger-gen/babylon/zoneconcierge/v1/query.swagger.json b/tmp-swagger-gen/babylon/zoneconcierge/v1/query.swagger.json deleted file mode 100644 index e6bdeb2b7..000000000 --- a/tmp-swagger-gen/babylon/zoneconcierge/v1/query.swagger.json +++ /dev/null @@ -1,950 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "babylon/zoneconcierge/v1/query.proto", - "version": "version not set" - }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/babylon/zoneconcierge/v1/chain_info/{consumer_id}/header/{height}": { - "get": { - "summary": "Header queries the CZ header and fork headers at a given height.", - "operationId": "Header", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryHeaderResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "consumer_id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "height", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/zoneconcierge/v1/chains": { - "get": { - "summary": "ChainList queries the list of chains that checkpoint to Babylon", - "operationId": "ChainList", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryChainListResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/zoneconcierge/v1/chains_info": { - "get": { - "summary": "ChainsInfo queries the latest info for a given list of chains in Babylon's view", - "operationId": "ChainsInfo", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryChainsInfoResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "consumer_ids", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/zoneconcierge/v1/epoch_chains_info": { - "get": { - "summary": "EpochChainsInfo queries the latest info for a list of chains\nin a given epoch in Babylon's view", - "operationId": "EpochChainsInfo", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryEpochChainsInfoResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "epoch_num", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "consumer_ids", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/zoneconcierge/v1/finalized_chain_info/{consumer_id}/height/{height}": { - "get": { - "summary": "FinalizedChainInfoUntilHeight queries the BTC-finalised info no later than\nthe provided CZ height, with proofs", - "operationId": "FinalizedChainInfoUntilHeight", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryFinalizedChainInfoUntilHeightResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "consumer_id", - "description": "consumer_id is the ID of the CZ", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "height", - "description": "height is the height of the CZ chain\nsuch that the returned finalised chain info will be no later than this\nheight", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - }, - { - "name": "prove", - "description": "prove indicates whether the querier wants to get proofs of this timestamp.", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/zoneconcierge/v1/finalized_chains_info": { - "get": { - "summary": "FinalizedChainsInfo queries the BTC-finalised info of chains with given IDs, with proofs", - "operationId": "FinalizedChainsInfo", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryFinalizedChainsInfoResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "consumer_ids", - "description": "consumer_ids is the list of ids of CZs.", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "prove", - "description": "prove indicates whether the querier wants to get proofs of this timestamp.", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/zoneconcierge/v1/headers/{consumer_id}": { - "get": { - "summary": "ListHeaders queries the headers of a chain in Babylon's view, with\npagination support", - "operationId": "ListHeaders", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryListHeadersResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "consumer_id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "pagination.key", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" - }, - { - "name": "pagination.offset", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.limit", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app.", - "in": "query", - "required": false, - "type": "string", - "format": "uint64" - }, - { - "name": "pagination.count_total", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set.", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "pagination.reverse", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43", - "in": "query", - "required": false, - "type": "boolean" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/zoneconcierge/v1/headers/{consumer_id}/epochs/{epoch_num}": { - "get": { - "summary": "ListEpochHeaders queries the headers of a chain timestamped in a given\nepoch of Babylon, with pagination support", - "operationId": "ListEpochHeaders", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryListEpochHeadersResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "parameters": [ - { - "name": "consumer_id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "epoch_num", - "in": "path", - "required": true, - "type": "string", - "format": "uint64" - } - ], - "tags": [ - "Query" - ] - } - }, - "/babylon/zoneconcierge/v1/params": { - "get": { - "summary": "Params queries the parameters of the module.", - "operationId": "Params", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.QueryParamsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/grpc.gateway.runtime.Error" - } - } - }, - "tags": [ - "Query" - ] - } - } - }, - "definitions": { - "babylon.btccheckpoint.v1.SubmissionKey": { - "type": "object", - "properties": { - "key": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.btccheckpoint.v1.TransactionKey" - } - } - }, - "title": "Checkpoint can be composed from multiple transactions, so to identify whole\nsubmission we need list of transaction keys.\nEach submission can generally be identified by this list of (txIdx,\nblockHash) tuples. Note: this could possibly be optimized as if transactions\nwere in one block they would have the same block hash and different indexes,\nbut each blockhash is only 33 (1 byte for prefix encoding and 32 byte hash),\nso there should be other strong arguments for this optimization" - }, - "babylon.btccheckpoint.v1.TransactionInfo": { - "type": "object", - "properties": { - "key": { - "$ref": "#/definitions/babylon.btccheckpoint.v1.TransactionKey", - "description": "key is the position (txIdx, blockHash) of this tx on BTC blockchain\nAlthough it is already a part of SubmissionKey, we store it here again\nto make TransactionInfo self-contained.\nFor example, storing the key allows TransactionInfo to not relay on\nthe fact that TransactionInfo will be ordered in the same order as\nTransactionKeys in SubmissionKey." - }, - "transaction": { - "type": "string", - "format": "byte", - "title": "transaction is the full transaction in bytes" - }, - "proof": { - "type": "string", - "format": "byte", - "title": "proof is the Merkle proof that this tx is included in the position in `key`\nTODO: maybe it could use here better format as we already processed and\nvalidated the proof?" - } - }, - "title": "TransactionInfo is the info of a tx on Bitcoin,\nincluding\n- the position of the tx on BTC blockchain\n- the full tx content\n- the Merkle proof that this tx is on the above position" - }, - "babylon.btccheckpoint.v1.TransactionKey": { - "type": "object", - "properties": { - "index": { - "type": "integer", - "format": "int64" - }, - "hash": { - "type": "string", - "format": "byte" - } - }, - "title": "Each provided OP_RETURN transaction can be identified by hash of block in\nwhich transaction was included and transaction index in the block" - }, - "babylon.checkpointing.v1.RawCheckpoint": { - "type": "object", - "properties": { - "epoch_num": { - "type": "string", - "format": "uint64", - "title": "epoch_num defines the epoch number the raw checkpoint is for" - }, - "block_hash": { - "type": "string", - "format": "byte", - "title": "block_hash defines the 'BlockID.Hash', which is the hash of\nthe block that individual BLS sigs are signed on" - }, - "bitmap": { - "type": "string", - "format": "byte", - "title": "bitmap defines the bitmap that indicates the signers of the BLS multi sig" - }, - "bls_multi_sig": { - "type": "string", - "format": "byte", - "title": "bls_multi_sig defines the multi sig that is aggregated from individual BLS\nsigs" - } - }, - "title": "RawCheckpoint wraps the BLS multi sig with metadata" - }, - "babylon.checkpointing.v1.ValidatorWithBlsKey": { - "type": "object", - "properties": { - "validator_address": { - "type": "string", - "title": "validator_address is the address of the validator" - }, - "bls_pub_key": { - "type": "string", - "format": "byte", - "title": "bls_pub_key is the BLS public key of the validator" - }, - "voting_power": { - "type": "string", - "format": "uint64", - "title": "voting_power is the voting power of the validator at the given epoch" - } - }, - "title": "ValidatorWithBlsKey couples validator address, voting power, and its bls\npublic key" - }, - "babylon.epoching.v1.Epoch": { - "type": "object", - "properties": { - "epoch_number": { - "type": "string", - "format": "uint64", - "title": "epoch_number is the number of this epoch" - }, - "current_epoch_interval": { - "type": "string", - "format": "uint64", - "title": "current_epoch_interval is the epoch interval at the time of this epoch" - }, - "first_block_height": { - "type": "string", - "format": "uint64", - "title": "first_block_height is the height of the first block in this epoch" - }, - "last_block_time": { - "type": "string", - "format": "date-time", - "description": "last_block_time is the time of the last block in this epoch.\nBabylon needs to remember the last header's time of each epoch to complete\nunbonding validators/delegations when a previous epoch's checkpoint is\nfinalised. The last_block_time field is nil in the epoch's beginning, and\nis set upon the end of this epoch." - }, - "sealer_app_hash": { - "type": "string", - "format": "byte", - "title": "sealer is the last block of the sealed epoch\nsealer_app_hash points to the sealer but stored in the 1st header\nof the next epoch" - }, - "sealer_block_hash": { - "type": "string", - "format": "byte", - "title": "sealer_block_hash is the hash of the sealer\nthe validator set has generated a BLS multisig on the hash,\ni.e., hash of the last block in the epoch" - } - }, - "title": "Epoch is a structure that contains the metadata of an epoch" - }, - "babylon.zoneconcierge.v1.ChainInfo": { - "type": "object", - "properties": { - "consumer_id": { - "type": "string", - "title": "consumer_id is the ID of the consumer" - }, - "latest_header": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.IndexedHeader", - "title": "latest_header is the latest header in CZ's canonical chain" - }, - "latest_forks": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.Forks", - "title": "latest_forks is the latest forks, formed as a series of IndexedHeader (from\nlow to high)" - }, - "timestamped_headers_count": { - "type": "string", - "format": "uint64", - "title": "timestamped_headers_count is the number of timestamped headers in CZ's\ncanonical chain" - } - }, - "title": "ChainInfo is the information of a CZ" - }, - "babylon.zoneconcierge.v1.FinalizedChainInfo": { - "type": "object", - "properties": { - "consumer_id": { - "type": "string", - "title": "consumer_id is the ID of the consumer" - }, - "finalized_chain_info": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.ChainInfo", - "title": "finalized_chain_info is the info of the CZ" - }, - "epoch_info": { - "$ref": "#/definitions/babylon.epoching.v1.Epoch", - "title": "epoch_info is the metadata of the last BTC-finalised epoch" - }, - "raw_checkpoint": { - "$ref": "#/definitions/babylon.checkpointing.v1.RawCheckpoint", - "title": "raw_checkpoint is the raw checkpoint of this epoch" - }, - "btc_submission_key": { - "$ref": "#/definitions/babylon.btccheckpoint.v1.SubmissionKey", - "title": "btc_submission_key is position of two BTC txs that include the raw\ncheckpoint of this epoch" - }, - "proof": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.ProofFinalizedChainInfo", - "title": "proof is the proof that the chain info is finalized" - } - }, - "title": "FinalizedChainInfo is the information of a CZ that is BTC-finalised" - }, - "babylon.zoneconcierge.v1.Forks": { - "type": "object", - "properties": { - "headers": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.IndexedHeader" - }, - "title": "blocks is the list of non-canonical indexed headers at the same height" - } - }, - "description": "Forks is a list of non-canonical `IndexedHeader`s at the same height.\nFor example, assuming the following blockchain\n```\nA \u003c- B \u003c- C \u003c- D \u003c- E\n \\ -- D1\n \\ -- D2\n```\nThen the fork will be {[D1, D2]} where each item is in struct `IndexedBlock`.\n\nNote that each `IndexedHeader` in the fork should have a valid quorum\ncertificate. Such forks exist since Babylon considers CZs might have\ndishonest majority. Also note that the IBC-Go implementation will only\nconsider the first header in a fork valid, since the subsequent headers\ncannot be verified without knowing the validator set in the previous header." - }, - "babylon.zoneconcierge.v1.IndexedHeader": { - "type": "object", - "properties": { - "consumer_id": { - "type": "string", - "title": "consumer_id is the unique ID of the consumer" - }, - "hash": { - "type": "string", - "format": "byte", - "title": "hash is the hash of this header" - }, - "height": { - "type": "string", - "format": "uint64", - "title": "height is the height of this header on CZ ledger\n(hash, height) jointly provides the position of the header on CZ ledger" - }, - "time": { - "type": "string", - "format": "date-time", - "title": "time is the timestamp of this header on CZ ledger\nit is needed for CZ to unbond all mature validators/delegations\nbefore this timestamp when this header is BTC-finalised" - }, - "babylon_header_hash": { - "type": "string", - "format": "byte", - "title": "babylon_header_hash is the hash of the babylon block that includes this CZ\nheader" - }, - "babylon_header_height": { - "type": "string", - "format": "uint64", - "title": "babylon_header_height is the height of the babylon block that includes this CZ\nheader" - }, - "babylon_epoch": { - "type": "string", - "format": "uint64", - "title": "epoch is the epoch number of this header on Babylon ledger" - }, - "babylon_tx_hash": { - "type": "string", - "format": "byte", - "title": "babylon_tx_hash is the hash of the tx that includes this header\n(babylon_block_height, babylon_tx_hash) jointly provides the position of\nthe header on Babylon ledger" - } - }, - "title": "IndexedHeader is the metadata of a CZ header" - }, - "babylon.zoneconcierge.v1.Params": { - "type": "object", - "properties": { - "ibc_packet_timeout_seconds": { - "type": "integer", - "format": "int64", - "title": "ibc_packet_timeout_seconds is the time period after which an unrelayed \nIBC packet becomes timeout, measured in seconds" - } - }, - "description": "Params defines the parameters for the module." - }, - "babylon.zoneconcierge.v1.ProofEpochSealed": { - "type": "object", - "properties": { - "validator_set": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.checkpointing.v1.ValidatorWithBlsKey" - }, - "title": "validator_set is the validator set of the sealed epoch\nThis validator set has generated a BLS multisig on `app_hash` of\nthe sealer header" - }, - "proof_epoch_info": { - "$ref": "#/definitions/tendermint.crypto.ProofOps", - "title": "proof_epoch_info is the Merkle proof that the epoch's metadata is committed\nto `app_hash` of the sealer header" - }, - "proof_epoch_val_set": { - "$ref": "#/definitions/tendermint.crypto.ProofOps", - "title": "proof_epoch_info is the Merkle proof that the epoch's validator set is\ncommitted to `app_hash` of the sealer header" - } - }, - "title": "ProofEpochSealed is the proof that an epoch is sealed by the sealer header,\ni.e., the 2nd header of the next epoch With the access of metadata\n- Metadata of this epoch, which includes the sealer header\n- Raw checkpoint of this epoch\nThe verifier can perform the following verification rules:\n- The raw checkpoint's `app_hash` is same as in the sealer header\n- More than 2/3 (in voting power) validators in the validator set of this\nepoch have signed `app_hash` of the sealer header\n- The epoch metadata is committed to the `app_hash` of the sealer header\n- The validator set is committed to the `app_hash` of the sealer header" - }, - "babylon.zoneconcierge.v1.ProofFinalizedChainInfo": { - "type": "object", - "properties": { - "proof_cz_header_in_epoch": { - "$ref": "#/definitions/tendermint.crypto.ProofOps", - "title": "proof_cz_header_in_epoch is the proof that the CZ header is timestamped\nwithin a certain epoch" - }, - "proof_epoch_sealed": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.ProofEpochSealed", - "title": "proof_epoch_sealed is the proof that the epoch is sealed" - }, - "proof_epoch_submitted": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.btccheckpoint.v1.TransactionInfo" - }, - "title": "proof_epoch_submitted is the proof that the epoch's checkpoint is included\nin BTC ledger It is the two TransactionInfo in the best (i.e., earliest)\ncheckpoint submission" - } - }, - "title": "ProofFinalizedChainInfo is a set of proofs that attest a chain info is\nBTC-finalised" - }, - "babylon.zoneconcierge.v1.QueryChainListResponse": { - "type": "object", - "properties": { - "consumer_ids": { - "type": "array", - "items": { - "type": "string" - }, - "title": "consumer_ids are IDs of the chains in ascending alphabetical order" - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "title": "pagination defines the pagination in the response" - } - }, - "title": "QueryChainListResponse is response type for the Query/ChainList RPC method" - }, - "babylon.zoneconcierge.v1.QueryChainsInfoResponse": { - "type": "object", - "properties": { - "chains_info": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.ChainInfo" - } - } - }, - "description": "QueryChainsInfoResponse is response type for the Query/ChainsInfo RPC method." - }, - "babylon.zoneconcierge.v1.QueryEpochChainsInfoResponse": { - "type": "object", - "properties": { - "chains_info": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.ChainInfo" - }, - "title": "chain_info is the info of the CZ" - } - }, - "description": "QueryEpochChainsInfoResponse is response type for the Query/EpochChainsInfo RPC\nmethod." - }, - "babylon.zoneconcierge.v1.QueryFinalizedChainInfoUntilHeightResponse": { - "type": "object", - "properties": { - "finalized_chain_info": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.ChainInfo", - "title": "finalized_chain_info is the info of the CZ" - }, - "epoch_info": { - "$ref": "#/definitions/babylon.epoching.v1.Epoch", - "title": "epoch_info is the metadata of the last BTC-finalised epoch" - }, - "raw_checkpoint": { - "$ref": "#/definitions/babylon.checkpointing.v1.RawCheckpoint", - "title": "raw_checkpoint is the raw checkpoint of this epoch" - }, - "btc_submission_key": { - "$ref": "#/definitions/babylon.btccheckpoint.v1.SubmissionKey", - "title": "btc_submission_key is position of two BTC txs that include the raw\ncheckpoint of this epoch" - }, - "proof": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.ProofFinalizedChainInfo", - "title": "proof is the proof that the chain info is finalized" - } - }, - "description": "QueryFinalizedChainInfoUntilHeightResponse is response type for the\nQuery/FinalizedChainInfoUntilHeight RPC method." - }, - "babylon.zoneconcierge.v1.QueryFinalizedChainsInfoResponse": { - "type": "object", - "properties": { - "finalized_chains_info": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.FinalizedChainInfo" - } - } - }, - "description": "QueryFinalizedChainsInfoResponse is response type for the\nQuery/FinalizedChainsInfo RPC method." - }, - "babylon.zoneconcierge.v1.QueryHeaderResponse": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.IndexedHeader" - }, - "fork_headers": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.Forks" - } - }, - "description": "QueryHeaderResponse is response type for the Query/Header RPC method." - }, - "babylon.zoneconcierge.v1.QueryListEpochHeadersResponse": { - "type": "object", - "properties": { - "headers": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.IndexedHeader" - }, - "title": "headers is the list of headers" - } - }, - "description": "QueryListEpochHeadersResponse is response type for the Query/ListEpochHeaders\nRPC method." - }, - "babylon.zoneconcierge.v1.QueryListHeadersResponse": { - "type": "object", - "properties": { - "headers": { - "type": "array", - "items": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.IndexedHeader" - }, - "title": "headers is the list of headers" - }, - "pagination": { - "$ref": "#/definitions/cosmos.base.query.v1beta1.PageResponse", - "title": "pagination defines the pagination in the response" - } - }, - "description": "QueryListHeadersResponse is response type for the Query/ListHeaders RPC\nmethod." - }, - "babylon.zoneconcierge.v1.QueryParamsResponse": { - "type": "object", - "properties": { - "params": { - "$ref": "#/definitions/babylon.zoneconcierge.v1.Params", - "description": "params holds all the parameters of this module." - } - }, - "description": "QueryParamsResponse is the response type for the Query/Params RPC method." - }, - "cosmos.base.query.v1beta1.PageRequest": { - "type": "object", - "properties": { - "key": { - "type": "string", - "format": "byte", - "description": "key is a value returned in PageResponse.next_key to begin\nquerying the next page most efficiently. Only one of offset or key\nshould be set." - }, - "offset": { - "type": "string", - "format": "uint64", - "description": "offset is a numeric offset that can be used when key is unavailable.\nIt is less efficient than using key. Only one of offset or key should\nbe set." - }, - "limit": { - "type": "string", - "format": "uint64", - "description": "limit is the total number of results to be returned in the result page.\nIf left empty it will default to a value to be set by each app." - }, - "count_total": { - "type": "boolean", - "description": "count_total is set to true to indicate that the result set should include\na count of the total number of items available for pagination in UIs.\ncount_total is only respected when offset is used. It is ignored when key\nis set." - }, - "reverse": { - "type": "boolean", - "description": "reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43" - } - }, - "description": "message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }", - "title": "PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:" - }, - "cosmos.base.query.v1beta1.PageResponse": { - "type": "object", - "properties": { - "next_key": { - "type": "string", - "format": "byte", - "description": "next_key is the key to be passed to PageRequest.key to\nquery the next page most efficiently. It will be empty if\nthere are no more results." - }, - "total": { - "type": "string", - "format": "uint64", - "title": "total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise" - } - }, - "description": "PageResponse is to be embedded in gRPC response messages where the\ncorresponding request message has used PageRequest.\n\n message SomeResponse {\n repeated Bar results = 1;\n PageResponse page = 2;\n }" - }, - "google.protobuf.Any": { - "type": "object", - "properties": { - "type_url": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "grpc.gateway.runtime.Error": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/google.protobuf.Any" - } - } - } - }, - "tendermint.crypto.ProofOp": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "key": { - "type": "string", - "format": "byte" - }, - "data": { - "type": "string", - "format": "byte" - } - }, - "title": "ProofOp defines an operation used for calculating Merkle root\nThe data could be arbitrary format, providing nessecary data\nfor example neighbouring node hash" - }, - "tendermint.crypto.ProofOps": { - "type": "object", - "properties": { - "ops": { - "type": "array", - "items": { - "$ref": "#/definitions/tendermint.crypto.ProofOp" - } - } - }, - "title": "ProofOps is Merkle proof defined by the list of ProofOps" - } - } -} From 62120b1be8fd7682bf676b88639a3160801e09eb Mon Sep 17 00:00:00 2001 From: Runchao Han Date: Tue, 21 Jan 2025 11:49:42 +1100 Subject: [PATCH 3/4] fix comments --- x/btccheckpoint/client/cli/tx.go | 2 +- x/btcstaking/keeper/finality_providers.go | 2 ++ x/btcstkconsumer/client/cli/tx.go | 14 ++++---- .../keeper/finality_provider_registry.go | 16 --------- x/btcstkconsumer/keeper/query.go | 7 ---- x/btcstkconsumer/types/errors.go | 9 +++-- x/btcstkconsumer/types/expected_keepers.go | 2 -- x/btcstkconsumer/types/genesis.go | 3 -- x/btcstkconsumer/types/types.go | 1 - x/checkpointing/client/cli/tx.go | 3 +- x/epoching/keeper/modified_staking.go | 2 ++ x/epoching/types/genesis.go | 3 -- x/finality/client/cli/tx.go | 35 +++++++++++++++++++ x/mint/abci.go | 1 + x/zoneconcierge/client/cli/tx.go | 4 +-- x/zoneconcierge/keeper/grpc_query.go | 3 ++ .../keeper/ibc_header_decorator.go | 7 ++++ x/zoneconcierge/module_ibc.go | 16 ++------- 18 files changed, 67 insertions(+), 63 deletions(-) delete mode 100644 x/btcstkconsumer/keeper/query.go delete mode 100644 x/btcstkconsumer/types/types.go diff --git a/x/btccheckpoint/client/cli/tx.go b/x/btccheckpoint/client/cli/tx.go index d463dd636..6a28ea957 100644 --- a/x/btccheckpoint/client/cli/tx.go +++ b/x/btccheckpoint/client/cli/tx.go @@ -2,13 +2,13 @@ package cli import ( "fmt" + "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" - // "github.com/cosmos/cosmos-sdk/client/flags" "github.com/babylonlabs-io/babylon/x/btccheckpoint/types" ) diff --git a/x/btcstaking/keeper/finality_providers.go b/x/btcstaking/keeper/finality_providers.go index 8a7bc9a15..09b749869 100644 --- a/x/btcstaking/keeper/finality_providers.go +++ b/x/btcstaking/keeper/finality_providers.go @@ -202,6 +202,8 @@ func (k Keeper) PropagateFPSlashingToConsumers(ctx context.Context, fpBTCPK *bbn consumerID, exists := fpToConsumerMap[fpBTCPKHex] if !exists { // If not in map, check if it's a Babylon FP or get its consumer + // TODO: avoid querying GetFinalityProvider again by passing the result + // https://github.com/babylonlabs-io/babylon/blob/873f1232365573a97032037af4ac99b5e3fcada8/x/btcstaking/keeper/btc_delegators.go#L79 to this function if _, err := k.GetFinalityProvider(ctx, delegationFPBTCPK); err == nil { continue // It's a Babylon FP, skip } else if consumerID, err = k.BscKeeper.GetConsumerOfFinalityProvider(ctx, &delegationFPBTCPK); err == nil { diff --git a/x/btcstkconsumer/client/cli/tx.go b/x/btcstkconsumer/client/cli/tx.go index 89114187a..fd2965dd5 100644 --- a/x/btcstkconsumer/client/cli/tx.go +++ b/x/btcstkconsumer/client/cli/tx.go @@ -33,10 +33,11 @@ func GetTxCmd() *cobra.Command { func NewRegisterConsumerCmd() *cobra.Command { cmd := &cobra.Command{ Use: "register-consumer [description]", - Args: cobra.RangeArgs(2, 3), - Short: "Registers a CZ consumer", + Args: cobra.ExactArgs(3), + Short: "Registers a consumer", Long: strings.TrimSpace( - `Registers a CZ consumer.`, + `Registers a consumer with Babylon. The consumer-id must be unique and will be used to identify this consumer. + The name and optional description help identify the purpose of this consumer.`, ), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) @@ -44,7 +45,6 @@ func NewRegisterConsumerCmd() *cobra.Command { return err } - // get description consumerId := args[0] if consumerId == "" { return fmt.Errorf("consumer's id cannot be empty") @@ -53,9 +53,9 @@ func NewRegisterConsumerCmd() *cobra.Command { if name == "" { return fmt.Errorf("consumer's name cannot be empty") } - description := "" - if len(args) == 3 { - description = args[2] + description := args[2] + if description == "" { + return fmt.Errorf("consumer's description cannot be empty") } msg := types.MsgRegisterConsumer{ diff --git a/x/btcstkconsumer/keeper/finality_provider_registry.go b/x/btcstkconsumer/keeper/finality_provider_registry.go index a9635478e..d6e7f975c 100644 --- a/x/btcstkconsumer/keeper/finality_provider_registry.go +++ b/x/btcstkconsumer/keeper/finality_provider_registry.go @@ -54,22 +54,6 @@ func (k Keeper) GetConsumerOfFinalityProvider(ctx context.Context, fpBTCPK *bbn. return string(chainID), nil } -// IterateFPs iterates over all finality providers for a given chain -func (k Keeper) IterateFPs(ctx context.Context, chainId string, handler func(fp *btcstaking.FinalityProvider) bool) { - // filter out all finality providers with positive voting power - fpIter := k.finalityProviderStore(ctx, chainId).Iterator(nil, nil) - defer fpIter.Close() - for ; fpIter.Valid(); fpIter.Next() { - var fp btcstaking.FinalityProvider - k.cdc.MustUnmarshal(fpIter.Value(), &fp) - - shouldContinue := handler(&fp) - if !shouldContinue { - return - } - } -} - // finalityProviderStore returns the KVStore of the finality provider set per chain // prefix: ConsumerFinalityProviderKey || chain id // key: Bitcoin PubKey diff --git a/x/btcstkconsumer/keeper/query.go b/x/btcstkconsumer/keeper/query.go deleted file mode 100644 index 8f1684a08..000000000 --- a/x/btcstkconsumer/keeper/query.go +++ /dev/null @@ -1,7 +0,0 @@ -package keeper - -import ( - "github.com/babylonlabs-io/babylon/x/btcstkconsumer/types" -) - -var _ types.QueryServer = Keeper{} diff --git a/x/btcstkconsumer/types/errors.go b/x/btcstkconsumer/types/errors.go index 256662dde..752b7bf92 100644 --- a/x/btcstkconsumer/types/errors.go +++ b/x/btcstkconsumer/types/errors.go @@ -10,9 +10,8 @@ import ( var ( ErrInvalidSigner = sdkerrors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message") ErrConsumerNotRegistered = sdkerrors.Register(ModuleName, 1101, "consumer not registered") - ErrInvalidConsumerRegister = sdkerrors.Register(ModuleName, 1102, "invalid consumer register") - ErrConsumerAlreadyRegistered = sdkerrors.Register(ModuleName, 1103, "consumer already registered") - ErrInvalidConsumerIDs = sdkerrors.Register(ModuleName, 1104, "consumer ids contain duplicates or empty strings") - ErrInvalidCosmosConsumerRequest = sdkerrors.Register(ModuleName, 1105, "invalid registration request of Cosmos consumer") - ErrInvalidETHL2ConsumerRequest = sdkerrors.Register(ModuleName, 1106, "invalid registration request of ETH L2 consumer") + ErrConsumerAlreadyRegistered = sdkerrors.Register(ModuleName, 1102, "consumer already registered") + ErrInvalidConsumerIDs = sdkerrors.Register(ModuleName, 1103, "consumer ids contain duplicates or empty strings") + ErrInvalidCosmosConsumerRequest = sdkerrors.Register(ModuleName, 1104, "invalid registration request of Cosmos consumer") + ErrInvalidETHL2ConsumerRequest = sdkerrors.Register(ModuleName, 1105, "invalid registration request of ETH L2 consumer") ) diff --git a/x/btcstkconsumer/types/expected_keepers.go b/x/btcstkconsumer/types/expected_keepers.go index 0892050a0..e8e0862b4 100644 --- a/x/btcstkconsumer/types/expected_keepers.go +++ b/x/btcstkconsumer/types/expected_keepers.go @@ -10,13 +10,11 @@ import ( // AccountKeeper defines the expected interface for the Account module. type AccountKeeper interface { - GetAccount(context.Context, sdk.AccAddress) sdk.AccountI // only used for simulation // Methods imported from account should be defined here } // BankKeeper defines the expected interface for the Bank module. type BankKeeper interface { - SpendableCoins(context.Context, sdk.AccAddress) sdk.Coins // Methods imported from bank should be defined here } diff --git a/x/btcstkconsumer/types/genesis.go b/x/btcstkconsumer/types/genesis.go index bdb9f4151..9d633ecd7 100644 --- a/x/btcstkconsumer/types/genesis.go +++ b/x/btcstkconsumer/types/genesis.go @@ -1,8 +1,5 @@ package types -// DefaultIndex is the default global index -const DefaultIndex uint64 = 1 - // DefaultGenesis returns the default genesis state func DefaultGenesis() *GenesisState { return &GenesisState{ diff --git a/x/btcstkconsumer/types/types.go b/x/btcstkconsumer/types/types.go deleted file mode 100644 index ab1254f4c..000000000 --- a/x/btcstkconsumer/types/types.go +++ /dev/null @@ -1 +0,0 @@ -package types diff --git a/x/checkpointing/client/cli/tx.go b/x/checkpointing/client/cli/tx.go index 8de4578b0..c72356930 100644 --- a/x/checkpointing/client/cli/tx.go +++ b/x/checkpointing/client/cli/tx.go @@ -16,9 +16,8 @@ import ( cosmoscli "github.com/cosmos/cosmos-sdk/x/staking/client/cli" "github.com/spf13/cobra" - "github.com/cosmos/cosmos-sdk/client" - // "github.com/cosmos/cosmos-sdk/client/flags" "github.com/babylonlabs-io/babylon/x/checkpointing/types" + "github.com/cosmos/cosmos-sdk/client" ) // GetTxCmd returns the transaction commands for this module diff --git a/x/epoching/keeper/modified_staking.go b/x/epoching/keeper/modified_staking.go index d0b122c11..a59c821aa 100644 --- a/x/epoching/keeper/modified_staking.go +++ b/x/epoching/keeper/modified_staking.go @@ -81,6 +81,7 @@ func (k Keeper) ApplyMatureUnbonding(ctx context.Context, epochNumber uint64) { panic(err) } + // TODO: emit typed event currentSdkCtx.EventManager().EmitEvent( sdk.NewEvent( stakingtypes.EventTypeCompleteUnbonding, @@ -135,6 +136,7 @@ func (k Keeper) ApplyMatureUnbonding(ctx context.Context, epochNumber uint64) { panic(err) } + // TODO: emit typed event currentSdkCtx.EventManager().EmitEvent( sdk.NewEvent( stakingtypes.EventTypeCompleteRedelegation, diff --git a/x/epoching/types/genesis.go b/x/epoching/types/genesis.go index 2b7ca883f..ebbc08ed8 100644 --- a/x/epoching/types/genesis.go +++ b/x/epoching/types/genesis.go @@ -1,8 +1,5 @@ package types -// DefaultIndex is the default capability global index -const DefaultIndex uint64 = 1 - // DefaultGenesis returns the default Capability genesis state func DefaultGenesis() *GenesisState { return &GenesisState{ diff --git a/x/finality/client/cli/tx.go b/x/finality/client/cli/tx.go index 384d87448..04dfffa3c 100644 --- a/x/finality/client/cli/tx.go +++ b/x/finality/client/cli/tx.go @@ -28,6 +28,7 @@ func GetTxCmd() *cobra.Command { cmd.AddCommand( NewCommitPubRandListCmd(), NewAddFinalitySigCmd(), + NewUnjailFinalityProviderCmd(), ) return cmd @@ -165,3 +166,37 @@ func NewAddFinalitySigCmd() *cobra.Command { return cmd } + +func NewUnjailFinalityProviderCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "unjail-finality-provider [fp_btc_pk]", + Args: cobra.ExactArgs(1), + Short: "Unjail a jailed finality provider", + Long: strings.TrimSpace( + `Unjail a jailed finality provider.`, + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + // get finality provider BTC PK + fpBTCPK, err := bbn.NewBIP340PubKeyFromHex(args[0]) + if err != nil { + return err + } + + msg := types.MsgUnjailFinalityProvider{ + Signer: clientCtx.FromAddress.String(), + FpBtcPk: fpBTCPK, + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/mint/abci.go b/x/mint/abci.go index dcb7257e1..e4adbbaf8 100644 --- a/x/mint/abci.go +++ b/x/mint/abci.go @@ -82,6 +82,7 @@ func mintBlockProvision(ctx context.Context, k keeper.Keeper) { defer telemetry.ModuleSetGauge(types.ModuleName, float32(toMintCoin.Amount.Int64()), "minted_tokens") } + // TODO: emit typed event sdkCtx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeMint, diff --git a/x/zoneconcierge/client/cli/tx.go b/x/zoneconcierge/client/cli/tx.go index 23bd93b94..7d69d4419 100644 --- a/x/zoneconcierge/client/cli/tx.go +++ b/x/zoneconcierge/client/cli/tx.go @@ -2,11 +2,11 @@ package cli import ( "fmt" + "github.com/spf13/cobra" - "github.com/cosmos/cosmos-sdk/client" - // "github.com/cosmos/cosmos-sdk/client/flags" "github.com/babylonlabs-io/babylon/x/zoneconcierge/types" + "github.com/cosmos/cosmos-sdk/client" ) // GetTxCmd returns the transaction commands for this module diff --git a/x/zoneconcierge/keeper/grpc_query.go b/x/zoneconcierge/keeper/grpc_query.go index 5b0e7ee62..8df7f9232 100644 --- a/x/zoneconcierge/keeper/grpc_query.go +++ b/x/zoneconcierge/keeper/grpc_query.go @@ -72,6 +72,7 @@ func (k Keeper) ChainsInfo(c context.Context, req *types.QueryChainsInfoRequest) ctx := sdk.UnwrapSDKContext(c) var chainsInfo []*types.ChainInfo + // TODO: paginate this for loop for _, ConsumerId := range req.ConsumerIds { chainInfo, err := k.GetChainInfo(ctx, ConsumerId) if err != nil { @@ -133,6 +134,7 @@ func (k Keeper) EpochChainsInfo(c context.Context, req *types.QueryEpochChainsIn ctx := sdk.UnwrapSDKContext(c) var chainsInfo []*types.ChainInfo + // TODO: paginate this for loop for _, ConsumerId := range req.ConsumerIds { // check if chain ID is valid if !k.HasChainInfo(ctx, ConsumerId) { @@ -239,6 +241,7 @@ func (k Keeper) FinalizedChainsInfo(c context.Context, req *types.QueryFinalized // find the last finalised epoch lastFinalizedEpoch := k.GetLastFinalizedEpoch(ctx) + // TODO: paginate this for loop for _, ConsumerId := range req.ConsumerIds { // check if chain ID is valid if !k.HasChainInfo(ctx, ConsumerId) { diff --git a/x/zoneconcierge/keeper/ibc_header_decorator.go b/x/zoneconcierge/keeper/ibc_header_decorator.go index 930f33e6e..df74ac0d6 100644 --- a/x/zoneconcierge/keeper/ibc_header_decorator.go +++ b/x/zoneconcierge/keeper/ibc_header_decorator.go @@ -22,6 +22,7 @@ func NewIBCHeaderDecorator(k Keeper) *IBCHeaderDecorator { } } +// getHeaderAndClientState extracts the header info and client state from an IBC update client message func (d *IBCHeaderDecorator) getHeaderAndClientState(ctx sdk.Context, m sdk.Msg) (*types.HeaderInfo, *ibctmtypes.ClientState) { // ensure the message is MsgUpdateClient msgUpdateClient, ok := m.(*clienttypes.MsgUpdateClient) @@ -62,6 +63,12 @@ func (d *IBCHeaderDecorator) getHeaderAndClientState(ctx sdk.Context, m sdk.Msg) return headerInfo, cmtClientState } +// PostHandle processes IBC client update messages after they are executed. For each message: +// - Extracts header info and client state if it's a valid IBC client update message +// - Determines if the header is a fork header by checking if client is frozen +// - Handles the header appropriately via HandleHeaderWithValidCommit +// - Unfreezes client if it was frozen due to a fork header +// Only runs during block finalization or tx simulation, and only for successful txs. func (d *IBCHeaderDecorator) PostHandle(ctx sdk.Context, tx sdk.Tx, simulate, success bool, next sdk.PostHandler) (sdk.Context, error) { // only do this when finalizing a block or simulating the current tx if ctx.ExecMode() != sdk.ExecModeFinalize && !simulate { diff --git a/x/zoneconcierge/module_ibc.go b/x/zoneconcierge/module_ibc.go index c74c92fc8..4225a177c 100644 --- a/x/zoneconcierge/module_ibc.go +++ b/x/zoneconcierge/module_ibc.go @@ -217,16 +217,10 @@ func (im IBCModule) OnAcknowledgementPacket( } } - // // TODO (Babylon): Dispatch and process packet - // switch packet := modulePacketData.Packet.(type) { - // default: - // errMsg := fmt.Sprintf("unrecognized %s packet type: %T", types.ModuleName, packet) - // return errorsmod.Wrap(sdkerrors.ErrUnknownRequest, errMsg) - // } - switch resp := ack.Response.(type) { case *channeltypes.Acknowledgement_Result: im.keeper.Logger(ctx).Info("received an Acknowledgement message", "result", string(resp.Result)) + // TODO: emit typed event ctx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeAck, @@ -236,6 +230,7 @@ func (im IBCModule) OnAcknowledgementPacket( ) case *channeltypes.Acknowledgement_Error: im.keeper.Logger(ctx).Error("received an Acknowledgement error message", "error", resp.Error) + // TODO: emit typed event ctx.EventManager().EmitEvent( sdk.NewEvent( types.EventTypeAck, @@ -259,13 +254,6 @@ func (im IBCModule) OnTimeoutPacket( return errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal packet data: %s", err.Error()) } - // // TODO (Babylon): Dispatch and process packet - // switch packet := modulePacketData.Packet.(type) { - // default: - // errMsg := fmt.Sprintf("unrecognized %s packet type: %T", types.ModuleName, packet) - // return errorsmod.Wrap(sdkerrors.ErrUnknownRequest, errMsg) - // } - // TODO: close channel upon timeout return nil From 1e825db167b72efc5468fff24799606bf4ef91e2 Mon Sep 17 00:00:00 2001 From: Runchao Han Date: Tue, 21 Jan 2025 14:24:18 +1100 Subject: [PATCH 4/4] let reward dist only concern Babylon FPs --- x/finality/keeper/power_dist_change.go | 28 +++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/x/finality/keeper/power_dist_change.go b/x/finality/keeper/power_dist_change.go index 75e602163..83ff5d8f7 100644 --- a/x/finality/keeper/power_dist_change.go +++ b/x/finality/keeper/power_dist_change.go @@ -210,6 +210,10 @@ func (k Keeper) ProcessAllPowerDistUpdateEvents( // add the BTC delegation to each restaked finality provider for _, fpBTCPK := range btcDel.FpBtcPkList { fpBTCPKHex := fpBTCPK.MarshalHex() + if !k.BTCStakingKeeper.HasFinalityProvider(ctx, fpBTCPK) { + // This is a consumer FP rather than Babylon FP, skip it + continue + } activedSatsByFpBtcPk[fpBTCPKHex] = append(activedSatsByFpBtcPk[fpBTCPKHex], btcDel.TotalSat) } @@ -338,6 +342,10 @@ func (k Keeper) ProcessAllPowerDistUpdateEvents( for _, fpBTCPKHex := range fpActiveBtcPkHexList { // get the finality provider and initialise its dist info newFP := k.loadFP(ctx, fpByBtcPkHex, fpBTCPKHex) + if newFP == nil { + // This is a consumer FP rather than Babylon FP, skip it + continue + } fpDistInfo := ftypes.NewFinalityProviderDistInfo(newFP) // check for jailing cases @@ -379,6 +387,10 @@ func (k Keeper) processPowerDistUpdateEventUnbond( ) { for _, fpBTCPK := range btcDel.FpBtcPkList { fpBTCPKHex := fpBTCPK.MarshalHex() + if !k.BTCStakingKeeper.HasFinalityProvider(ctx, fpBTCPK) { + // This is a consumer FP rather than Babylon FP, skip it + continue + } unbondedSatsByFpBtcPk[fpBTCPKHex] = append(unbondedSatsByFpBtcPk[fpBTCPKHex], btcDel.TotalSat) } k.processRewardTracker(ctx, cacheFpByBtcPkHex, btcDel, func(fp, del sdk.AccAddress, sats uint64) { @@ -416,9 +428,13 @@ func (k Keeper) votingPowerDistCacheStore(ctx context.Context) prefix.Store { return prefix.NewStore(storeAdapter, ftypes.VotingPowerDistCacheKey) } -// processRewardTracker loads the fps from inside the btc delegation -// with cache and executes the function by passing the fp, delegator address +// processRewardTracker loads Babylon FPs from the given BTC delegation +// and executes the given function over each Babylon FP, delegator address // and satoshi amounts. +// NOTE: +// - The function will only be executed over Babylon FPs but not consumer FPs +// - The function makes uses of the fpByBtcPkHex cache, and the cache only +// contains Babylon FPs but not consumer FPs func (k Keeper) processRewardTracker( ctx context.Context, fpByBtcPkHex map[string]*types.FinalityProvider, @@ -428,6 +444,10 @@ func (k Keeper) processRewardTracker( delAddr := sdk.MustAccAddressFromBech32(btcDel.StakerAddr) for _, fpBTCPK := range btcDel.FpBtcPkList { fp := k.loadFP(ctx, fpByBtcPkHex, fpBTCPK.MarshalHex()) + if fp == nil { + // This is a consumer FP rather than Babylon FP, skip it + continue + } f(fp.Address(), delAddr, btcDel.TotalSat) } } @@ -463,7 +483,9 @@ func (k Keeper) loadFP( } fp, err = k.BTCStakingKeeper.GetFinalityProvider(ctx, *fpBTCPK) if err != nil { - panic(err) // only programming error + // This is a consumer FP, return nil and the caller shall + // skip it + return nil } cacheFpByBtcPkHex[fpBTCPKHex] = fp }