From 51c9ff1e43fe608315ae98893fc8f3935f7f5839 Mon Sep 17 00:00:00 2001 From: yusufozmis Date: Sat, 22 Aug 2026 12:36:09 +0300 Subject: [PATCH 01/51] feat: introduce smart account module --- abci/payload.pb.go | 5 +- abci/query.pb.go | 7 +- app/ante/types/tx_auth.pb.go | 5 +- app/app.go | 3 + app/app_config.go | 13 +- buf.lock | 4 +- common/validator_entry.pb.go | 3 +- docs/static/openapi.json | 2 +- .../pulsarchain/bridge/v1/bridge_state.proto | 1 - .../smartaccounts/module/v1/module.proto | 15 + .../smartaccounts/v1/genesis.proto | 17 + .../pulsarchain/smartaccounts/v1/params.proto | 13 + .../pulsarchain/smartaccounts/v1/query.proto | 30 + proto/pulsarchain/smartaccounts/v1/tx.proto | 40 ++ proto/pulsarchain/verification/v1/query.proto | 5 +- x/bridge/types/action.pb.go | 3 +- x/bridge/types/actions_root_snapshot.pb.go | 7 +- x/bridge/types/bridge_state.pb.go | 3 +- x/bridge/types/genesis.pb.go | 7 +- x/bridge/types/module.pb.go | 5 +- x/bridge/types/params.pb.go | 7 +- x/bridge/types/query.pb.go | 7 +- x/bridge/types/tx.pb.go | 7 +- x/keyregistry/types/actor_type.pb.go | 3 +- x/keyregistry/types/genesis.pb.go | 7 +- .../types/key_signing_operation.pb.go | 3 +- x/keyregistry/types/module.pb.go | 5 +- x/keyregistry/types/params.pb.go | 7 +- x/keyregistry/types/public_key_pair.pb.go | 3 +- x/keyregistry/types/query.pb.go | 7 +- .../registered_validator_set_entry.pb.go | 3 +- x/keyregistry/types/tx.pb.go | 7 +- x/smartaccounts/keeper/genesis.go | 25 + x/smartaccounts/keeper/genesis_test.go | 24 + x/smartaccounts/keeper/keeper.go | 60 ++ x/smartaccounts/keeper/keeper_test.go | 56 ++ x/smartaccounts/keeper/msg_server.go | 17 + x/smartaccounts/keeper/msg_update_params.go | 32 + .../keeper/msg_update_params_test.go | 68 ++ x/smartaccounts/keeper/query.go | 17 + x/smartaccounts/keeper/query_params.go | 26 + x/smartaccounts/keeper/query_params_test.go | 22 + x/smartaccounts/module/autocli.go | 33 + x/smartaccounts/module/depinject.go | 62 ++ x/smartaccounts/module/module.go | 143 +++++ x/smartaccounts/module/simulation.go | 34 + x/smartaccounts/types/codec.go | 14 + x/smartaccounts/types/errors.go | 12 + x/smartaccounts/types/expected_keepers.go | 27 + x/smartaccounts/types/genesis.go | 14 + x/smartaccounts/types/genesis.pb.go | 328 ++++++++++ x/smartaccounts/types/genesis_test.go | 37 ++ x/smartaccounts/types/keys.go | 19 + x/smartaccounts/types/module.pb.go | 325 ++++++++++ x/smartaccounts/types/params.go | 17 + x/smartaccounts/types/params.pb.go | 293 +++++++++ x/smartaccounts/types/query.pb.go | 545 ++++++++++++++++ x/smartaccounts/types/query.pb.gw.go | 153 +++++ x/smartaccounts/types/tx.pb.go | 603 ++++++++++++++++++ x/smartaccounts/types/types.go | 1 + .../sidecar/api/v1/verification_service.pb.go | 7 +- x/verification/types/genesis.pb.go | 7 +- x/verification/types/module.pb.go | 5 +- x/verification/types/params.pb.go | 7 +- x/verification/types/query.pb.go | 7 +- x/verification/types/tx.pb.go | 7 +- x/verification/types/types.pb.go | 7 +- x/verification/types/vote_extension.pb.go | 5 +- x/votepersistence/types/genesis.pb.go | 7 +- x/votepersistence/types/module.pb.go | 5 +- x/votepersistence/types/params.pb.go | 7 +- x/votepersistence/types/query.pb.go | 7 +- x/votepersistence/types/tx.pb.go | 7 +- x/votepersistence/types/vote_ext_body.pb.go | 3 +- 74 files changed, 3258 insertions(+), 91 deletions(-) create mode 100644 proto/pulsarchain/smartaccounts/module/v1/module.proto create mode 100644 proto/pulsarchain/smartaccounts/v1/genesis.proto create mode 100644 proto/pulsarchain/smartaccounts/v1/params.proto create mode 100644 proto/pulsarchain/smartaccounts/v1/query.proto create mode 100644 proto/pulsarchain/smartaccounts/v1/tx.proto create mode 100644 x/smartaccounts/keeper/genesis.go create mode 100644 x/smartaccounts/keeper/genesis_test.go create mode 100644 x/smartaccounts/keeper/keeper.go create mode 100644 x/smartaccounts/keeper/keeper_test.go create mode 100644 x/smartaccounts/keeper/msg_server.go create mode 100644 x/smartaccounts/keeper/msg_update_params.go create mode 100644 x/smartaccounts/keeper/msg_update_params_test.go create mode 100644 x/smartaccounts/keeper/query.go create mode 100644 x/smartaccounts/keeper/query_params.go create mode 100644 x/smartaccounts/keeper/query_params_test.go create mode 100644 x/smartaccounts/module/autocli.go create mode 100644 x/smartaccounts/module/depinject.go create mode 100644 x/smartaccounts/module/module.go create mode 100644 x/smartaccounts/module/simulation.go create mode 100644 x/smartaccounts/types/codec.go create mode 100644 x/smartaccounts/types/errors.go create mode 100644 x/smartaccounts/types/expected_keepers.go create mode 100644 x/smartaccounts/types/genesis.go create mode 100644 x/smartaccounts/types/genesis.pb.go create mode 100644 x/smartaccounts/types/genesis_test.go create mode 100644 x/smartaccounts/types/keys.go create mode 100644 x/smartaccounts/types/module.pb.go create mode 100644 x/smartaccounts/types/params.go create mode 100644 x/smartaccounts/types/params.pb.go create mode 100644 x/smartaccounts/types/query.pb.go create mode 100644 x/smartaccounts/types/query.pb.gw.go create mode 100644 x/smartaccounts/types/tx.pb.go create mode 100644 x/smartaccounts/types/types.go diff --git a/abci/payload.pb.go b/abci/payload.pb.go index b077d92a..5a117aa2 100644 --- a/abci/payload.pb.go +++ b/abci/payload.pb.go @@ -5,11 +5,12 @@ package abci import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - types "github.com/node101-io/pulsar-chain/x/verification/types" io "io" math "math" math_bits "math/bits" + + proto "github.com/cosmos/gogoproto/proto" + types "github.com/node101-io/pulsar-chain/x/verification/types" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/abci/query.pb.go b/abci/query.pb.go index 02f2665a..0d2c409f 100644 --- a/abci/query.pb.go +++ b/abci/query.pb.go @@ -6,6 +6,10 @@ package abci import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" common "github.com/node101-io/pulsar-chain/common" @@ -14,9 +18,6 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/app/ante/types/tx_auth.pb.go b/app/ante/types/tx_auth.pb.go index 03c7af3b..08eface7 100644 --- a/app/ante/types/tx_auth.pb.go +++ b/app/ante/types/tx_auth.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/app/app.go b/app/app.go index c2cae036..f6192b46 100644 --- a/app/app.go +++ b/app/app.go @@ -58,6 +58,7 @@ import ( "github.com/node101-io/pulsar-chain/docs" bridge "github.com/node101-io/pulsar-chain/x/bridge/keeper" keyregistrymodulekeeper "github.com/node101-io/pulsar-chain/x/keyregistry/keeper" + smartaccountsmodulekeeper "github.com/node101-io/pulsar-chain/x/smartaccounts/keeper" verificationmodulekeeper "github.com/node101-io/pulsar-chain/x/verification/keeper" verificationsidecar "github.com/node101-io/pulsar-chain/x/verification/sidecar" votepersistencemodulekeeper "github.com/node101-io/pulsar-chain/x/votepersistence/keeper" @@ -127,6 +128,7 @@ type App struct { // VerificationSidecarClient is non-nil only when the app created the gRPC // client itself; retaining it here gives App.Close lifecycle ownership. VerificationSidecarClient *verificationsidecar.Client + SmartaccountsKeeper smartaccountsmodulekeeper.Keeper } // RegisterGRPCServerWithSkipCheckHeader registers application and standard health services. @@ -218,6 +220,7 @@ func New( &app.BridgeKeeper, &app.VerificationKeeper, &app.BridgeArchiveWrapperClient, + &app.SmartaccountsKeeper, ); err != nil { panic(err) } diff --git a/app/app_config.go b/app/app_config.go index 406d70a6..1c1fbd29 100644 --- a/app/app_config.go +++ b/app/app_config.go @@ -7,6 +7,8 @@ import ( bridgemoduletypes "github.com/node101-io/pulsar-chain/x/bridge/types" _ "github.com/node101-io/pulsar-chain/x/keyregistry/module" keyregistrymoduletypes "github.com/node101-io/pulsar-chain/x/keyregistry/types" + _ "github.com/node101-io/pulsar-chain/x/smartaccounts/module" + smartaccountsmoduletypes "github.com/node101-io/pulsar-chain/x/smartaccounts/types" _ "github.com/node101-io/pulsar-chain/x/verification/module" verificationmoduletypes "github.com/node101-io/pulsar-chain/x/verification/types" _ "github.com/node101-io/pulsar-chain/x/votepersistence/module" @@ -136,7 +138,7 @@ var ( // chain modules keyregistrymoduletypes.ModuleName, votepersistencemoduletypes.ModuleName, - }, + smartaccountsmoduletypes.ModuleName}, EndBlockers: []string{ govtypes.ModuleName, stakingtypes.ModuleName, @@ -147,7 +149,7 @@ var ( votepersistencemoduletypes.ModuleName, verificationmoduletypes.ModuleName, // this line is used by starport scaffolding # stargate/app/endBlockers - }, + smartaccountsmoduletypes.ModuleName}, // The following is mostly only needed when ModuleName != StoreKey name. OverrideStoreKeys: []*runtimev1alpha1.StoreKeyConfig{ { @@ -188,7 +190,7 @@ var ( bridgemoduletypes.ModuleName, verificationmoduletypes.ModuleName, // this line is used by starport scaffolding # stargate/app/initGenesis - }, + smartaccountsmoduletypes.ModuleName}, }), }, { @@ -300,6 +302,9 @@ var ( Config: appconfig.WrapAny(&verificationmoduletypes.Module{}), }, // this line is used by starport scaffolding # stargate/app/moduleConfig - }, + { + Name: smartaccountsmoduletypes.ModuleName, + Config: appconfig.WrapAny(&smartaccountsmoduletypes.Module{}), + }}, }) ) diff --git a/buf.lock b/buf.lock index fed6880d..a47d8a3d 100644 --- a/buf.lock +++ b/buf.lock @@ -20,5 +20,5 @@ deps: commit: c17df5b2beca46928cc87d5656bd5343 digest: b5:648a01e0170d4512dea7d564016165decd1ed6e34bef79fe54753e51ad7e27545709ad9157d7551270147d551155c595a2fb0bf5bb33b1c83040ddbce915c604 - name: buf.build/protocolbuffers/wellknowntypes - commit: 122a3d2fdc814e0bb6fcf821bcce7957 - digest: b5:1aafdaf51329062dcc57ee613e59e15e5529e994634599ff467501e4d6c670af04eaa4bee3f3da5db64518b3117c34865896eb9b096a15a81051ab82c34e7e95 + commit: f1151727eddb493abf82a1d919dc35e4 + digest: b5:e05c29a4347e1ef07cb978e9ece8a44c59c8cb6ff31884cd632f88266f81baaba7a67bcfc6ac52d8caada7f77faf2d37683af0d69755ef52d9f1288cd1fd5d93 diff --git a/common/validator_entry.pb.go b/common/validator_entry.pb.go index 6794a059..51ac23f1 100644 --- a/common/validator_entry.pb.go +++ b/common/validator_entry.pb.go @@ -5,10 +5,11 @@ package common import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/docs/static/openapi.json b/docs/static/openapi.json index 2a4b8c7c..5a7ea8c4 100644 --- a/docs/static/openapi.json +++ b/docs/static/openapi.json @@ -1 +1 @@ -{"id":"github.com/node101-io/pulsar-chain","consumes":["application/json"],"produces":["application/json"],"swagger":"2.0","info":{"description":"Chain github.com/node101-io/pulsar-chain REST API","title":"HTTP API Console","contact":{"name":"github.com/node101-io/pulsar-chain"},"version":"version not set"},"paths":{"/node101-io/pulsar-chain/abci/v1/validator_set_with_powers/{block_height}":{"get":{"tags":["Query"],"operationId":"GithubComnode101IopulsarChainQuery_GetValidatorSetWithPowers","parameters":[{"type":"string","format":"int64","name":"block_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.abci.QueryGetValidatorSetWithPowersResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/abci/v1/vote_ext_body_by_height/{vote_extension_height}":{"get":{"tags":["Query"],"summary":"VoteExtBodyByHeight queries the vote extension body for a vote-extension\nconsensus height.","operationId":"GithubComnode101IopulsarChainQuery_VoteExtBodyByHeight","parameters":[{"type":"string","format":"int64","description":"vote_extension_height is the consensus height N where the vote extension is\nproduced. The returned body signs the transition from state N-2 to state N-1.","name":"vote_extension_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.abci.QueryVoteExtBodyByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/actions_reduced_root":{"get":{"tags":["Query"],"summary":"ActionsReducedRoot Queries a list of ActionsReducedRoot items.","operationId":"GithubComnode101IopulsarChainQuery_ActionsReducedRoot","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryActionsReducedRootResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/latest_action_hashes":{"get":{"tags":["Query"],"summary":"LatestActionHashes Queries a list of LatestActionHashes items.","operationId":"GithubComnode101IopulsarChainQuery_LatestActionHashes","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryLatestActionHashesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_user_cosmos_public_key/{user_mina_public_key}":{"get":{"tags":["Query"],"summary":"GetUserCosmosPublicKey Queries a list of GetUserCosmosPublicKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserCosmosPublicKey","parameters":[{"type":"string","format":"byte","name":"user_mina_public_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserCosmosPublicKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_user_mina_public_key/{user_cosmos_public_key}":{"get":{"tags":["Query"],"summary":"GetUserMinaPublicKey Queries a list of GetUserMinaPublicKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserMinaPublicKey","parameters":[{"type":"string","format":"byte","name":"user_cosmos_public_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserMinaPublicKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_cosmos_pub_key/{validator_mina_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorCosmosPubKey Queries a list of GetValidatorCosmosPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorCosmosPubKey","parameters":[{"type":"string","format":"byte","name":"validator_mina_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_mina_pub_key/{validator_cosmos_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorMinaPubKey Queries a list of GetValidatorMinaPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorMinaPubKey","parameters":[{"type":"string","format":"byte","name":"validator_cosmos_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_set_with_mina_keys":{"get":{"tags":["Query"],"summary":"GetValidatorSetWithMinaKeys returns the supplied validator set with each validator's registered Mina public key.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorSetWithMinaKeys","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorSetWithMinaKeysResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/key_signing_challenge":{"get":{"tags":["Query"],"summary":"GetKeySigningChallenge returns the state-bound field a Mina wallet must sign.","operationId":"GithubComnode101IopulsarChainQuery_GetKeySigningChallenge","parameters":[{"enum":["KEY_SIGNING_OPERATION_UNSPECIFIED","KEY_SIGNING_OPERATION_REGISTER","KEY_SIGNING_OPERATION_UPDATE"],"type":"string","default":"KEY_SIGNING_OPERATION_UNSPECIFIED","description":" - KEY_SIGNING_OPERATION_UNSPECIFIED: KEY_SIGNING_OPERATION_UNSPECIFIED is invalid for signing requests.\n - KEY_SIGNING_OPERATION_REGISTER: KEY_SIGNING_OPERATION_REGISTER creates the first stable-key association.\n - KEY_SIGNING_OPERATION_UPDATE: KEY_SIGNING_OPERATION_UPDATE replaces an existing Mina key.","name":"operation","in":"query"},{"enum":["ACTOR_TYPE_UNSPECIFIED","ACTOR_TYPE_USER","ACTOR_TYPE_VALIDATOR"],"type":"string","default":"ACTOR_TYPE_UNSPECIFIED","description":" - ACTOR_TYPE_UNSPECIFIED: ACTOR_TYPE_UNSPECIFIED is invalid for key-registry operations.\n - ACTOR_TYPE_USER: ACTOR_TYPE_USER identifies a user account key association.\n - ACTOR_TYPE_VALIDATOR: ACTOR_TYPE_VALIDATOR identifies a validator consensus key association.","name":"actor_type","in":"query"},{"type":"string","format":"byte","name":"cosmos_public_key","in":"query"},{"type":"string","format":"byte","name":"new_mina_public_key","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetKeySigningChallengeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin17","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/commitments/{validator}":{"get":{"tags":["Query"],"summary":"CommitmentsByValidator lists retained commitments for a validator.","operationId":"GithubComnode101IopulsarChainQuery_CommitmentsByValidator","parameters":[{"type":"string","name":"validator","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryCommitmentsByValidatorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/commitments/{validator}/{commitment_height}":{"get":{"tags":["Query"],"summary":"Commitment returns one retained validator commitment.","operationId":"GithubComnode101IopulsarChainQuery_Commitment","parameters":[{"type":"string","name":"validator","in":"path","required":true},{"type":"string","format":"uint64","name":"commitment_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryCommitmentResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/params":{"get":{"tags":["Query"],"summary":"Params returns module parameters.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin22","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/height/{submission_height}":{"get":{"tags":["Query"],"summary":"ProofsByHeight lists proofs submitted at a height.","operationId":"GithubComnode101IopulsarChainQuery_ProofsByHeight","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofsByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/verification-id/{verification_id}":{"get":{"tags":["Query"],"summary":"ProofByVerificationId resolves the permanent verification request registry.","operationId":"GithubComnode101IopulsarChainQuery_ProofByVerificationId","parameters":[{"type":"string","format":"byte","name":"verification_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"Proof returns a pending or finalized proof by key.","operationId":"GithubComnode101IopulsarChainQuery_Proof","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/results/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"FinalProofResult returns an immutable finalized result.","operationId":"GithubComnode101IopulsarChainQuery_FinalProofResult","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryFinalProofResultResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/tallies/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"ProofTally returns the active tally for a pending proof.","operationId":"GithubComnode101IopulsarChainQuery_ProofTally","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofTallyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/votes/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"VerificationVotes lists effective votes for a proof.","operationId":"GithubComnode101IopulsarChainQuery_VerificationVotes","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryVerificationVotesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/votes/{submission_height}/{index_in_block}/{validator}":{"get":{"tags":["Query"],"summary":"Vote returns one validator's effective vote for a proof.","operationId":"GithubComnode101IopulsarChainQuery_Vote","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true},{"type":"string","name":"validator","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryVoteResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/votepersistence/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin28","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/votepersistence/v1/vote_extensions":{"get":{"tags":["Query"],"summary":"VoteExtensions queries the currently persisted vote extensions.","operationId":"GithubComnode101IopulsarChainQuery_VoteExtensions","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.QueryVoteExtensionsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}}},"definitions":{"cosmos.base.query.v1beta1.PageRequest":{"description":"message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }","type":"object","title":"PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:","properties":{"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.","type":"boolean"},"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.","type":"string","format":"byte"},"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.","type":"string","format":"uint64"},"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.","type":"string","format":"uint64"},"reverse":{"description":"reverse is set to true if results are to be returned in the descending order.","type":"boolean"}}},"cosmos.base.query.v1beta1.PageResponse":{"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 }","type":"object","properties":{"next_key":{"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.","type":"string","format":"byte"},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}},"google.protobuf.Any":{"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{}},"google.rpc.Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"details":{"type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"message":{"type":"string"}}},"pulsarchain.abci.QueryGetValidatorSetWithPowersResponse":{"type":"object","properties":{"validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.common.ValidatorEntry"}}}},"pulsarchain.abci.QueryVoteExtBodyByHeightResponse":{"description":"QueryVoteExtBodyByHeightResponse defines the response for VoteExtBodyByHeight.","type":"object","properties":{"vote_ext_body":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.VoteExtBody"}}},"pulsarchain.bridge.v1.Params":{"description":"Params defines the parameters for the module.","type":"object","properties":{"actions_reduced_root_snapshot_window_size":{"description":"actions_reduced_root_snapshot_window_size is the retained consensus root window.","type":"string","format":"int64"},"confirmation_depth":{"description":"confirmation_depth is the Mina finality depth used by the archive wrapper.","type":"string","format":"int64"},"contract_address":{"description":"contract_address is the Mina bridge contract address.","type":"string"},"max_block_range":{"description":"max_block_range is the maximum Mina height span processed by one request.","type":"string","format":"int64"},"start_block_height":{"description":"start_block_height is the first Mina block indexed by the bridge.","type":"string","format":"int64"}}},"pulsarchain.bridge.v1.QueryActionsReducedRootResponse":{"description":"QueryActionsReducedRootResponse defines the QueryActionsReducedRootResponse message.","type":"object","properties":{"actions_reduced_root":{"type":"string"}}},"pulsarchain.bridge.v1.QueryLatestActionHashesResponse":{"description":"QueryLatestActionHashesResponse defines the QueryLatestActionHashesResponse message.","type":"object","properties":{"action_hashes":{"description":"action_hashes is the ordered canonical hash batch that reconstructs\nthe root transition for the source Cosmos block.","type":"array","items":{"type":"string"}},"action_hashes_cosmos_block_height":{"description":"action_hashes_cosmos_block_height is the Cosmos block height where\nthis query batch was produced.","type":"string","format":"int64"},"latest_fetched_mina_height":{"description":"latest_fetched_mina_height is the inclusive upper Mina cursor of the\ncurrent batch. Together with start_mina_height it defines the consumed\nMina interval (start_mina_height, latest_fetched_mina_height].","type":"string","format":"int64"},"start_mina_height":{"description":"start_mina_height is the exclusive lower Mina cursor of the current batch.","type":"string","format":"int64"}}},"pulsarchain.bridge.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.bridge.v1.Params"}}},"pulsarchain.common.ValidatorEntry":{"type":"object","properties":{"consensus_power":{"type":"string","format":"int64"},"validator_cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.ActorType":{"description":"ActorType identifies the key-registry actor authorized by a signing challenge.\n\n - ACTOR_TYPE_UNSPECIFIED: ACTOR_TYPE_UNSPECIFIED is invalid for key-registry operations.\n - ACTOR_TYPE_USER: ACTOR_TYPE_USER identifies a user account key association.\n - ACTOR_TYPE_VALIDATOR: ACTOR_TYPE_VALIDATOR identifies a validator consensus key association.","type":"string","default":"ACTOR_TYPE_UNSPECIFIED","enum":["ACTOR_TYPE_UNSPECIFIED","ACTOR_TYPE_USER","ACTOR_TYPE_VALIDATOR"]},"pulsarchain.keyregistry.v1.KeySigningOperation":{"description":"KeySigningOperation identifies the key-registry state transition authorized\nby a wallet field signature.\n\n - KEY_SIGNING_OPERATION_UNSPECIFIED: KEY_SIGNING_OPERATION_UNSPECIFIED is invalid for signing requests.\n - KEY_SIGNING_OPERATION_REGISTER: KEY_SIGNING_OPERATION_REGISTER creates the first stable-key association.\n - KEY_SIGNING_OPERATION_UPDATE: KEY_SIGNING_OPERATION_UPDATE replaces an existing Mina key.","type":"string","default":"KEY_SIGNING_OPERATION_UNSPECIFIED","enum":["KEY_SIGNING_OPERATION_UNSPECIFIED","KEY_SIGNING_OPERATION_REGISTER","KEY_SIGNING_OPERATION_UPDATE"]},"pulsarchain.keyregistry.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.keyregistry.v1.QueryGetKeySigningChallengeResponse":{"description":"QueryGetKeySigningChallengeResponse contains the exact field and state version to sign.","type":"object","properties":{"challenge":{"type":"string"},"challenge_bytes":{"type":"string","format":"byte"},"new_key_version":{"type":"string","format":"uint64"},"previous_mina_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetUserCosmosPublicKeyResponse":{"description":"QueryGetUserCosmosPublicKeyResponse defines the QueryGetUserCosmosPublicKeyResponse message.","type":"object","properties":{"user_cosmos_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetUserMinaPublicKeyResponse":{"description":"QueryGetUserMinaPublicKeyResponse defines the QueryGetUserMinaPublicKeyResponse message.","type":"object","properties":{"user_mina_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse":{"description":"QueryGetValidatorCosmosPubKeyResponse defines the QueryGetValidatorCosmosPubKeyResponse message.","type":"object","properties":{"validator_cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse":{"description":"QueryGetValidatorMinaPubKeyResponse defines the QueryGetValidatorMinaPubKeyResponse message.","type":"object","properties":{"validator_mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorSetWithMinaKeysResponse":{"description":"QueryGetValidatorSetWithMinaKeysResponse defines the response for GetValidatorSetWithMinaKeys.","type":"object","properties":{"registered_validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.keyregistry.v1.RegisteredValidatorSetEntry"}}}},"pulsarchain.keyregistry.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.keyregistry.v1.Params"}}},"pulsarchain.keyregistry.v1.RegisteredValidatorSetEntry":{"type":"object","properties":{"consensus_power":{"type":"string","format":"int64"},"validator_cosmos_pub_key":{"type":"string","format":"byte"},"validator_mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.CommitmentEntry":{"description":"CommitmentEntry is a query representation of a retained commitment.","type":"object","properties":{"commitment":{"$ref":"#/definitions/pulsarchain.verification.v1.CommitmentRecord"},"commitment_height":{"type":"string","format":"uint64"},"validator":{"type":"string"}}},"pulsarchain.verification.v1.CommitmentRecord":{"description":"CommitmentRecord stores a validator commitment root.","type":"object","properties":{"commitment":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.FinalProofResult":{"description":"FinalProofResult stores an immutable finalized proof outcome.","type":"object","properties":{"finalized_height":{"type":"string","format":"uint64"},"invalid_voting_power":{"type":"string","format":"int64"},"proof_hash":{"type":"string","format":"byte"},"proof_type":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofType"},"public_inputs_hash":{"type":"string","format":"byte"},"status":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofStatus"},"submission_height":{"type":"string","format":"uint64"},"total_voting_power":{"type":"string","format":"int64"},"valid_voting_power":{"type":"string","format":"int64"},"verification_id":{"type":"string","format":"byte"},"verification_key_hash":{"type":"string","format":"byte"},"voting_power_threshold":{"type":"string","format":"int64"}}},"pulsarchain.verification.v1.Params":{"description":"Params defines the governance-controlled verification module parameters.","type":"object","properties":{"max_proofs_per_block":{"type":"integer","format":"int64"}}},"pulsarchain.verification.v1.ProofKey":{"description":"ProofKey identifies a proof by absolute block height and in-block index.","type":"object","properties":{"index_in_block":{"type":"integer","format":"int64"},"submission_height":{"type":"string","format":"uint64"}}},"pulsarchain.verification.v1.ProofRecord":{"description":"ProofRecord stores the complete descriptor and its chain-derived identity.","type":"object","properties":{"proof_hash":{"type":"string","format":"byte"},"proof_type":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofType"},"public_inputs_hash":{"type":"string","format":"byte"},"verification_id":{"type":"string","format":"byte"},"verification_key_hash":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.ProofStatus":{"description":"ProofStatus is the finalized verification outcome.\n\n - PROOF_STATUS_PENDING: PROOF_STATUS_PENDING is the non-finalized status.\n - PROOF_STATUS_VALID: PROOF_STATUS_VALID means valid voting power exceeded two thirds.\n - PROOF_STATUS_INVALID: PROOF_STATUS_INVALID means invalid voting power exceeded two thirds.\n - PROOF_STATUS_INCONCLUSIVE: PROOF_STATUS_INCONCLUSIVE means neither side reached threshold.","type":"string","default":"PROOF_STATUS_PENDING","enum":["PROOF_STATUS_PENDING","PROOF_STATUS_VALID","PROOF_STATUS_INVALID","PROOF_STATUS_INCONCLUSIVE"]},"pulsarchain.verification.v1.ProofTally":{"description":"ProofTally stores the historical consensus power behind effective votes.","type":"object","properties":{"invalid_voting_power":{"type":"string","format":"int64"},"valid_voting_power":{"type":"string","format":"int64"}}},"pulsarchain.verification.v1.ProofType":{"description":"ProofType selects the verifier family. The exact statement and circuit are\nbound separately by the public-input and verification-key hashes.\n\n - PROOF_TYPE_UNSPECIFIED: PROOF_TYPE_UNSPECIFIED is invalid for proof submission.\n - PROOF_TYPE_MINA_PICKLES: PROOF_TYPE_MINA_PICKLES selects Mina's Pickles proof system.\n - PROOF_TYPE_NOIR_BARRETENBERG: PROOF_TYPE_NOIR_BARRETENBERG selects Noir proofs using Barretenberg.","type":"string","default":"PROOF_TYPE_UNSPECIFIED","enum":["PROOF_TYPE_UNSPECIFIED","PROOF_TYPE_MINA_PICKLES","PROOF_TYPE_NOIR_BARRETENBERG"]},"pulsarchain.verification.v1.QueryCommitmentResponse":{"description":"QueryCommitmentResponse contains one retained commitment.","type":"object","properties":{"commitment":{"$ref":"#/definitions/pulsarchain.verification.v1.CommitmentEntry"}}},"pulsarchain.verification.v1.QueryCommitmentsByValidatorResponse":{"description":"QueryCommitmentsByValidatorResponse contains retained commitments.","type":"object","properties":{"commitments":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.CommitmentEntry"}},"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"pulsarchain.verification.v1.QueryFinalProofResultResponse":{"description":"QueryFinalProofResultResponse contains an immutable proof result.","type":"object","properties":{"final_result":{"$ref":"#/definitions/pulsarchain.verification.v1.FinalProofResult"},"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"}}},"pulsarchain.verification.v1.QueryParamsResponse":{"description":"QueryParamsResponse contains verification parameters.","type":"object","properties":{"params":{"$ref":"#/definitions/pulsarchain.verification.v1.Params"}}},"pulsarchain.verification.v1.QueryProofResponse":{"description":"QueryProofResponse contains either pending or finalized proof state.","type":"object","properties":{"final_result":{"$ref":"#/definitions/pulsarchain.verification.v1.FinalProofResult"},"pending":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofRecord"},"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"}}},"pulsarchain.verification.v1.QueryProofTallyResponse":{"description":"QueryProofTallyResponse contains a pending proof tally.","type":"object","properties":{"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"},"tally":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofTally"}}},"pulsarchain.verification.v1.QueryProofsByHeightResponse":{"description":"QueryProofsByHeightResponse contains a page of proofs.","type":"object","properties":{"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"proofs":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}}}},"pulsarchain.verification.v1.QueryVerificationVotesResponse":{"description":"QueryVerificationVotesResponse contains effective votes.","type":"object","properties":{"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"votes":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.VerificationVoteEntry"}}}},"pulsarchain.verification.v1.QueryVoteResponse":{"description":"QueryVoteResponse contains one effective vote.","type":"object","properties":{"vote":{"$ref":"#/definitions/pulsarchain.verification.v1.VerificationVoteEntry"}}},"pulsarchain.verification.v1.VerificationVoteEntry":{"description":"VerificationVoteEntry is a query representation of an effective vote.","type":"object","properties":{"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"},"state":{"$ref":"#/definitions/pulsarchain.verification.v1.VoteState"},"validator":{"type":"string"}}},"pulsarchain.verification.v1.VoteState":{"description":"VoteState tracks a validator's effective vote.\n\n - VOTE_STATE_NONE: VOTE_STATE_NONE means the validator has not voted.\n - VOTE_STATE_TRUE: VOTE_STATE_TRUE is an effective valid vote.\n - VOTE_STATE_FALSE: VOTE_STATE_FALSE is an effective invalid vote.\n - VOTE_STATE_EQUIVOCATED: VOTE_STATE_EQUIVOCATED excludes conflicting votes from the tally.","type":"string","default":"VOTE_STATE_NONE","enum":["VOTE_STATE_NONE","VOTE_STATE_TRUE","VOTE_STATE_FALSE","VOTE_STATE_EQUIVOCATED"]},"pulsarchain.votepersistence.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.votepersistence.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.votepersistence.v1.Params"}}},"pulsarchain.votepersistence.v1.QueryVoteExtensionsResponse":{"description":"QueryVoteExtensionsResponse defines the QueryVoteExtensionsResponse message.","type":"object","properties":{"persisted_vote_extensions_block_height":{"description":"persisted_vote_extensions_block_height is the signed source/current state\nheight. For vote extensions produced at height N, this value is N-2.","type":"string","format":"int64"},"query_block_height":{"type":"string","format":"int64"},"vote_extensions":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.votepersistence.v1.StoredVoteExtension"}}}},"pulsarchain.votepersistence.v1.StoredVoteExtension":{"description":"StoredVoteExtension defines a persisted Mina validator vote extension.","type":"object","properties":{"mina_public_key":{"type":"string","format":"byte"},"vote_extension":{"type":"string","format":"byte"}}},"pulsarchain.votepersistence.v1.VoteExtBody":{"description":"VoteExtBody defines the VoteExtBody message.","type":"object","properties":{"actions_reduced_root":{"type":"string","format":"byte"},"current_block_height":{"type":"string","format":"int64"},"current_state_root":{"type":"string","format":"byte"},"next_validator_set_hash":{"type":"string","format":"byte"}}}},"tags":[{"name":"VerificationService"},{"name":"Query"},{"name":"Msg"}]} \ No newline at end of file +{"id":"github.com/node101-io/pulsar-chain","consumes":["application/json"],"produces":["application/json"],"swagger":"2.0","info":{"description":"Chain github.com/node101-io/pulsar-chain REST API","title":"HTTP API Console","contact":{"name":"github.com/node101-io/pulsar-chain"},"version":"version not set"},"paths":{"/cosmos/auth/v1beta1/account_info/{address}":{"get":{"tags":["Query"],"summary":"AccountInfo queries account info which is common to all account types.","operationId":"NftQuery_AccountInfo","parameters":[{"type":"string","description":"address is the account address string.","name":"address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.QueryAccountInfoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/accounts":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"Accounts returns all the existing accounts.","operationId":"NftQuery_Accounts","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.QueryAccountsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/accounts/{address}":{"get":{"tags":["Query"],"summary":"Account returns account details based on address.","operationId":"NftQuery_Account","parameters":[{"type":"string","description":"address defines the address to query for.","name":"address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.QueryAccountResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/address_by_id/{id}":{"get":{"tags":["Query"],"summary":"AccountAddressByID returns account address based on account number.","operationId":"NftQuery_AccountAddressByID","parameters":[{"type":"string","format":"int64","description":"Deprecated, use account_id instead\n\nid is the account number of the address to be queried. This field\nshould have been an uint64 (like all account numbers), and will be\nupdated to uint64 in a future version of the auth query.","name":"id","in":"path","required":true},{"type":"string","format":"uint64","description":"account_id is the account number of the address to be queried.","name":"account_id","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/bech32":{"get":{"tags":["Query"],"summary":"Bech32Prefix queries bech32Prefix","operationId":"NftQuery_Bech32Prefix","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.Bech32PrefixResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/bech32/{address_bytes}":{"get":{"tags":["Query"],"summary":"AddressBytesToString converts Account Address bytes to string","operationId":"NftQuery_AddressBytesToString","parameters":[{"type":"string","format":"byte","name":"address_bytes","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.AddressBytesToStringResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/bech32/{address_string}":{"get":{"tags":["Query"],"summary":"AddressStringToBytes converts Address string to bytes","operationId":"NftQuery_AddressStringToBytes","parameters":[{"type":"string","name":"address_string","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.AddressStringToBytesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/module_accounts":{"get":{"tags":["Query"],"summary":"ModuleAccounts returns all the existing module accounts.","operationId":"NftQuery_ModuleAccounts","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.QueryModuleAccountsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/module_accounts/{name}":{"get":{"tags":["Query"],"summary":"ModuleAccountByName returns the module account info by module name","operationId":"NftQuery_ModuleAccountByName","parameters":[{"type":"string","name":"name","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/params":{"get":{"tags":["Query"],"summary":"Params queries all parameters.","operationId":"NftQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/authz/v1beta1/grants":{"get":{"tags":["Query"],"summary":"Returns list of `Authorization`, granted to the grantee by the granter.","operationId":"NftQuery_Grants","parameters":[{"type":"string","name":"granter","in":"query"},{"type":"string","name":"grantee","in":"query"},{"type":"string","description":"Optional, msg_type_url, when set, will query only grants matching given msg type.","name":"msg_type_url","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.authz.v1beta1.QueryGrantsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/authz/v1beta1/grants/grantee/{grantee}":{"get":{"tags":["Query"],"summary":"GranteeGrants returns a list of `GrantAuthorization` by grantee.","operationId":"NftQuery_GranteeGrants","parameters":[{"type":"string","name":"grantee","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.authz.v1beta1.QueryGranteeGrantsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/authz/v1beta1/grants/granter/{granter}":{"get":{"tags":["Query"],"summary":"GranterGrants returns list of `GrantAuthorization`, granted by granter.","operationId":"NftQuery_GranterGrants","parameters":[{"type":"string","name":"granter","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.authz.v1beta1.QueryGranterGrantsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/balances/{address}":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"AllBalances queries the balance of all coins for a single account.","operationId":"NftQuery_AllBalances","parameters":[{"type":"string","description":"address is the address to query balances for.","name":"address","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"},{"type":"boolean","description":"resolve_denom is the flag to resolve the denom into a human-readable form from the metadata.","name":"resolve_denom","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryAllBalancesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/balances/{address}/by_denom":{"get":{"tags":["Query"],"summary":"Balance queries the balance of a single coin for a single account.","operationId":"NftQuery_Balance","parameters":[{"type":"string","description":"address is the address to query balances for.","name":"address","in":"path","required":true},{"type":"string","description":"denom is the coin denom to query balances for.","name":"denom","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryBalanceResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/denom_owners/{denom}":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"DenomOwners queries for all account addresses that own a particular token\ndenomination.","operationId":"NftQuery_DenomOwners","parameters":[{"pattern":".+","type":"string","description":"denom defines the coin denomination to query all account holders for.","name":"denom","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryDenomOwnersResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/denom_owners_by_query":{"get":{"tags":["Query"],"summary":"DenomOwnersByQuery queries for all account addresses that own a particular token\ndenomination.","operationId":"NftQuery_DenomOwnersByQuery","parameters":[{"type":"string","description":"denom defines the coin denomination to query all account holders for.","name":"denom","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/denoms_metadata":{"get":{"tags":["Query"],"summary":"DenomsMetadata queries the client metadata for all registered coin\ndenominations.","operationId":"NftQuery_DenomsMetadata","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryDenomsMetadataResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/denoms_metadata/{denom}":{"get":{"tags":["Query"],"summary":"DenomMetadata queries the client metadata of a given coin denomination.","operationId":"NftQuery_DenomMetadata","parameters":[{"pattern":".+","type":"string","description":"denom is the coin denom to query the metadata for.","name":"denom","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryDenomMetadataResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/denoms_metadata_by_query_string":{"get":{"tags":["Query"],"summary":"DenomMetadataByQueryString queries the client metadata of a given coin denomination.","operationId":"NftQuery_DenomMetadataByQueryString","parameters":[{"type":"string","description":"denom is the coin denom to query the metadata for.","name":"denom","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/params":{"get":{"tags":["Query"],"summary":"Params queries the parameters of x/bank module.","operationId":"NftQuery_ParamsMixin50","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/send_enabled":{"get":{"description":"This query only returns denominations that have specific SendEnabled settings.\nAny denomination that does not have a specific setting will use the default\nparams.default_send_enabled, and will not be returned by this query.","tags":["Query"],"summary":"SendEnabled queries for SendEnabled entries.","operationId":"NftQuery_SendEnabled","parameters":[{"type":"array","items":{"type":"string"},"collectionFormat":"multi","description":"denoms is the specific denoms you want look up. Leave empty to get all entries.","name":"denoms","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QuerySendEnabledResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/spendable_balances/{address}":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"SpendableBalances queries the spendable balance of all coins for a single\naccount.","operationId":"NftQuery_SpendableBalances","parameters":[{"type":"string","description":"address is the address to query spendable balances for.","name":"address","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QuerySpendableBalancesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/spendable_balances/{address}/by_denom":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"SpendableBalanceByDenom queries the spendable balance of a single denom for\na single account.","operationId":"NftQuery_SpendableBalanceByDenom","parameters":[{"type":"string","description":"address is the address to query balances for.","name":"address","in":"path","required":true},{"type":"string","description":"denom is the coin denom to query balances for.","name":"denom","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/supply":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"TotalSupply queries the total supply of all coins.","operationId":"NftQuery_TotalSupply","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryTotalSupplyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/supply/by_denom":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"SupplyOf queries the supply of a single coin.","operationId":"NftQuery_SupplyOf","parameters":[{"type":"string","description":"denom is the coin denom to query balances for.","name":"denom","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QuerySupplyOfResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/node/v1beta1/config":{"get":{"tags":["Service"],"summary":"Config queries for the operator configuration.","operationId":"NftService_Config","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.node.v1beta1.ConfigResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/node/v1beta1/status":{"get":{"tags":["Service"],"summary":"Status queries for the node status.","operationId":"NftService_Status","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.node.v1beta1.StatusResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/reflection/v1beta1/app_descriptor/authn":{"get":{"tags":["ReflectionService"],"summary":"GetAuthnDescriptor returns information on how to authenticate transactions in the application\nNOTE: this RPC is still experimental and might be subject to breaking changes or removal in\nfuture releases of the cosmos-sdk.","operationId":"NftReflectionService_GetAuthnDescriptor","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/reflection/v1beta1/app_descriptor/chain":{"get":{"tags":["ReflectionService"],"summary":"GetChainDescriptor returns the description of the chain","operationId":"NftReflectionService_GetChainDescriptor","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/reflection/v1beta1/app_descriptor/codec":{"get":{"tags":["ReflectionService"],"summary":"GetCodecDescriptor returns the descriptor of the codec of the application","operationId":"NftReflectionService_GetCodecDescriptor","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/reflection/v1beta1/app_descriptor/configuration":{"get":{"tags":["ReflectionService"],"summary":"GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application","operationId":"NftReflectionService_GetConfigurationDescriptor","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/reflection/v1beta1/app_descriptor/query_services":{"get":{"tags":["ReflectionService"],"summary":"GetQueryServicesDescriptor returns the available gRPC queryable services of the application","operationId":"NftReflectionService_GetQueryServicesDescriptor","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/reflection/v1beta1/app_descriptor/tx_descriptor":{"get":{"tags":["ReflectionService"],"summary":"GetTxDescriptor returns information on the used transaction object and available msgs that can be used","operationId":"NftReflectionService_GetTxDescriptor","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/reflection/v1beta1/interfaces":{"get":{"tags":["ReflectionService"],"summary":"ListAllInterfaces lists all the interfaces registered in the interface\nregistry.","operationId":"NftReflectionService_ListAllInterfaces","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.reflection.v1beta1.ListAllInterfacesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/reflection/v1beta1/interfaces/{interface_name}/implementations":{"get":{"tags":["ReflectionService"],"summary":"ListImplementations list all the concrete types that implement a given\ninterface.","operationId":"NftReflectionService_ListImplementations","parameters":[{"type":"string","description":"interface_name defines the interface to query the implementations for.","name":"interface_name","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.reflection.v1beta1.ListImplementationsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/tendermint/v1beta1/abci_query":{"get":{"tags":["Service"],"summary":"ABCIQuery defines a query handler that supports ABCI queries directly to the\napplication, bypassing Tendermint completely. The ABCI query must contain\na valid and supported path, including app, custom, p2p, and store.","operationId":"NftService_ABCIQuery","parameters":[{"type":"string","format":"byte","name":"data","in":"query"},{"type":"string","name":"path","in":"query"},{"type":"string","format":"int64","name":"height","in":"query"},{"type":"boolean","name":"prove","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.ABCIQueryResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/tendermint/v1beta1/blocks/latest":{"get":{"tags":["Service"],"summary":"GetLatestBlock returns the latest block.","operationId":"NftService_GetLatestBlock","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.GetLatestBlockResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/tendermint/v1beta1/blocks/{height}":{"get":{"tags":["Service"],"summary":"GetBlockByHeight queries block for given height.","operationId":"NftService_GetBlockByHeight","parameters":[{"type":"string","format":"int64","name":"height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/tendermint/v1beta1/node_info":{"get":{"tags":["Service"],"summary":"GetNodeInfo queries the current node info.","operationId":"NftService_GetNodeInfo","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.GetNodeInfoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/tendermint/v1beta1/syncing":{"get":{"tags":["Service"],"summary":"GetSyncing queries node syncing.","operationId":"NftService_GetSyncing","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.GetSyncingResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/tendermint/v1beta1/validatorsets/latest":{"get":{"tags":["Service"],"summary":"GetLatestValidatorSet queries latest validator-set.","operationId":"NftService_GetLatestValidatorSet","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/tendermint/v1beta1/validatorsets/{height}":{"get":{"tags":["Service"],"summary":"GetValidatorSetByHeight queries validator-set at a given height.","operationId":"NftService_GetValidatorSetByHeight","parameters":[{"type":"string","format":"int64","name":"height","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/circuit/v1/accounts":{"get":{"tags":["Query"],"summary":"Account returns account permissions.","operationId":"NftQuery_AccountsMixin62","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.circuit.v1.AccountsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/circuit/v1/accounts/{address}":{"get":{"tags":["Query"],"summary":"Account returns account permissions.","operationId":"NftQuery_AccountMixin62","parameters":[{"type":"string","name":"address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.circuit.v1.AccountResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/circuit/v1/disable_list":{"get":{"tags":["Query"],"summary":"DisabledList returns a list of disabled message urls","operationId":"NftQuery_DisabledList","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.circuit.v1.DisabledListResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/consensus/v1/params":{"get":{"tags":["Query"],"summary":"Params queries the parameters of x/consensus module.","operationId":"NftQuery_ParamsMixin65","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.consensus.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/community_pool":{"get":{"description":"WARNING: This query will fail if an external community pool is used.","tags":["Query"],"summary":"CommunityPool queries the community pool coins.","operationId":"NftQuery_CommunityPool","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryCommunityPoolResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards":{"get":{"tags":["Query"],"summary":"DelegationTotalRewards queries the total rewards accrued by each\nvalidator.","operationId":"NftQuery_DelegationTotalRewards","parameters":[{"type":"string","description":"delegator_address defines the delegator address to query for.","name":"delegator_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}":{"get":{"tags":["Query"],"summary":"DelegationRewards queries the total rewards accrued by a delegation.","operationId":"NftQuery_DelegationRewards","parameters":[{"type":"string","description":"delegator_address defines the delegator address to query for.","name":"delegator_address","in":"path","required":true},{"type":"string","description":"validator_address defines the validator address to query for.","name":"validator_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryDelegationRewardsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators":{"get":{"tags":["Query"],"summary":"DelegatorValidators queries the validators of a delegator.","operationId":"NftQuery_DelegatorValidators","parameters":[{"type":"string","description":"delegator_address defines the delegator address to query for.","name":"delegator_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address":{"get":{"tags":["Query"],"summary":"DelegatorWithdrawAddress queries withdraw address of a delegator.","operationId":"NftQuery_DelegatorWithdrawAddress","parameters":[{"type":"string","description":"delegator_address defines the delegator address to query for.","name":"delegator_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/params":{"get":{"tags":["Query"],"summary":"Params queries params of the distribution module.","operationId":"NftQuery_ParamsMixin80","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/validators/{validator_address}":{"get":{"tags":["Query"],"summary":"ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator","operationId":"NftQuery_ValidatorDistributionInfo","parameters":[{"type":"string","description":"validator_address defines the validator address to query for.","name":"validator_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/validators/{validator_address}/commission":{"get":{"tags":["Query"],"summary":"ValidatorCommission queries accumulated commission for a validator.","operationId":"NftQuery_ValidatorCommission","parameters":[{"type":"string","description":"validator_address defines the validator address to query for.","name":"validator_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryValidatorCommissionResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards":{"get":{"tags":["Query"],"summary":"ValidatorOutstandingRewards queries rewards of a validator address.","operationId":"NftQuery_ValidatorOutstandingRewards","parameters":[{"type":"string","description":"validator_address defines the validator address to query for.","name":"validator_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/validators/{validator_address}/slashes":{"get":{"tags":["Query"],"summary":"ValidatorSlashes queries slash events of a validator.","operationId":"NftQuery_ValidatorSlashes","parameters":[{"type":"string","description":"validator_address defines the validator address to query for.","name":"validator_address","in":"path","required":true},{"type":"string","format":"uint64","description":"starting_height defines the optional starting height to query the slashes.","name":"starting_height","in":"query"},{"type":"string","format":"uint64","description":"starting_height defines the optional ending height to query the slashes.","name":"ending_height","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryValidatorSlashesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/epochs/v1beta1/current_epoch":{"get":{"tags":["Query"],"summary":"CurrentEpoch provide current epoch of specified identifier","operationId":"NftQuery_CurrentEpoch","parameters":[{"type":"string","name":"identifier","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.epochs.v1beta1.QueryCurrentEpochResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/epochs/v1beta1/epochs":{"get":{"tags":["Query"],"summary":"EpochInfos provide running epochInfos","operationId":"NftQuery_EpochInfos","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.epochs.v1beta1.QueryEpochInfosResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/evidence/v1beta1/evidence":{"get":{"tags":["Query"],"summary":"AllEvidence queries all evidence.","operationId":"NftQuery_AllEvidence","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.evidence.v1beta1.QueryAllEvidenceResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/evidence/v1beta1/evidence/{hash}":{"get":{"tags":["Query"],"summary":"Evidence queries evidence based on evidence hash.","operationId":"NftQuery_Evidence","parameters":[{"type":"string","description":"hash defines the evidence hash of the requested evidence.","name":"hash","in":"path","required":true},{"type":"string","format":"byte","description":"evidence_hash defines the hash of the requested evidence.\nDeprecated: Use hash, a HEX encoded string, instead.","name":"evidence_hash","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.evidence.v1beta1.QueryEvidenceResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}":{"get":{"tags":["Query"],"summary":"Allowance returns granted allwance to the grantee by the granter.","operationId":"NftQuery_Allowance","parameters":[{"type":"string","description":"granter is the address of the user granting an allowance of their funds.","name":"granter","in":"path","required":true},{"type":"string","description":"grantee is the address of the user being granted an allowance of another user's funds.","name":"grantee","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.feegrant.v1beta1.QueryAllowanceResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/feegrant/v1beta1/allowances/{grantee}":{"get":{"tags":["Query"],"summary":"Allowances returns all the grants for the given grantee address.","operationId":"NftQuery_Allowances","parameters":[{"type":"string","name":"grantee","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.feegrant.v1beta1.QueryAllowancesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/feegrant/v1beta1/issued/{granter}":{"get":{"tags":["Query"],"summary":"AllowancesByGranter returns all the grants given by an address","operationId":"NftQuery_AllowancesByGranter","parameters":[{"type":"string","name":"granter","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/constitution":{"get":{"tags":["Query"],"summary":"Constitution queries the chain's constitution.","operationId":"NftQuery_Constitution","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryConstitutionResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/params/{params_type}":{"get":{"tags":["Query"],"summary":"Params queries all parameters of the gov module.","operationId":"NftQuery_ParamsMixin96","parameters":[{"type":"string","description":"params_type defines which parameters to query for, can be one of \"voting\",\n\"tallying\" or \"deposit\".","name":"params_type","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/proposals":{"get":{"tags":["Query"],"summary":"Proposals queries all proposals based on given status.","operationId":"NftQuery_Proposals","parameters":[{"enum":["PROPOSAL_STATUS_UNSPECIFIED","PROPOSAL_STATUS_DEPOSIT_PERIOD","PROPOSAL_STATUS_VOTING_PERIOD","PROPOSAL_STATUS_PASSED","PROPOSAL_STATUS_REJECTED","PROPOSAL_STATUS_FAILED"],"type":"string","default":"PROPOSAL_STATUS_UNSPECIFIED","description":"proposal_status defines the status of the proposals.\n\n - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status.\n - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit\nperiod.\n - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting\nperiod.\n - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has\npassed.\n - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has\nbeen rejected.\n - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has\nfailed.","name":"proposal_status","in":"query"},{"type":"string","description":"voter defines the voter address for the proposals.","name":"voter","in":"query"},{"type":"string","description":"depositor defines the deposit addresses from the proposals.","name":"depositor","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryProposalsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/proposals/{proposal_id}":{"get":{"tags":["Query"],"summary":"Proposal queries proposal details based on ProposalID.","operationId":"NftQuery_Proposal","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryProposalResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/proposals/{proposal_id}/deposits":{"get":{"tags":["Query"],"summary":"Deposits queries all deposits of a single proposal.","operationId":"NftQuery_Deposits","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryDepositsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/proposals/{proposal_id}/deposits/{depositor}":{"get":{"tags":["Query"],"summary":"Deposit queries single deposit information based on proposalID, depositAddr.","operationId":"NftQuery_Deposit","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true},{"type":"string","description":"depositor defines the deposit addresses from the proposals.","name":"depositor","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryDepositResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/proposals/{proposal_id}/tally":{"get":{"tags":["Query"],"summary":"TallyResult queries the tally of a proposal vote.","operationId":"NftQuery_TallyResult","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryTallyResultResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/proposals/{proposal_id}/votes":{"get":{"tags":["Query"],"summary":"Votes queries votes of a given proposal.","operationId":"NftQuery_Votes","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryVotesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/proposals/{proposal_id}/votes/{voter}":{"get":{"tags":["Query"],"summary":"Vote queries voted information based on proposalID, voterAddr.","operationId":"NftQuery_Vote","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true},{"type":"string","description":"voter defines the voter address for the proposals.","name":"voter","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryVoteResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1beta1/params/{params_type}":{"get":{"tags":["Query"],"summary":"Params queries all parameters of the gov module.","operationId":"NftQuery_ParamsMixin100","parameters":[{"type":"string","description":"params_type defines which parameters to query for, can be one of \"voting\",\n\"tallying\" or \"deposit\".","name":"params_type","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1beta1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1beta1/proposals":{"get":{"tags":["Query"],"summary":"Proposals queries all proposals based on given status.","operationId":"NftQuery_ProposalsMixin100","parameters":[{"enum":["PROPOSAL_STATUS_UNSPECIFIED","PROPOSAL_STATUS_DEPOSIT_PERIOD","PROPOSAL_STATUS_VOTING_PERIOD","PROPOSAL_STATUS_PASSED","PROPOSAL_STATUS_REJECTED","PROPOSAL_STATUS_FAILED"],"type":"string","default":"PROPOSAL_STATUS_UNSPECIFIED","description":"proposal_status defines the status of the proposals.\n\n - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status.\n - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit\nperiod.\n - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting\nperiod.\n - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has\npassed.\n - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has\nbeen rejected.\n - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has\nfailed.","name":"proposal_status","in":"query"},{"type":"string","description":"voter defines the voter address for the proposals.","name":"voter","in":"query"},{"type":"string","description":"depositor defines the deposit addresses from the proposals.","name":"depositor","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1beta1.QueryProposalsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1beta1/proposals/{proposal_id}":{"get":{"tags":["Query"],"summary":"Proposal queries proposal details based on ProposalID.","operationId":"NftQuery_ProposalMixin100","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1beta1.QueryProposalResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits":{"get":{"tags":["Query"],"summary":"Deposits queries all deposits of a single proposal.","operationId":"NftQuery_DepositsMixin100","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1beta1.QueryDepositsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}":{"get":{"tags":["Query"],"summary":"Deposit queries single deposit information based on proposalID, depositor address.","operationId":"NftQuery_DepositMixin100","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true},{"type":"string","description":"depositor defines the deposit addresses from the proposals.","name":"depositor","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1beta1.QueryDepositResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1beta1/proposals/{proposal_id}/tally":{"get":{"tags":["Query"],"summary":"TallyResult queries the tally of a proposal vote.","operationId":"NftQuery_TallyResultMixin100","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1beta1.QueryTallyResultResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1beta1/proposals/{proposal_id}/votes":{"get":{"tags":["Query"],"summary":"Votes queries votes of a given proposal.","operationId":"NftQuery_VotesMixin100","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1beta1.QueryVotesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}":{"get":{"tags":["Query"],"summary":"Vote queries voted information based on proposalID, voterAddr.","operationId":"NftQuery_VoteMixin100","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true},{"type":"string","description":"voter defines the voter address for the proposals.","name":"voter","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1beta1.QueryVoteResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/group_info/{group_id}":{"get":{"tags":["Query"],"summary":"GroupInfo queries group info based on group id.","operationId":"NftQuery_GroupInfo","parameters":[{"type":"string","format":"uint64","description":"group_id is the unique ID of the group.","name":"group_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryGroupInfoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/group_members/{group_id}":{"get":{"tags":["Query"],"summary":"GroupMembers queries members of a group by group id.","operationId":"NftQuery_GroupMembers","parameters":[{"type":"string","format":"uint64","description":"group_id is the unique ID of the group.","name":"group_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryGroupMembersResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/group_policies_by_admin/{admin}":{"get":{"tags":["Query"],"summary":"GroupPoliciesByAdmin queries group policies by admin address.","operationId":"NftQuery_GroupPoliciesByAdmin","parameters":[{"type":"string","description":"admin is the admin address of the group policy.","name":"admin","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryGroupPoliciesByAdminResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/group_policies_by_group/{group_id}":{"get":{"tags":["Query"],"summary":"GroupPoliciesByGroup queries group policies by group id.","operationId":"NftQuery_GroupPoliciesByGroup","parameters":[{"type":"string","format":"uint64","description":"group_id is the unique ID of the group policy's group.","name":"group_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryGroupPoliciesByGroupResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/group_policy_info/{address}":{"get":{"tags":["Query"],"summary":"GroupPolicyInfo queries group policy info based on account address of group policy.","operationId":"NftQuery_GroupPolicyInfo","parameters":[{"type":"string","description":"address is the account address of the group policy.","name":"address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryGroupPolicyInfoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/groups":{"get":{"tags":["Query"],"summary":"Groups queries all groups in state.","operationId":"NftQuery_Groups","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryGroupsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/groups_by_admin/{admin}":{"get":{"tags":["Query"],"summary":"GroupsByAdmin queries groups by admin address.","operationId":"NftQuery_GroupsByAdmin","parameters":[{"type":"string","description":"admin is the account address of a group's admin.","name":"admin","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryGroupsByAdminResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/groups_by_member/{address}":{"get":{"tags":["Query"],"summary":"GroupsByMember queries groups by member address.","operationId":"NftQuery_GroupsByMember","parameters":[{"type":"string","description":"address is the group member address.","name":"address","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryGroupsByMemberResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/proposal/{proposal_id}":{"get":{"tags":["Query"],"summary":"Proposal queries a proposal based on proposal id.","operationId":"NftQuery_ProposalMixin104","parameters":[{"type":"string","format":"uint64","description":"proposal_id is the unique ID of a proposal.","name":"proposal_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryProposalResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/proposals/{proposal_id}/tally":{"get":{"tags":["Query"],"summary":"TallyResult returns the tally result of a proposal. If the proposal is\nstill in voting period, then this query computes the current tally state,\nwhich might not be final. On the other hand, if the proposal is final,\nthen it simply returns the `final_tally_result` state stored in the\nproposal itself.","operationId":"NftQuery_TallyResultMixin104","parameters":[{"type":"string","format":"uint64","description":"proposal_id is the unique id of a proposal.","name":"proposal_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryTallyResultResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/proposals_by_group_policy/{address}":{"get":{"tags":["Query"],"summary":"ProposalsByGroupPolicy queries proposals based on account address of group policy.","operationId":"NftQuery_ProposalsByGroupPolicy","parameters":[{"type":"string","description":"address is the account address of the group policy related to proposals.","name":"address","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryProposalsByGroupPolicyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/vote_by_proposal_voter/{proposal_id}/{voter}":{"get":{"tags":["Query"],"summary":"VoteByProposalVoter queries a vote by proposal id and voter.","operationId":"NftQuery_VoteByProposalVoter","parameters":[{"type":"string","format":"uint64","description":"proposal_id is the unique ID of a proposal.","name":"proposal_id","in":"path","required":true},{"type":"string","description":"voter is a proposal voter account address.","name":"voter","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryVoteByProposalVoterResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/votes_by_proposal/{proposal_id}":{"get":{"tags":["Query"],"summary":"VotesByProposal queries a vote by proposal id.","operationId":"NftQuery_VotesByProposal","parameters":[{"type":"string","format":"uint64","description":"proposal_id is the unique ID of a proposal.","name":"proposal_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryVotesByProposalResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/votes_by_voter/{voter}":{"get":{"tags":["Query"],"summary":"VotesByVoter queries a vote by voter.","operationId":"NftQuery_VotesByVoter","parameters":[{"type":"string","description":"voter is a proposal voter account address.","name":"voter","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryVotesByVoterResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/mint/v1beta1/annual_provisions":{"get":{"tags":["Query"],"summary":"AnnualProvisions current minting annual provisions value.","operationId":"NftQuery_AnnualProvisions","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.mint.v1beta1.QueryAnnualProvisionsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/mint/v1beta1/inflation":{"get":{"tags":["Query"],"summary":"Inflation returns the current minting inflation value.","operationId":"NftQuery_Inflation","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.mint.v1beta1.QueryInflationResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/mint/v1beta1/params":{"get":{"tags":["Query"],"summary":"Params returns the total set of minting parameters.","operationId":"NftQuery_ParamsMixin109","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.mint.v1beta1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/nft/v1beta1/balance/{owner}/{class_id}":{"get":{"tags":["Query"],"summary":"Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721","operationId":"NftQuery_BalanceMixin115","parameters":[{"type":"string","description":"owner is the owner address of the nft","name":"owner","in":"path","required":true},{"type":"string","description":"class_id associated with the nft","name":"class_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.nft.v1beta1.QueryBalanceResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/nft/v1beta1/classes":{"get":{"tags":["Query"],"summary":"Classes queries all NFT classes","operationId":"NftQuery_Classes","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.nft.v1beta1.QueryClassesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/nft/v1beta1/classes/{class_id}":{"get":{"tags":["Query"],"summary":"Class queries an NFT class based on its id","operationId":"NftQuery_Class","parameters":[{"type":"string","description":"class_id associated with the nft","name":"class_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.nft.v1beta1.QueryClassResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/nft/v1beta1/nfts":{"get":{"tags":["Query"],"summary":"NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in\nERC721Enumerable","operationId":"NftQuery_NFTs","parameters":[{"type":"string","description":"class_id associated with the nft","name":"class_id","in":"query"},{"type":"string","description":"owner is the owner address of the nft","name":"owner","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.nft.v1beta1.QueryNFTsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/nft/v1beta1/nfts/{class_id}/{id}":{"get":{"tags":["Query"],"summary":"NFT queries an NFT based on its class and id.","operationId":"NftQuery_NFT","parameters":[{"type":"string","description":"class_id associated with the nft","name":"class_id","in":"path","required":true},{"type":"string","description":"id is a unique identifier of the NFT","name":"id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.nft.v1beta1.QueryNFTResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/nft/v1beta1/owner/{class_id}/{id}":{"get":{"tags":["Query"],"summary":"Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721","operationId":"NftQuery_Owner","parameters":[{"type":"string","description":"class_id associated with the nft","name":"class_id","in":"path","required":true},{"type":"string","description":"id is a unique identifier of the NFT","name":"id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.nft.v1beta1.QueryOwnerResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/nft/v1beta1/supply/{class_id}":{"get":{"tags":["Query"],"summary":"Supply queries the number of NFTs from the given class, same as totalSupply of ERC721.","operationId":"NftQuery_Supply","parameters":[{"type":"string","description":"class_id associated with the nft","name":"class_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.nft.v1beta1.QuerySupplyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/params/v1beta1/params":{"get":{"tags":["Query"],"summary":"Params queries a specific parameter of a module, given its subspace and\nkey.","operationId":"NftQuery_ParamsMixin118","parameters":[{"type":"string","description":"subspace defines the module to query the parameter for.","name":"subspace","in":"query"},{"type":"string","description":"key defines the key of the parameter in the subspace.","name":"key","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.params.v1beta1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/params/v1beta1/subspaces":{"get":{"tags":["Query"],"summary":"Subspaces queries for all registered subspaces and all keys for a subspace.","operationId":"NftQuery_Subspaces","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.params.v1beta1.QuerySubspacesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/protocolpool/v1/community_pool":{"get":{"tags":["Query"],"summary":"CommunityPool queries the community pool coins.","operationId":"NftQuery_CommunityPoolMixin120","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.protocolpool.v1.QueryCommunityPoolResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/protocolpool/v1/continuous_funds":{"get":{"tags":["Query"],"summary":"ContinuousFunds queries all continuous funds in the store.","operationId":"NftQuery_ContinuousFunds","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.protocolpool.v1.QueryContinuousFundsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/protocolpool/v1/continuous_funds/{recipient}":{"get":{"tags":["Query"],"summary":"ContinuousFund queries a continuous fund by the recipient is is associated with.","operationId":"NftQuery_ContinuousFund","parameters":[{"type":"string","description":"recipient is the recipient address to query unclaimed budget amount for.","name":"recipient","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.protocolpool.v1.QueryContinuousFundResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/protocolpool/v1/params":{"get":{"tags":["Query"],"summary":"Params returns the total set of x/protocolpool parameters.","operationId":"NftQuery_ParamsMixin120","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.protocolpool.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/slashing/v1beta1/params":{"get":{"tags":["Query"],"summary":"Params queries the parameters of slashing module","operationId":"NftQuery_ParamsMixin125","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.slashing.v1beta1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/slashing/v1beta1/signing_infos":{"get":{"tags":["Query"],"summary":"SigningInfos queries signing info of all validators","operationId":"NftQuery_SigningInfos","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.slashing.v1beta1.QuerySigningInfosResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/slashing/v1beta1/signing_infos/{cons_address}":{"get":{"tags":["Query"],"summary":"SigningInfo queries the signing info of given cons address","operationId":"NftQuery_SigningInfo","parameters":[{"type":"string","description":"cons_address is the address to query signing info of","name":"cons_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.slashing.v1beta1.QuerySigningInfoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/delegations/{delegator_addr}":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"DelegatorDelegations queries all delegations of a given delegator address.","operationId":"NftQuery_DelegatorDelegations","parameters":[{"type":"string","description":"delegator_addr defines the delegator address to query for.","name":"delegator_addr","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"Redelegations queries redelegations of given address.","operationId":"NftQuery_Redelegations","parameters":[{"type":"string","description":"delegator_addr defines the delegator address to query for.","name":"delegator_addr","in":"path","required":true},{"type":"string","description":"src_validator_addr defines the validator address to redelegate from.","name":"src_validator_addr","in":"query"},{"type":"string","description":"dst_validator_addr defines the validator address to redelegate to.","name":"dst_validator_addr","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryRedelegationsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"DelegatorUnbondingDelegations queries all unbonding delegations of a given\ndelegator address.","operationId":"NftQuery_DelegatorUnbondingDelegations","parameters":[{"type":"string","description":"delegator_addr defines the delegator address to query for.","name":"delegator_addr","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"DelegatorValidators queries all validators info for given delegator\naddress.","operationId":"NftQuery_DelegatorValidatorsMixin130","parameters":[{"type":"string","description":"delegator_addr defines the delegator address to query for.","name":"delegator_addr","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}":{"get":{"tags":["Query"],"summary":"DelegatorValidator queries validator info for given delegator validator\npair.","operationId":"NftQuery_DelegatorValidator","parameters":[{"type":"string","description":"delegator_addr defines the delegator address to query for.","name":"delegator_addr","in":"path","required":true},{"type":"string","description":"validator_addr defines the validator address to query for.","name":"validator_addr","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/historical_info/{height}":{"get":{"tags":["Query"],"summary":"HistoricalInfo queries the historical info for given height.","operationId":"NftQuery_HistoricalInfo","parameters":[{"type":"string","format":"int64","description":"height defines at which height to query the historical info.","name":"height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryHistoricalInfoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the staking parameters.","operationId":"NftQuery_ParamsMixin130","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/pool":{"get":{"tags":["Query"],"summary":"Pool queries the pool info.","operationId":"NftQuery_Pool","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryPoolResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/validators":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"Validators queries all validators that match the given status.","operationId":"NftQuery_Validators","parameters":[{"type":"string","description":"status enables to query for validators matching a given status.","name":"status","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryValidatorsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/validators/{validator_addr}":{"get":{"tags":["Query"],"summary":"Validator queries validator info for given validator address.","operationId":"NftQuery_Validator","parameters":[{"type":"string","description":"validator_addr defines the validator address to query for.","name":"validator_addr","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryValidatorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/validators/{validator_addr}/delegations":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"ValidatorDelegations queries delegate info for given validator.","operationId":"NftQuery_ValidatorDelegations","parameters":[{"type":"string","description":"validator_addr defines the validator address to query for.","name":"validator_addr","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}":{"get":{"tags":["Query"],"summary":"Delegation queries delegate info for given validator delegator pair.","operationId":"NftQuery_Delegation","parameters":[{"type":"string","description":"validator_addr defines the validator address to query for.","name":"validator_addr","in":"path","required":true},{"type":"string","description":"delegator_addr defines the delegator address to query for.","name":"delegator_addr","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryDelegationResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation":{"get":{"tags":["Query"],"summary":"UnbondingDelegation queries unbonding info for given validator delegator\npair.","operationId":"NftQuery_UnbondingDelegation","parameters":[{"type":"string","description":"validator_addr defines the validator address to query for.","name":"validator_addr","in":"path","required":true},{"type":"string","description":"delegator_addr defines the delegator address to query for.","name":"delegator_addr","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"ValidatorUnbondingDelegations queries unbonding delegations of a validator.","operationId":"NftQuery_ValidatorUnbondingDelegations","parameters":[{"type":"string","description":"validator_addr defines the validator address to query for.","name":"validator_addr","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/tx/v1beta1/decode":{"post":{"tags":["Service"],"summary":"TxDecode decodes the transaction.","operationId":"NftService_TxDecode","parameters":[{"description":"TxDecodeRequest is the request type for the Service.TxDecode\nRPC method.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.TxDecodeRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.TxDecodeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/tx/v1beta1/decode/amino":{"post":{"tags":["Service"],"summary":"TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON.","operationId":"NftService_TxDecodeAmino","parameters":[{"description":"TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino\nRPC method.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.TxDecodeAminoRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.TxDecodeAminoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/tx/v1beta1/encode":{"post":{"tags":["Service"],"summary":"TxEncode encodes the transaction.","operationId":"NftService_TxEncode","parameters":[{"description":"TxEncodeRequest is the request type for the Service.TxEncode\nRPC method.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.TxEncodeRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.TxEncodeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/tx/v1beta1/encode/amino":{"post":{"tags":["Service"],"summary":"TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes.","operationId":"NftService_TxEncodeAmino","parameters":[{"description":"TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino\nRPC method.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.TxEncodeAminoRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.TxEncodeAminoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/tx/v1beta1/simulate":{"post":{"tags":["Service"],"summary":"Simulate simulates executing a transaction for estimating gas usage.","operationId":"NftService_Simulate","parameters":[{"description":"SimulateRequest is the request type for the Service.Simulate\nRPC method.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.SimulateRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.SimulateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/tx/v1beta1/txs":{"get":{"tags":["Service"],"summary":"GetTxsEvent fetches txs by event.","operationId":"NftService_GetTxsEvent","parameters":[{"type":"array","items":{"type":"string"},"collectionFormat":"multi","description":"events is the list of transaction event type.\nDeprecated post v0.47.x: use query instead, which should contain a valid\nevents query.","name":"events","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"},{"enum":["ORDER_BY_UNSPECIFIED","ORDER_BY_ASC","ORDER_BY_DESC"],"type":"string","default":"ORDER_BY_UNSPECIFIED","description":" - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults\nto ASC in this case.\n - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order\n - ORDER_BY_DESC: ORDER_BY_DESC defines descending order","name":"order_by","in":"query"},{"type":"string","format":"uint64","description":"page is the page number to query, starts at 1. If not provided, will\ndefault to first page.","name":"page","in":"query"},{"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.","name":"limit","in":"query"},{"type":"string","description":"query defines the transaction event query that is proxied to Tendermint's\nTxSearch RPC method. The query must be valid.","name":"query","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.GetTxsEventResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}},"post":{"tags":["Service"],"summary":"BroadcastTx broadcast transaction.","operationId":"NftService_BroadcastTx","parameters":[{"description":"BroadcastTxRequest is the request type for the Service.BroadcastTxRequest\nRPC method.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.BroadcastTxRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.BroadcastTxResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/tx/v1beta1/txs/block/{height}":{"get":{"tags":["Service"],"summary":"GetBlockWithTxs fetches a block with decoded txs.","operationId":"NftService_GetBlockWithTxs","parameters":[{"type":"string","format":"int64","description":"height is the height of the block to query.","name":"height","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.GetBlockWithTxsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/tx/v1beta1/txs/{hash}":{"get":{"tags":["Service"],"summary":"GetTx fetches a tx by hash.","operationId":"NftService_GetTx","parameters":[{"type":"string","description":"hash is the tx hash to query, encoded as a hex string.","name":"hash","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.GetTxResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/upgrade/v1beta1/applied_plan/{name}":{"get":{"tags":["Query"],"summary":"AppliedPlan queries a previously applied upgrade plan by its name.","operationId":"NftQuery_AppliedPlan","parameters":[{"type":"string","description":"name is the name of the applied plan to query for.","name":"name","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.upgrade.v1beta1.QueryAppliedPlanResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/upgrade/v1beta1/authority":{"get":{"tags":["Query"],"summary":"Returns the account with authority to conduct upgrades","operationId":"NftQuery_Authority","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.upgrade.v1beta1.QueryAuthorityResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/upgrade/v1beta1/current_plan":{"get":{"tags":["Query"],"summary":"CurrentPlan queries the current upgrade plan.","operationId":"NftQuery_CurrentPlan","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.upgrade.v1beta1.QueryCurrentPlanResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/upgrade/v1beta1/module_versions":{"get":{"tags":["Query"],"summary":"ModuleVersions queries the list of module versions from state.","operationId":"NftQuery_ModuleVersions","parameters":[{"type":"string","description":"module_name is a field to query a specific module\nconsensus version from state. Leaving this empty will\nfetch the full list of module versions from state","name":"module_name","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.upgrade.v1beta1.QueryModuleVersionsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}":{"get":{"tags":["Query"],"summary":"UpgradedConsensusState queries the consensus state that will serve\nas a trusted kernel for the next version of this chain. It will only be\nstored at the last height of this chain.\nUpgradedConsensusState RPC not supported with legacy querier\nThis rpc is deprecated now that IBC has its own replacement\n(https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54)","operationId":"NftQuery_UpgradedConsensusState","parameters":[{"type":"string","format":"int64","description":"last height of the current chain must be sent in request\nas this is the height under which next consensus state is stored","name":"last_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/interchain_accounts/controller/v1/owners/{owner}/connections/{connection_id}":{"get":{"tags":["Query"],"summary":"InterchainAccount returns the interchain account address for a given owner address on a given connection","operationId":"ControllerQuery_InterchainAccount","parameters":[{"type":"string","name":"owner","in":"path","required":true},{"type":"string","name":"connection_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/interchain_accounts/controller/v1/params":{"get":{"tags":["Query"],"summary":"Params queries all parameters of the ICA controller submodule.","operationId":"ControllerQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/interchain_accounts/host/v1/params":{"get":{"tags":["Query"],"summary":"Params queries all parameters of the ICA host submodule.","operationId":"ControllerQuery_ParamsMixin161","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.interchain_accounts.host.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/transfer/v1/channels/{channel_id}/ports/{port_id}/escrow_address":{"get":{"tags":["Query"],"summary":"EscrowAddress returns the escrow address for a particular port and channel id.","operationId":"ControllerQuery_EscrowAddress","parameters":[{"type":"string","description":"unique channel identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"unique port identifier","name":"port_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.transfer.v1.QueryEscrowAddressResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/transfer/v1/denom_hashes/{trace}":{"get":{"tags":["Query"],"summary":"DenomHash queries a denomination hash information.","operationId":"ControllerQuery_DenomHash","parameters":[{"pattern":".+","type":"string","description":"The denomination trace ([port_id]/[channel_id])+/[denom]","name":"trace","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.transfer.v1.QueryDenomHashResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/transfer/v1/denoms":{"get":{"tags":["Query"],"summary":"Denoms queries all denominations","operationId":"ControllerQuery_Denoms","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.transfer.v1.QueryDenomsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/transfer/v1/denoms/{hash}":{"get":{"tags":["Query"],"summary":"Denom queries a denomination","operationId":"ControllerQuery_Denom","parameters":[{"pattern":".+","type":"string","description":"hash (in hex format) or denom (full denom with ibc prefix) of the on chain denomination.","name":"hash","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.transfer.v1.QueryDenomResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/transfer/v1/params":{"get":{"tags":["Query"],"summary":"Params queries all parameters of the ibc-transfer module.","operationId":"ControllerQuery_ParamsMixin170","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.transfer.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/transfer/v1/total_escrow/{denom}":{"get":{"tags":["Query"],"summary":"TotalEscrowForDenom returns the total amount of tokens in escrow based on the denom.","operationId":"ControllerQuery_TotalEscrowForDenom","parameters":[{"pattern":".+","type":"string","name":"denom","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels":{"get":{"tags":["Query"],"summary":"Channels queries all the IBC channels of a chain.","operationId":"ControllerQuery_Channels","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryChannelsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}":{"get":{"tags":["Query"],"summary":"Channel queries an IBC Channel.","operationId":"ControllerQuery_Channel","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryChannelResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/client_state":{"get":{"tags":["Query"],"summary":"ChannelClientState queries for the client state for the channel associated\nwith the provided channel identifiers.","operationId":"ControllerQuery_ChannelClientState","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryChannelClientStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height}":{"get":{"tags":["Query"],"summary":"ChannelConsensusState queries for the consensus state for the channel\nassociated with the provided channel identifiers.","operationId":"ControllerQuery_ChannelConsensusState","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true},{"type":"string","format":"uint64","description":"revision number of the consensus state","name":"revision_number","in":"path","required":true},{"type":"string","format":"uint64","description":"revision height of the consensus state","name":"revision_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryChannelConsensusStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence":{"get":{"tags":["Query"],"summary":"NextSequenceReceive returns the next receive sequence for a given channel.","operationId":"ControllerQuery_NextSequenceReceive","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryNextSequenceReceiveResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence_send":{"get":{"tags":["Query"],"summary":"NextSequenceSend returns the next send sequence for a given channel.","operationId":"ControllerQuery_NextSequenceSend","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryNextSequenceSendResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements":{"get":{"tags":["Query"],"summary":"PacketAcknowledgements returns all the packet acknowledgements associated\nwith a channel.","operationId":"ControllerQuery_PacketAcknowledgements","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"},{"type":"array","items":{"type":"string","format":"uint64"},"collectionFormat":"multi","description":"list of packet sequences","name":"packet_commitment_sequences","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryPacketAcknowledgementsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}":{"get":{"tags":["Query"],"summary":"PacketAcknowledgement queries a stored packet acknowledgement hash.","operationId":"ControllerQuery_PacketAcknowledgement","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true},{"type":"string","format":"uint64","description":"packet sequence","name":"sequence","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryPacketAcknowledgementResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments":{"get":{"tags":["Query"],"summary":"PacketCommitments returns all the packet commitments hashes associated\nwith a channel.","operationId":"ControllerQuery_PacketCommitments","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryPacketCommitmentsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks":{"get":{"tags":["Query"],"summary":"UnreceivedAcks returns all the unreceived IBC acknowledgements associated\nwith a channel and sequences.","operationId":"ControllerQuery_UnreceivedAcks","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true},{"minItems":1,"type":"array","items":{"type":"string","format":"uint64"},"collectionFormat":"csv","description":"list of acknowledgement sequences","name":"packet_ack_sequences","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryUnreceivedAcksResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets":{"get":{"tags":["Query"],"summary":"UnreceivedPackets returns all the unreceived IBC packets associated with a\nchannel and sequences.","operationId":"ControllerQuery_UnreceivedPackets","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true},{"minItems":1,"type":"array","items":{"type":"string","format":"uint64"},"collectionFormat":"csv","description":"list of packet sequences","name":"packet_commitment_sequences","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryUnreceivedPacketsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}":{"get":{"tags":["Query"],"summary":"PacketCommitment queries a stored packet commitment hash.","operationId":"ControllerQuery_PacketCommitment","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true},{"type":"string","format":"uint64","description":"packet sequence","name":"sequence","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryPacketCommitmentResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}":{"get":{"tags":["Query"],"summary":"PacketReceipt queries if a given packet sequence has been received on the\nqueried chain","operationId":"ControllerQuery_PacketReceipt","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true},{"type":"string","format":"uint64","description":"packet sequence","name":"sequence","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryPacketReceiptResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/connections/{connection}/channels":{"get":{"tags":["Query"],"summary":"ConnectionChannels queries all the channels associated with a connection\nend.","operationId":"ControllerQuery_ConnectionChannels","parameters":[{"type":"string","description":"connection unique identifier","name":"connection","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryConnectionChannelsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v2/clients/{client_id}/next_sequence_send":{"get":{"tags":["Query"],"summary":"NextSequenceSend returns the next send sequence for a given channel.","operationId":"ControllerQuery_NextSequenceSendMixin180","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v2.QueryNextSequenceSendResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v2/clients/{client_id}/packet_acknowledgements":{"get":{"tags":["Query"],"summary":"PacketAcknowledgements returns all packet acknowledgements associated with a channel.","operationId":"ControllerQuery_PacketAcknowledgementsMixin180","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"},{"type":"array","items":{"type":"string","format":"uint64"},"collectionFormat":"multi","description":"list of packet sequences","name":"packet_commitment_sequences","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v2.QueryPacketAcknowledgementsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v2/clients/{client_id}/packet_acks/{sequence}":{"get":{"tags":["Query"],"summary":"PacketAcknowledgement queries a stored acknowledgement commitment hash.","operationId":"ControllerQuery_PacketAcknowledgementMixin180","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true},{"type":"string","format":"uint64","description":"packet sequence","name":"sequence","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v2.QueryPacketAcknowledgementResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v2/clients/{client_id}/packet_commitments":{"get":{"tags":["Query"],"summary":"PacketCommitments queries a stored packet commitment hash.","operationId":"ControllerQuery_PacketCommitmentsMixin180","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v2.QueryPacketCommitmentsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v2/clients/{client_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks":{"get":{"tags":["Query"],"summary":"UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a channel and sequences.","operationId":"ControllerQuery_UnreceivedAcksMixin180","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true},{"minItems":1,"type":"array","items":{"type":"string","format":"uint64"},"collectionFormat":"csv","description":"list of acknowledgement sequences","name":"packet_ack_sequences","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v2.QueryUnreceivedAcksResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v2/clients/{client_id}/packet_commitments/{sequences}/unreceived_packets":{"get":{"tags":["Query"],"summary":"UnreceivedPackets returns all the unreceived IBC packets associated with a channel and sequences.","operationId":"ControllerQuery_UnreceivedPacketsMixin180","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true},{"minItems":1,"type":"array","items":{"type":"string","format":"uint64"},"collectionFormat":"csv","description":"list of packet sequences","name":"sequences","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v2.QueryUnreceivedPacketsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v2/clients/{client_id}/packet_commitments/{sequence}":{"get":{"tags":["Query"],"summary":"PacketCommitment queries a stored packet commitment hash.","operationId":"ControllerQuery_PacketCommitmentMixin180","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true},{"type":"string","format":"uint64","description":"packet sequence","name":"sequence","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v2.QueryPacketCommitmentResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v2/clients/{client_id}/packet_receipts/{sequence}":{"get":{"tags":["Query"],"summary":"PacketReceipt queries a stored packet receipt.","operationId":"ControllerQuery_PacketReceiptMixin180","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true},{"type":"string","format":"uint64","description":"packet sequence","name":"sequence","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v2.QueryPacketReceiptResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/client_creator/{client_id}":{"get":{"tags":["Query"],"summary":"ClientCreator queries the creator of a given client.","operationId":"ControllerQuery_ClientCreator","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryClientCreatorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/client_states":{"get":{"tags":["Query"],"summary":"ClientStates queries all the IBC light clients of a chain.","operationId":"ControllerQuery_ClientStates","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryClientStatesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/client_states/{client_id}":{"get":{"tags":["Query"],"summary":"ClientState queries an IBC light client.","operationId":"ControllerQuery_ClientState","parameters":[{"type":"string","description":"client state unique identifier","name":"client_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryClientStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/client_status/{client_id}":{"get":{"tags":["Query"],"summary":"Status queries the status of an IBC client.","operationId":"ControllerQuery_ClientStatus","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryClientStatusResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/consensus_states/{client_id}":{"get":{"tags":["Query"],"summary":"ConsensusStates queries all the consensus state associated with a given\nclient.","operationId":"ControllerQuery_ConsensusStates","parameters":[{"type":"string","description":"client identifier","name":"client_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryConsensusStatesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/consensus_states/{client_id}/heights":{"get":{"tags":["Query"],"summary":"ConsensusStateHeights queries the height of every consensus states associated with a given client.","operationId":"ControllerQuery_ConsensusStateHeights","parameters":[{"type":"string","description":"client identifier","name":"client_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryConsensusStateHeightsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}":{"get":{"tags":["Query"],"summary":"ConsensusState queries a consensus state associated with a client state at\na given height.","operationId":"ControllerQuery_ConsensusState","parameters":[{"type":"string","description":"client identifier","name":"client_id","in":"path","required":true},{"type":"string","format":"uint64","description":"consensus state revision number","name":"revision_number","in":"path","required":true},{"type":"string","format":"uint64","description":"consensus state revision height","name":"revision_height","in":"path","required":true},{"type":"boolean","description":"latest_height overrides the height field and queries the latest stored\nConsensusState","name":"latest_height","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryConsensusStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/params":{"get":{"tags":["Query"],"summary":"ClientParams queries all parameters of the ibc client submodule.","operationId":"ControllerQuery_ClientParams","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryClientParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/upgraded_client_states":{"get":{"tags":["Query"],"summary":"UpgradedClientState queries an Upgraded IBC light client.","operationId":"ControllerQuery_UpgradedClientState","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryUpgradedClientStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/upgraded_consensus_states":{"get":{"tags":["Query"],"summary":"UpgradedConsensusState queries an Upgraded IBC consensus state.","operationId":"ControllerQuery_UpgradedConsensusState","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryUpgradedConsensusStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/verify_membership":{"post":{"tags":["Query"],"summary":"VerifyMembership queries an IBC light client for proof verification of a value at a given key path.","operationId":"ControllerQuery_VerifyMembership","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryVerifyMembershipRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryVerifyMembershipResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v2/config/{client_id}":{"get":{"tags":["Query"],"summary":"Config queries the IBC client v2 configuration for a given client.","operationId":"ControllerQuery_Config","parameters":[{"type":"string","description":"client state unique identifier","name":"client_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v2.QueryConfigResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v2/counterparty_info/{client_id}":{"get":{"tags":["Query"],"summary":"CounterpartyInfo queries an IBC light counter party info.","operationId":"ControllerQuery_CounterpartyInfo","parameters":[{"type":"string","description":"client state unique identifier","name":"client_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v2.QueryCounterpartyInfoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/connection/v1/client_connections/{client_id}":{"get":{"tags":["Query"],"summary":"ClientConnections queries the connection paths associated with a client\nstate.","operationId":"ControllerQuery_ClientConnections","parameters":[{"type":"string","description":"client identifier associated with a connection","name":"client_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.connection.v1.QueryClientConnectionsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/connection/v1/connections":{"get":{"tags":["Query"],"summary":"Connections queries all the IBC connections of a chain.","operationId":"ControllerQuery_Connections","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.connection.v1.QueryConnectionsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/connection/v1/connections/{connection_id}":{"get":{"tags":["Query"],"summary":"Connection queries an IBC connection end.","operationId":"ControllerQuery_Connection","parameters":[{"type":"string","description":"connection unique identifier","name":"connection_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.connection.v1.QueryConnectionResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/connection/v1/connections/{connection_id}/client_state":{"get":{"tags":["Query"],"summary":"ConnectionClientState queries the client state associated with the\nconnection.","operationId":"ControllerQuery_ConnectionClientState","parameters":[{"type":"string","description":"connection identifier","name":"connection_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.connection.v1.QueryConnectionClientStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/connection/v1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height}":{"get":{"tags":["Query"],"summary":"ConnectionConsensusState queries the consensus state associated with the\nconnection.","operationId":"ControllerQuery_ConnectionConsensusState","parameters":[{"type":"string","description":"connection identifier","name":"connection_id","in":"path","required":true},{"type":"string","format":"uint64","name":"revision_number","in":"path","required":true},{"type":"string","format":"uint64","name":"revision_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.connection.v1.QueryConnectionConsensusStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/connection/v1/params":{"get":{"tags":["Query"],"summary":"ConnectionParams queries all parameters of the ibc connection submodule.","operationId":"ControllerQuery_ConnectionParams","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.connection.v1.QueryConnectionParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/lightclients/wasm/v1/checksums":{"get":{"tags":["Query"],"summary":"Get all Wasm checksums","operationId":"ControllerQuery_Checksums","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.lightclients.wasm.v1.QueryChecksumsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/lightclients/wasm/v1/checksums/{checksum}/code":{"get":{"tags":["Query"],"summary":"Get Wasm code for given checksum","operationId":"ControllerQuery_Code","parameters":[{"type":"string","description":"checksum is a hex encoded string of the code stored.","name":"checksum","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.lightclients.wasm.v1.QueryCodeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/abci/v1/validator_set_with_powers/{block_height}":{"get":{"tags":["Query"],"operationId":"GithubComnode101IopulsarChainQuery_GetValidatorSetWithPowers","parameters":[{"type":"string","format":"int64","name":"block_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.abci.QueryGetValidatorSetWithPowersResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/abci/v1/vote_ext_body_by_height/{vote_extension_height}":{"get":{"tags":["Query"],"summary":"VoteExtBodyByHeight queries the vote extension body for a vote-extension\nconsensus height.","operationId":"GithubComnode101IopulsarChainQuery_VoteExtBodyByHeight","parameters":[{"type":"string","format":"int64","description":"vote_extension_height is the consensus height N where the vote extension is\nproduced. The returned body signs the transition from state N-2 to state N-1.","name":"vote_extension_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.abci.QueryVoteExtBodyByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/actions_reduced_root":{"get":{"tags":["Query"],"summary":"ActionsReducedRoot Queries a list of ActionsReducedRoot items.","operationId":"GithubComnode101IopulsarChainQuery_ActionsReducedRoot","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryActionsReducedRootResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/latest_action_hashes":{"get":{"tags":["Query"],"summary":"LatestActionHashes Queries a list of LatestActionHashes items.","operationId":"GithubComnode101IopulsarChainQuery_LatestActionHashes","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryLatestActionHashesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_user_cosmos_public_key/{user_mina_public_key}":{"get":{"tags":["Query"],"summary":"GetUserCosmosPublicKey Queries a list of GetUserCosmosPublicKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserCosmosPublicKey","parameters":[{"type":"string","format":"byte","name":"user_mina_public_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserCosmosPublicKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_user_mina_public_key/{user_cosmos_public_key}":{"get":{"tags":["Query"],"summary":"GetUserMinaPublicKey Queries a list of GetUserMinaPublicKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserMinaPublicKey","parameters":[{"type":"string","format":"byte","name":"user_cosmos_public_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserMinaPublicKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_cosmos_pub_key/{validator_mina_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorCosmosPubKey Queries a list of GetValidatorCosmosPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorCosmosPubKey","parameters":[{"type":"string","format":"byte","name":"validator_mina_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_mina_pub_key/{validator_cosmos_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorMinaPubKey Queries a list of GetValidatorMinaPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorMinaPubKey","parameters":[{"type":"string","format":"byte","name":"validator_cosmos_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_set_with_mina_keys":{"get":{"tags":["Query"],"summary":"GetValidatorSetWithMinaKeys returns the supplied validator set with each validator's registered Mina public key.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorSetWithMinaKeys","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorSetWithMinaKeysResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/key_signing_challenge":{"get":{"tags":["Query"],"summary":"GetKeySigningChallenge returns the state-bound field a Mina wallet must sign.","operationId":"GithubComnode101IopulsarChainQuery_GetKeySigningChallenge","parameters":[{"enum":["KEY_SIGNING_OPERATION_UNSPECIFIED","KEY_SIGNING_OPERATION_REGISTER","KEY_SIGNING_OPERATION_UPDATE"],"type":"string","default":"KEY_SIGNING_OPERATION_UNSPECIFIED","description":" - KEY_SIGNING_OPERATION_UNSPECIFIED: KEY_SIGNING_OPERATION_UNSPECIFIED is invalid for signing requests.\n - KEY_SIGNING_OPERATION_REGISTER: KEY_SIGNING_OPERATION_REGISTER creates the first stable-key association.\n - KEY_SIGNING_OPERATION_UPDATE: KEY_SIGNING_OPERATION_UPDATE replaces an existing Mina key.","name":"operation","in":"query"},{"enum":["ACTOR_TYPE_UNSPECIFIED","ACTOR_TYPE_USER","ACTOR_TYPE_VALIDATOR"],"type":"string","default":"ACTOR_TYPE_UNSPECIFIED","description":" - ACTOR_TYPE_UNSPECIFIED: ACTOR_TYPE_UNSPECIFIED is invalid for key-registry operations.\n - ACTOR_TYPE_USER: ACTOR_TYPE_USER identifies a user account key association.\n - ACTOR_TYPE_VALIDATOR: ACTOR_TYPE_VALIDATOR identifies a validator consensus key association.","name":"actor_type","in":"query"},{"type":"string","format":"byte","name":"cosmos_public_key","in":"query"},{"type":"string","format":"byte","name":"new_mina_public_key","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetKeySigningChallengeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin17","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/smartaccounts/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin22","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.smartaccounts.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/commitments/{validator}":{"get":{"tags":["Query"],"summary":"CommitmentsByValidator lists retained commitments for a validator.","operationId":"GithubComnode101IopulsarChainQuery_CommitmentsByValidator","parameters":[{"type":"string","name":"validator","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryCommitmentsByValidatorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/commitments/{validator}/{commitment_height}":{"get":{"tags":["Query"],"summary":"Commitment returns one retained validator commitment.","operationId":"GithubComnode101IopulsarChainQuery_Commitment","parameters":[{"type":"string","name":"validator","in":"path","required":true},{"type":"string","format":"uint64","name":"commitment_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryCommitmentResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/params":{"get":{"tags":["Query"],"summary":"Params returns module parameters.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin26","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/height/{submission_height}":{"get":{"tags":["Query"],"summary":"ProofsByHeight lists proofs submitted at a height.","operationId":"GithubComnode101IopulsarChainQuery_ProofsByHeight","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofsByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/verification-id/{verification_id}":{"get":{"tags":["Query"],"summary":"ProofByVerificationId resolves the permanent verification request registry.","operationId":"GithubComnode101IopulsarChainQuery_ProofByVerificationId","parameters":[{"type":"string","format":"byte","name":"verification_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"Proof returns a pending or finalized proof by key.","operationId":"GithubComnode101IopulsarChainQuery_Proof","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/results/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"FinalProofResult returns an immutable finalized result.","operationId":"GithubComnode101IopulsarChainQuery_FinalProofResult","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryFinalProofResultResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/tallies/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"ProofTally returns the active tally for a pending proof.","operationId":"GithubComnode101IopulsarChainQuery_ProofTally","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofTallyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/votes/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"VerificationVotes lists effective votes for a proof.","operationId":"GithubComnode101IopulsarChainQuery_VerificationVotes","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryVerificationVotesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/votes/{submission_height}/{index_in_block}/{validator}":{"get":{"tags":["Query"],"summary":"Vote returns one validator's effective vote for a proof.","operationId":"GithubComnode101IopulsarChainQuery_Vote","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true},{"type":"string","name":"validator","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryVoteResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/votepersistence/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin32","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/votepersistence/v1/vote_extensions":{"get":{"tags":["Query"],"summary":"VoteExtensions queries the currently persisted vote extensions.","operationId":"GithubComnode101IopulsarChainQuery_VoteExtensions","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.QueryVoteExtensionsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}}},"definitions":{"cosmos.auth.v1beta1.AddressBytesToStringResponse":{"description":"AddressBytesToStringResponse is the response type for AddressString rpc method.","type":"object","properties":{"address_string":{"type":"string"}}},"cosmos.auth.v1beta1.AddressStringToBytesResponse":{"description":"AddressStringToBytesResponse is the response type for AddressBytes rpc method.","type":"object","properties":{"address_bytes":{"type":"string","format":"byte"}}},"cosmos.auth.v1beta1.BaseAccount":{"description":"BaseAccount defines a base account type. It contains all the necessary fields\nfor basic account functionality. Any custom account type should extend this\ntype for additional functionality (e.g. vesting).","type":"object","properties":{"account_number":{"type":"string","format":"uint64"},"address":{"type":"string"},"pub_key":{"$ref":"#/definitions/google.protobuf.Any"},"sequence":{"type":"string","format":"uint64"}}},"cosmos.auth.v1beta1.Bech32PrefixResponse":{"description":"Bech32PrefixResponse is the response type for Bech32Prefix rpc method.","type":"object","properties":{"bech32_prefix":{"type":"string"}}},"cosmos.auth.v1beta1.Params":{"description":"Params defines the parameters for the auth module.","type":"object","properties":{"max_memo_characters":{"type":"string","format":"uint64"},"sig_verify_cost_ed25519":{"type":"string","format":"uint64"},"sig_verify_cost_secp256k1":{"type":"string","format":"uint64"},"tx_sig_limit":{"type":"string","format":"uint64"},"tx_size_cost_per_byte":{"type":"string","format":"uint64"}}},"cosmos.auth.v1beta1.QueryAccountAddressByIDResponse":{"type":"object","title":"QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method","properties":{"account_address":{"type":"string"}}},"cosmos.auth.v1beta1.QueryAccountInfoResponse":{"description":"QueryAccountInfoResponse is the Query/AccountInfo response type.","type":"object","properties":{"info":{"description":"info is the account info which is represented by BaseAccount.","$ref":"#/definitions/cosmos.auth.v1beta1.BaseAccount"}}},"cosmos.auth.v1beta1.QueryAccountResponse":{"description":"QueryAccountResponse is the response type for the Query/Account RPC method.","type":"object","properties":{"account":{"description":"account defines the account of the corresponding address.","$ref":"#/definitions/google.protobuf.Any"}}},"cosmos.auth.v1beta1.QueryAccountsResponse":{"description":"QueryAccountsResponse is the response type for the Query/Accounts RPC method.","type":"object","properties":{"accounts":{"type":"array","title":"accounts are the existing accounts","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.auth.v1beta1.QueryModuleAccountByNameResponse":{"description":"QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method.","type":"object","properties":{"account":{"$ref":"#/definitions/google.protobuf.Any"}}},"cosmos.auth.v1beta1.QueryModuleAccountsResponse":{"description":"QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method.","type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}}}},"cosmos.auth.v1beta1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params defines the parameters of the module.","$ref":"#/definitions/cosmos.auth.v1beta1.Params"}}},"cosmos.authz.v1beta1.Grant":{"description":"Grant gives permissions to execute\nthe provide method with expiration time.","type":"object","properties":{"authorization":{"$ref":"#/definitions/google.protobuf.Any"},"expiration":{"type":"string","format":"date-time","title":"time when the grant will expire and will be pruned. If null, then the grant\ndoesn't have a time expiration (other conditions in `authorization`\nmay apply to invalidate the grant)"}}},"cosmos.authz.v1beta1.GrantAuthorization":{"type":"object","title":"GrantAuthorization extends a grant with both the addresses of the grantee and granter.\nIt is used in genesis.proto and query.proto","properties":{"authorization":{"$ref":"#/definitions/google.protobuf.Any"},"expiration":{"type":"string","format":"date-time"},"grantee":{"type":"string"},"granter":{"type":"string"}}},"cosmos.authz.v1beta1.QueryGranteeGrantsResponse":{"description":"QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method.","type":"object","properties":{"grants":{"description":"grants is a list of grants granted to the grantee.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.authz.v1beta1.GrantAuthorization"}},"pagination":{"description":"pagination defines an pagination for the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.authz.v1beta1.QueryGranterGrantsResponse":{"description":"QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method.","type":"object","properties":{"grants":{"description":"grants is a list of grants granted by the granter.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.authz.v1beta1.GrantAuthorization"}},"pagination":{"description":"pagination defines an pagination for the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.authz.v1beta1.QueryGrantsResponse":{"description":"QueryGrantsResponse is the response type for the Query/Authorizations RPC method.","type":"object","properties":{"grants":{"description":"authorizations is a list of grants granted for grantee by granter.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.authz.v1beta1.Grant"}},"pagination":{"description":"pagination defines an pagination for the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.bank.v1beta1.DenomOwner":{"description":"DenomOwner defines structure representing an account that owns or holds a\nparticular denominated token. It contains the account address and account\nbalance of the denominated token.","type":"object","properties":{"address":{"description":"address defines the address that owns a particular denomination.","type":"string"},"balance":{"description":"balance is the balance of the denominated coin for an account.","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}},"cosmos.bank.v1beta1.DenomUnit":{"description":"DenomUnit represents a struct that describes a given\ndenomination unit of the basic token.","type":"object","properties":{"aliases":{"type":"array","title":"aliases is a list of string aliases for the given denom","items":{"type":"string"}},"denom":{"description":"denom represents the string name of the given denom unit (e.g uatom).","type":"string"},"exponent":{"description":"exponent represents power of 10 exponent that one must\nraise the base_denom to in order to equal the given DenomUnit's denom\n1 denom = 10^exponent base_denom\n(e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with\nexponent = 6, thus: 1 atom = 10^6 uatom).","type":"integer","format":"int64"}}},"cosmos.bank.v1beta1.Metadata":{"description":"Metadata represents a struct that describes\na basic token.","type":"object","properties":{"base":{"description":"base represents the base denom (should be the DenomUnit with exponent = 0).","type":"string"},"denom_units":{"type":"array","title":"denom_units represents the list of DenomUnit's for a given coin","items":{"type":"object","$ref":"#/definitions/cosmos.bank.v1beta1.DenomUnit"}},"description":{"type":"string"},"display":{"description":"display indicates the suggested denom that should be\ndisplayed in clients.","type":"string"},"name":{"type":"string","title":"name defines the name of the token (eg: Cosmos Atom)"},"symbol":{"description":"symbol is the token symbol usually shown on exchanges (eg: ATOM). This can\nbe the same as the display.","type":"string"},"uri":{"description":"URI to a document (on or off-chain) that contains additional information. Optional.","type":"string"},"uri_hash":{"description":"URIHash is a sha256 hash of a document pointed by URI. It's used to verify that\nthe document didn't change. Optional.","type":"string"}}},"cosmos.bank.v1beta1.Params":{"description":"Params defines the parameters for the bank module.","type":"object","properties":{"default_send_enabled":{"type":"boolean"},"send_enabled":{"description":"Deprecated: Use of SendEnabled in params is deprecated.\nFor genesis, use the newly added send_enabled field in the genesis object.\nStorage, lookup, and manipulation of this information is now in the keeper.\n\nAs of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.bank.v1beta1.SendEnabled"}}}},"cosmos.bank.v1beta1.QueryAllBalancesResponse":{"description":"QueryAllBalancesResponse is the response type for the Query/AllBalances RPC\nmethod.","type":"object","properties":{"balances":{"description":"balances is the balances of all the coins.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.bank.v1beta1.QueryBalanceResponse":{"description":"QueryBalanceResponse is the response type for the Query/Balance RPC method.","type":"object","properties":{"balance":{"description":"balance is the balance of the coin.","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}},"cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse":{"description":"QueryDenomMetadataByQueryStringResponse is the response type for the Query/DenomMetadata RPC\nmethod. Identical with QueryDenomMetadataResponse but receives denom as query string in request.","type":"object","properties":{"metadata":{"description":"metadata describes and provides all the client information for the requested token.","$ref":"#/definitions/cosmos.bank.v1beta1.Metadata"}}},"cosmos.bank.v1beta1.QueryDenomMetadataResponse":{"description":"QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC\nmethod.","type":"object","properties":{"metadata":{"description":"metadata describes and provides all the client information for the requested token.","$ref":"#/definitions/cosmos.bank.v1beta1.Metadata"}}},"cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse":{"description":"QueryDenomOwnersByQueryResponse defines the RPC response of a DenomOwnersByQuery RPC query.","type":"object","properties":{"denom_owners":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.bank.v1beta1.DenomOwner"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.bank.v1beta1.QueryDenomOwnersResponse":{"description":"QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query.","type":"object","properties":{"denom_owners":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.bank.v1beta1.DenomOwner"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.bank.v1beta1.QueryDenomsMetadataResponse":{"description":"QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC\nmethod.","type":"object","properties":{"metadatas":{"description":"metadata provides the client information for all the registered tokens.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.bank.v1beta1.Metadata"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.bank.v1beta1.QueryParamsResponse":{"description":"QueryParamsResponse defines the response type for querying x/bank parameters.","type":"object","properties":{"params":{"description":"params provides the parameters of the bank module.","$ref":"#/definitions/cosmos.bank.v1beta1.Params"}}},"cosmos.bank.v1beta1.QuerySendEnabledResponse":{"description":"QuerySendEnabledResponse defines the RPC response of a SendEnable query.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response. This field is only\npopulated if the denoms field in the request is empty.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"send_enabled":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.bank.v1beta1.SendEnabled"}}}},"cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse":{"description":"QuerySpendableBalanceByDenomResponse defines the gRPC response structure for\nquerying an account's spendable balance for a specific denom.","type":"object","properties":{"balance":{"description":"balance is the balance of the coin.","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}},"cosmos.bank.v1beta1.QuerySpendableBalancesResponse":{"description":"QuerySpendableBalancesResponse defines the gRPC response structure for querying\nan account's spendable balances.","type":"object","properties":{"balances":{"description":"balances is the spendable balances of all the coins.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.bank.v1beta1.QuerySupplyOfResponse":{"description":"QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method.","type":"object","properties":{"amount":{"description":"amount is the supply of the coin.","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}},"cosmos.bank.v1beta1.QueryTotalSupplyResponse":{"type":"object","title":"QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC\nmethod","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"supply":{"type":"array","title":"supply is the supply of the coins","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}}},"cosmos.bank.v1beta1.SendEnabled":{"description":"SendEnabled maps coin denom to a send_enabled status (whether a denom is\nsendable).","type":"object","properties":{"denom":{"type":"string"},"enabled":{"type":"boolean"}}},"cosmos.base.abci.v1beta1.ABCIMessageLog":{"description":"ABCIMessageLog defines a structure containing an indexed tx ABCI message log.","type":"object","properties":{"events":{"description":"Events contains a slice of Event objects that were emitted during some\nexecution.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.abci.v1beta1.StringEvent"}},"log":{"type":"string"},"msg_index":{"type":"integer","format":"int64"}}},"cosmos.base.abci.v1beta1.Attribute":{"description":"Attribute defines an attribute wrapper where the key and value are\nstrings instead of raw bytes.","type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}},"cosmos.base.abci.v1beta1.GasInfo":{"description":"GasInfo defines tx execution gas context.","type":"object","properties":{"gas_used":{"description":"GasUsed is the amount of gas actually consumed.","type":"string","format":"uint64"},"gas_wanted":{"description":"GasWanted is the maximum units of work we allow this tx to perform.","type":"string","format":"uint64"}}},"cosmos.base.abci.v1beta1.Result":{"description":"Result is the union of ResponseFormat and ResponseCheckTx.","type":"object","properties":{"data":{"description":"Data is any data returned from message or handler execution. It MUST be\nlength prefixed in order to separate data from multiple message executions.\nDeprecated. This field is still populated, but prefer msg_response instead\nbecause it also contains the Msg response typeURL.","type":"string","format":"byte"},"events":{"description":"Events contains a slice of Event objects that were emitted during message\nor handler execution.","type":"array","items":{"type":"object","$ref":"#/definitions/tendermint.abci.Event"}},"log":{"description":"Log contains the log information from message or handler execution.","type":"string"},"msg_responses":{"description":"msg_responses contains the Msg handler responses type packed in Anys.","type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}}}},"cosmos.base.abci.v1beta1.StringEvent":{"description":"StringEvent defines en Event object wrapper where all the attributes\ncontain key/value pairs that are strings instead of raw bytes.","type":"object","properties":{"attributes":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.abci.v1beta1.Attribute"}},"type":{"type":"string"}}},"cosmos.base.abci.v1beta1.TxResponse":{"description":"TxResponse defines a structure containing relevant tx data and metadata. The\ntags are stringified and the log is JSON decoded.","type":"object","properties":{"code":{"description":"Response code.","type":"integer","format":"int64"},"codespace":{"type":"string","title":"Namespace for the Code"},"data":{"description":"Result bytes, if any.","type":"string"},"events":{"description":"Events defines all the events emitted by processing a transaction. Note,\nthese events include those emitted by processing all the messages and those\nemitted from the ante. Whereas Logs contains the events, with\nadditional metadata, emitted only by processing the messages.","type":"array","items":{"type":"object","$ref":"#/definitions/tendermint.abci.Event"}},"gas_used":{"description":"Amount of gas consumed by transaction.","type":"string","format":"int64"},"gas_wanted":{"description":"Amount of gas requested for transaction.","type":"string","format":"int64"},"height":{"type":"string","format":"int64","title":"The block height"},"info":{"description":"Additional information. May be non-deterministic.","type":"string"},"logs":{"description":"The output of the application's logger (typed). May be non-deterministic.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.abci.v1beta1.ABCIMessageLog"}},"raw_log":{"description":"The output of the application's logger (raw string). May be\nnon-deterministic.","type":"string"},"timestamp":{"description":"Time of the previous block. For heights \u003e 1, it's the weighted median of\nthe timestamps of the valid votes in the block.LastCommit. For height == 1,\nit's genesis time.","type":"string"},"tx":{"description":"The request transaction bytes.","$ref":"#/definitions/google.protobuf.Any"},"txhash":{"description":"The transaction hash.","type":"string"}}},"cosmos.base.node.v1beta1.ConfigResponse":{"description":"ConfigResponse defines the response structure for the Config gRPC query.","type":"object","properties":{"halt_height":{"type":"string","format":"uint64"},"minimum_gas_price":{"type":"string"},"pruning_interval":{"type":"string"},"pruning_keep_recent":{"type":"string"}}},"cosmos.base.node.v1beta1.StatusResponse":{"description":"StateResponse defines the response structure for the status of a node.","type":"object","properties":{"app_hash":{"type":"string","format":"byte","title":"app hash of the current block"},"earliest_store_height":{"type":"string","format":"uint64","title":"earliest block height available in the store"},"height":{"type":"string","format":"uint64","title":"current block height"},"timestamp":{"type":"string","format":"date-time","title":"block height timestamp"},"validator_hash":{"type":"string","format":"byte","title":"validator hash provided by the consensus header"}}},"cosmos.base.query.v1beta1.PageRequest":{"description":"message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }","type":"object","title":"PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:","properties":{"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.","type":"boolean"},"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.","type":"string","format":"byte"},"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.","type":"string","format":"uint64"},"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.","type":"string","format":"uint64"},"reverse":{"description":"reverse is set to true if results are to be returned in the descending order.","type":"boolean"}}},"cosmos.base.query.v1beta1.PageResponse":{"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 }","type":"object","properties":{"next_key":{"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.","type":"string","format":"byte"},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}},"cosmos.base.reflection.v1beta1.ListAllInterfacesResponse":{"description":"ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC.","type":"object","properties":{"interface_names":{"description":"interface_names is an array of all the registered interfaces.","type":"array","items":{"type":"string"}}}},"cosmos.base.reflection.v1beta1.ListImplementationsResponse":{"description":"ListImplementationsResponse is the response type of the ListImplementations\nRPC.","type":"object","properties":{"implementation_message_names":{"type":"array","items":{"type":"string"}}}},"cosmos.base.reflection.v2alpha1.AuthnDescriptor":{"type":"object","title":"AuthnDescriptor provides information on how to sign transactions without relying\non the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures","properties":{"sign_modes":{"type":"array","title":"sign_modes defines the supported signature algorithm","items":{"type":"object","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.SigningModeDescriptor"}}}},"cosmos.base.reflection.v2alpha1.ChainDescriptor":{"type":"object","title":"ChainDescriptor describes chain information of the application","properties":{"id":{"type":"string","title":"id is the chain id"}}},"cosmos.base.reflection.v2alpha1.CodecDescriptor":{"type":"object","title":"CodecDescriptor describes the registered interfaces and provides metadata information on the types","properties":{"interfaces":{"type":"array","title":"interfaces is a list of the registerted interfaces descriptors","items":{"type":"object","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.InterfaceDescriptor"}}}},"cosmos.base.reflection.v2alpha1.ConfigurationDescriptor":{"type":"object","title":"ConfigurationDescriptor contains metadata information on the sdk.Config","properties":{"bech32_account_address_prefix":{"type":"string","title":"bech32_account_address_prefix is the account address prefix"}}},"cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse":{"type":"object","title":"GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC","properties":{"authn":{"title":"authn describes how to authenticate to the application when sending transactions","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.AuthnDescriptor"}}},"cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse":{"type":"object","title":"GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC","properties":{"chain":{"title":"chain describes application chain information","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.ChainDescriptor"}}},"cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse":{"type":"object","title":"GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC","properties":{"codec":{"title":"codec describes the application codec such as registered interfaces and implementations","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.CodecDescriptor"}}},"cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse":{"type":"object","title":"GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC","properties":{"config":{"title":"config describes the application's sdk.Config","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.ConfigurationDescriptor"}}},"cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse":{"type":"object","title":"GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC","properties":{"queries":{"title":"queries provides information on the available queryable services","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.QueryServicesDescriptor"}}},"cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse":{"type":"object","title":"GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC","properties":{"tx":{"title":"tx provides information on msgs that can be forwarded to the application\nalongside the accepted transaction protobuf type","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.TxDescriptor"}}},"cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor":{"type":"object","title":"InterfaceAcceptingMessageDescriptor describes a protobuf message which contains\nan interface represented as a google.protobuf.Any","properties":{"field_descriptor_names":{"type":"array","title":"field_descriptor_names is a list of the protobuf name (not fullname) of the field\nwhich contains the interface as google.protobuf.Any (the interface is the same, but\nit can be in multiple fields of the same proto message)","items":{"type":"string"}},"fullname":{"type":"string","title":"fullname is the protobuf fullname of the type containing the interface"}}},"cosmos.base.reflection.v2alpha1.InterfaceDescriptor":{"type":"object","title":"InterfaceDescriptor describes the implementation of an interface","properties":{"fullname":{"type":"string","title":"fullname is the name of the interface"},"interface_accepting_messages":{"type":"array","title":"interface_accepting_messages contains information regarding the proto messages which contain the interface as\ngoogle.protobuf.Any field","items":{"type":"object","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor"}},"interface_implementers":{"type":"array","title":"interface_implementers is a list of the descriptors of the interface implementers","items":{"type":"object","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor"}}}},"cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor":{"type":"object","title":"InterfaceImplementerDescriptor describes an interface implementer","properties":{"fullname":{"type":"string","title":"fullname is the protobuf queryable name of the interface implementer"},"type_url":{"type":"string","title":"type_url defines the type URL used when marshalling the type as any\nthis is required so we can provide type safe google.protobuf.Any marshalling and\nunmarshalling, making sure that we don't accept just 'any' type\nin our interface fields"}}},"cosmos.base.reflection.v2alpha1.MsgDescriptor":{"type":"object","title":"MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction","properties":{"msg_type_url":{"description":"msg_type_url contains the TypeURL of a sdk.Msg.","type":"string"}}},"cosmos.base.reflection.v2alpha1.QueryMethodDescriptor":{"type":"object","title":"QueryMethodDescriptor describes a queryable method of a query service\nno other info is provided beside method name and tendermint queryable path\nbecause it would be redundant with the grpc reflection service","properties":{"full_query_path":{"type":"string","title":"full_query_path is the path that can be used to query\nthis method via tendermint abci.Query"},"name":{"type":"string","title":"name is the protobuf name (not fullname) of the method"}}},"cosmos.base.reflection.v2alpha1.QueryServiceDescriptor":{"type":"object","title":"QueryServiceDescriptor describes a cosmos-sdk queryable service","properties":{"fullname":{"type":"string","title":"fullname is the protobuf fullname of the service descriptor"},"is_module":{"type":"boolean","title":"is_module describes if this service is actually exposed by an application's module"},"methods":{"type":"array","title":"methods provides a list of query service methods","items":{"type":"object","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.QueryMethodDescriptor"}}}},"cosmos.base.reflection.v2alpha1.QueryServicesDescriptor":{"type":"object","title":"QueryServicesDescriptor contains the list of cosmos-sdk queriable services","properties":{"query_services":{"type":"array","title":"query_services is a list of cosmos-sdk QueryServiceDescriptor","items":{"type":"object","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.QueryServiceDescriptor"}}}},"cosmos.base.reflection.v2alpha1.SigningModeDescriptor":{"type":"object","title":"SigningModeDescriptor provides information on a signing flow of the application\nNOTE(fdymylja): here we could go as far as providing an entire flow on how\nto sign a message given a SigningModeDescriptor, but it's better to think about\nthis another time","properties":{"authn_info_provider_method_fullname":{"type":"string","title":"authn_info_provider_method_fullname defines the fullname of the method to call to get\nthe metadata required to authenticate using the provided sign_modes"},"name":{"type":"string","title":"name defines the unique name of the signing mode"},"number":{"type":"integer","format":"int32","title":"number is the unique int32 identifier for the sign_mode enum"}}},"cosmos.base.reflection.v2alpha1.TxDescriptor":{"type":"object","title":"TxDescriptor describes the accepted transaction type","properties":{"fullname":{"description":"fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type)\nit is not meant to support polymorphism of transaction types, it is supposed to be used by\nreflection clients to understand if they can handle a specific transaction type in an application.","type":"string"},"msgs":{"type":"array","title":"msgs lists the accepted application messages (sdk.Msg)","items":{"type":"object","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.MsgDescriptor"}}}},"cosmos.base.tendermint.v1beta1.ABCIQueryResponse":{"description":"ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query.\n\nNote: This type is a duplicate of the ResponseQuery proto type defined in\nTendermint.","type":"object","properties":{"code":{"type":"integer","format":"int64"},"codespace":{"type":"string"},"height":{"type":"string","format":"int64"},"index":{"type":"string","format":"int64"},"info":{"type":"string","title":"nondeterministic"},"key":{"type":"string","format":"byte"},"log":{"type":"string","title":"nondeterministic"},"proof_ops":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.ProofOps"},"value":{"type":"string","format":"byte"}}},"cosmos.base.tendermint.v1beta1.Block":{"description":"Block is tendermint type Block, with the Header proposer address\nfield converted to bech32 string.","type":"object","properties":{"data":{"$ref":"#/definitions/tendermint.types.Data"},"evidence":{"$ref":"#/definitions/tendermint.types.EvidenceList"},"header":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.Header"},"last_commit":{"$ref":"#/definitions/tendermint.types.Commit"}}},"cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse":{"description":"GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method.","type":"object","properties":{"block":{"title":"Deprecated: please use `sdk_block` instead","$ref":"#/definitions/tendermint.types.Block"},"block_id":{"$ref":"#/definitions/tendermint.types.BlockID"},"sdk_block":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.Block"}}},"cosmos.base.tendermint.v1beta1.GetLatestBlockResponse":{"description":"GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method.","type":"object","properties":{"block":{"title":"Deprecated: please use `sdk_block` instead","$ref":"#/definitions/tendermint.types.Block"},"block_id":{"$ref":"#/definitions/tendermint.types.BlockID"},"sdk_block":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.Block"}}},"cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse":{"description":"GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method.","type":"object","properties":{"block_height":{"type":"string","format":"int64"},"pagination":{"description":"pagination defines an pagination for the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.tendermint.v1beta1.Validator"}}}},"cosmos.base.tendermint.v1beta1.GetNodeInfoResponse":{"description":"GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method.","type":"object","properties":{"application_version":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.VersionInfo"},"default_node_info":{"$ref":"#/definitions/tendermint.p2p.DefaultNodeInfo"}}},"cosmos.base.tendermint.v1beta1.GetSyncingResponse":{"description":"GetSyncingResponse is the response type for the Query/GetSyncing RPC method.","type":"object","properties":{"syncing":{"type":"boolean"}}},"cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse":{"description":"GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method.","type":"object","properties":{"block_height":{"type":"string","format":"int64"},"pagination":{"description":"pagination defines an pagination for the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.tendermint.v1beta1.Validator"}}}},"cosmos.base.tendermint.v1beta1.Header":{"description":"Header defines the structure of a Tendermint block header.","type":"object","properties":{"app_hash":{"type":"string","format":"byte","title":"state after txs from the previous block"},"chain_id":{"type":"string"},"consensus_hash":{"type":"string","format":"byte","title":"consensus params for current block"},"data_hash":{"type":"string","format":"byte","title":"transactions"},"evidence_hash":{"description":"evidence included in the block","type":"string","format":"byte","title":"consensus info"},"height":{"type":"string","format":"int64"},"last_block_id":{"title":"prev block info","$ref":"#/definitions/tendermint.types.BlockID"},"last_commit_hash":{"description":"commit from validators from the last block","type":"string","format":"byte","title":"hashes of block data"},"last_results_hash":{"type":"string","format":"byte","title":"root hash of all results from the txs from the previous block"},"next_validators_hash":{"type":"string","format":"byte","title":"validators for the next block"},"proposer_address":{"description":"proposer_address is the original block proposer address, formatted as a Bech32 string.\nIn Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string\nfor better UX.\n\noriginal proposer of the block","type":"string"},"time":{"type":"string","format":"date-time"},"validators_hash":{"description":"validators for the current block","type":"string","format":"byte","title":"hashes from the app output from the prev block"},"version":{"title":"basic block info","$ref":"#/definitions/tendermint.version.Consensus"}}},"cosmos.base.tendermint.v1beta1.Module":{"type":"object","title":"Module is the type for VersionInfo","properties":{"path":{"type":"string","title":"module path"},"sum":{"type":"string","title":"checksum"},"version":{"type":"string","title":"module version"}}},"cosmos.base.tendermint.v1beta1.ProofOp":{"description":"ProofOp defines an operation used for calculating Merkle root. The data could\nbe arbitrary format, providing necessary data for example neighbouring node\nhash.\n\nNote: This type is a duplicate of the ProofOp proto type defined in Tendermint.","type":"object","properties":{"data":{"type":"string","format":"byte"},"key":{"type":"string","format":"byte"},"type":{"type":"string"}}},"cosmos.base.tendermint.v1beta1.ProofOps":{"description":"ProofOps is Merkle proof defined by the list of ProofOps.\n\nNote: This type is a duplicate of the ProofOps proto type defined in Tendermint.","type":"object","properties":{"ops":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.tendermint.v1beta1.ProofOp"}}}},"cosmos.base.tendermint.v1beta1.Validator":{"description":"Validator is the type for the validator-set.","type":"object","properties":{"address":{"type":"string"},"proposer_priority":{"type":"string","format":"int64"},"pub_key":{"$ref":"#/definitions/google.protobuf.Any"},"voting_power":{"type":"string","format":"int64"}}},"cosmos.base.tendermint.v1beta1.VersionInfo":{"description":"VersionInfo is the type for the GetNodeInfoResponse message.","type":"object","properties":{"app_name":{"type":"string"},"build_deps":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.tendermint.v1beta1.Module"}},"build_tags":{"type":"string"},"cosmos_sdk_version":{"type":"string"},"git_commit":{"type":"string"},"go_version":{"type":"string"},"name":{"type":"string"},"version":{"type":"string"}}},"cosmos.base.v1beta1.Coin":{"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.","type":"object","properties":{"amount":{"type":"string"},"denom":{"type":"string"}}},"cosmos.base.v1beta1.DecCoin":{"description":"DecCoin defines a token with a denomination and a decimal amount.\n\nNOTE: The amount field is an Dec which implements the custom method\nsignatures required by gogoproto.","type":"object","properties":{"amount":{"type":"string"},"denom":{"type":"string"}}},"cosmos.circuit.v1.AccountResponse":{"description":"AccountResponse is the response type for the Query/Account RPC method.","type":"object","properties":{"permission":{"$ref":"#/definitions/cosmos.circuit.v1.Permissions"}}},"cosmos.circuit.v1.AccountsResponse":{"description":"AccountsResponse is the response type for the Query/Accounts RPC method.","type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.circuit.v1.GenesisAccountPermissions"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.circuit.v1.DisabledListResponse":{"description":"DisabledListResponse is the response type for the Query/DisabledList RPC method.","type":"object","properties":{"disabled_list":{"type":"array","items":{"type":"string"}}}},"cosmos.circuit.v1.GenesisAccountPermissions":{"type":"object","title":"GenesisAccountPermissions is the account permissions for the circuit breaker in genesis","properties":{"address":{"type":"string"},"permissions":{"$ref":"#/definitions/cosmos.circuit.v1.Permissions"}}},"cosmos.circuit.v1.Permissions":{"description":"Permissions are the permissions that an account has to trip\nor reset the circuit breaker.","type":"object","properties":{"level":{"description":"level is the level of permissions granted to this account.","$ref":"#/definitions/cosmos.circuit.v1.Permissions.Level"},"limit_type_urls":{"description":"limit_type_urls is used with LEVEL_SOME_MSGS to limit the lists of Msg type\nURLs that the account can trip. It is an error to use limit_type_urls with\na level other than LEVEL_SOME_MSGS.","type":"array","items":{"type":"string"}}}},"cosmos.circuit.v1.Permissions.Level":{"description":"Level is the permission level.\n\n - LEVEL_NONE_UNSPECIFIED: LEVEL_NONE_UNSPECIFIED indicates that the account will have no circuit\nbreaker permissions.\n - LEVEL_SOME_MSGS: LEVEL_SOME_MSGS indicates that the account will have permission to\ntrip or reset the circuit breaker for some Msg type URLs. If this level\nis chosen, a non-empty list of Msg type URLs must be provided in\nlimit_type_urls.\n - LEVEL_ALL_MSGS: LEVEL_ALL_MSGS indicates that the account can trip or reset the circuit\nbreaker for Msg's of all type URLs.\n - LEVEL_SUPER_ADMIN: LEVEL_SUPER_ADMIN indicates that the account can take all circuit breaker\nactions and can grant permissions to other accounts.","type":"string","default":"LEVEL_NONE_UNSPECIFIED","enum":["LEVEL_NONE_UNSPECIFIED","LEVEL_SOME_MSGS","LEVEL_ALL_MSGS","LEVEL_SUPER_ADMIN"]},"cosmos.consensus.v1.QueryParamsResponse":{"description":"QueryParamsResponse defines the response type for querying x/consensus parameters.","type":"object","properties":{"params":{"description":"params are the tendermint consensus params stored in the consensus module.\nPlease note that `params.version` is not populated in this response, it is\ntracked separately in the x/upgrade module.","$ref":"#/definitions/tendermint.types.ConsensusParams"}}},"cosmos.crypto.multisig.v1beta1.CompactBitArray":{"description":"CompactBitArray is an implementation of a space efficient bit array.\nThis is used to ensure that the encoded data takes up a minimal amount of\nspace after proto encoding.\nThis is not thread safe, and is not intended for concurrent usage.","type":"object","properties":{"elems":{"type":"string","format":"byte"},"extra_bits_stored":{"type":"integer","format":"int64"}}},"cosmos.distribution.v1beta1.DelegationDelegatorReward":{"description":"DelegationDelegatorReward represents the properties\nof a delegator's delegation reward.","type":"object","properties":{"reward":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.DecCoin"}},"validator_address":{"type":"string"}}},"cosmos.distribution.v1beta1.Params":{"description":"Params defines the set of params for the distribution module.","type":"object","properties":{"base_proposer_reward":{"description":"Deprecated: The base_proposer_reward field is deprecated and is no longer used\nin the x/distribution module's reward mechanism.","type":"string"},"bonus_proposer_reward":{"description":"Deprecated: The bonus_proposer_reward field is deprecated and is no longer used\nin the x/distribution module's reward mechanism.","type":"string"},"community_tax":{"type":"string"},"withdraw_addr_enabled":{"type":"boolean"}}},"cosmos.distribution.v1beta1.QueryCommunityPoolResponse":{"description":"QueryCommunityPoolResponse is the response type for the Query/CommunityPool\nRPC method.","type":"object","properties":{"pool":{"description":"pool defines community pool's coins.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.DecCoin"}}}},"cosmos.distribution.v1beta1.QueryDelegationRewardsResponse":{"description":"QueryDelegationRewardsResponse is the response type for the\nQuery/DelegationRewards RPC method.","type":"object","properties":{"rewards":{"description":"rewards defines the rewards accrued by a delegation.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.DecCoin"}}}},"cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse":{"description":"QueryDelegationTotalRewardsResponse is the response type for the\nQuery/DelegationTotalRewards RPC method.","type":"object","properties":{"rewards":{"description":"rewards defines all the rewards accrued by a delegator.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.distribution.v1beta1.DelegationDelegatorReward"}},"total":{"description":"total defines the sum of all the rewards.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.DecCoin"}}}},"cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse":{"description":"QueryDelegatorValidatorsResponse is the response type for the\nQuery/DelegatorValidators RPC method.","type":"object","properties":{"validators":{"description":"validators defines the validators a delegator is delegating for.","type":"array","items":{"type":"string"}}}},"cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse":{"description":"QueryDelegatorWithdrawAddressResponse is the response type for the\nQuery/DelegatorWithdrawAddress RPC method.","type":"object","properties":{"withdraw_address":{"description":"withdraw_address defines the delegator address to query for.","type":"string"}}},"cosmos.distribution.v1beta1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params defines the parameters of the module.","$ref":"#/definitions/cosmos.distribution.v1beta1.Params"}}},"cosmos.distribution.v1beta1.QueryValidatorCommissionResponse":{"type":"object","title":"QueryValidatorCommissionResponse is the response type for the\nQuery/ValidatorCommission RPC method","properties":{"commission":{"description":"commission defines the commission the validator received.","$ref":"#/definitions/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission"}}},"cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse":{"description":"QueryValidatorDistributionInfoResponse is the response type for the Query/ValidatorDistributionInfo RPC method.","type":"object","properties":{"commission":{"description":"commission defines the commission the validator received.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.DecCoin"}},"operator_address":{"description":"operator_address defines the validator operator address.","type":"string"},"self_bond_rewards":{"description":"self_bond_rewards defines the self delegations rewards.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.DecCoin"}}}},"cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse":{"description":"QueryValidatorOutstandingRewardsResponse is the response type for the\nQuery/ValidatorOutstandingRewards RPC method.","type":"object","properties":{"rewards":{"$ref":"#/definitions/cosmos.distribution.v1beta1.ValidatorOutstandingRewards"}}},"cosmos.distribution.v1beta1.QueryValidatorSlashesResponse":{"description":"QueryValidatorSlashesResponse is the response type for the\nQuery/ValidatorSlashes RPC method.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"slashes":{"description":"slashes defines the slashes the validator received.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.distribution.v1beta1.ValidatorSlashEvent"}}}},"cosmos.distribution.v1beta1.ValidatorAccumulatedCommission":{"description":"ValidatorAccumulatedCommission represents accumulated commission\nfor a validator kept as a running counter, can be withdrawn at any time.","type":"object","properties":{"commission":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.DecCoin"}}}},"cosmos.distribution.v1beta1.ValidatorOutstandingRewards":{"description":"ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards\nfor a validator inexpensive to track, allows simple sanity checks.","type":"object","properties":{"rewards":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.DecCoin"}}}},"cosmos.distribution.v1beta1.ValidatorSlashEvent":{"description":"ValidatorSlashEvent represents a validator slash event.\nHeight is implicit within the store key.\nThis is needed to calculate appropriate amount of staking tokens\nfor delegations which are withdrawn after a slash has occurred.","type":"object","properties":{"fraction":{"type":"string"},"validator_period":{"type":"string","format":"uint64"}}},"cosmos.epochs.v1beta1.EpochInfo":{"description":"EpochInfo is a struct that describes the data going into\na timer defined by the x/epochs module.","type":"object","properties":{"current_epoch":{"description":"current_epoch is the current epoch number, or in other words,\nhow many times has the timer 'ticked'.\nThe first tick (current_epoch=1) is defined as\nthe first block whose blocktime is greater than the EpochInfo start_time.","type":"string","format":"int64"},"current_epoch_start_height":{"type":"string","format":"int64","title":"current_epoch_start_height is the block height at which the current epoch\nstarted. (The block height at which the timer last ticked)"},"current_epoch_start_time":{"description":"current_epoch_start_time describes the start time of the current timer\ninterval. The interval is (current_epoch_start_time,\ncurrent_epoch_start_time + duration] When the timer ticks, this is set to\ncurrent_epoch_start_time = last_epoch_start_time + duration only one timer\ntick for a given identifier can occur per block.\n\nNOTE! The current_epoch_start_time may diverge significantly from the\nwall-clock time the epoch began at. Wall-clock time of epoch start may be\n\u003e\u003e current_epoch_start_time. Suppose current_epoch_start_time = 10,\nduration = 5. Suppose the chain goes offline at t=14, and comes back online\nat t=30, and produces blocks at every successive time. (t=31, 32, etc.)\n* The t=30 block will start the epoch for (10, 15]\n* The t=31 block will start the epoch for (15, 20]\n* The t=32 block will start the epoch for (20, 25]\n* The t=33 block will start the epoch for (25, 30]\n* The t=34 block will start the epoch for (30, 35]\n* The **t=36** block will start the epoch for (35, 40]","type":"string","format":"date-time"},"duration":{"description":"duration is the time in between epoch ticks.\nIn order for intended behavior to be met, duration should\nbe greater than the chains expected block time.\nDuration must be non-zero.","type":"string"},"epoch_counting_started":{"description":"epoch_counting_started is a boolean, that indicates whether this\nepoch timer has began yet.","type":"boolean"},"identifier":{"description":"identifier is a unique reference to this particular timer.","type":"string"},"start_time":{"description":"start_time is the time at which the timer first ever ticks.\nIf start_time is in the future, the epoch will not begin until the start\ntime.","type":"string","format":"date-time"}}},"cosmos.epochs.v1beta1.QueryCurrentEpochResponse":{"description":"QueryCurrentEpochResponse defines the gRPC response structure for\nquerying an epoch by its identifier.","type":"object","properties":{"current_epoch":{"type":"string","format":"int64"}}},"cosmos.epochs.v1beta1.QueryEpochInfosResponse":{"description":"QueryEpochInfosRequest defines the gRPC response structure for\nquerying all epoch info.","type":"object","properties":{"epochs":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.epochs.v1beta1.EpochInfo"}}}},"cosmos.evidence.v1beta1.QueryAllEvidenceResponse":{"description":"QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC\nmethod.","type":"object","properties":{"evidence":{"description":"evidence returns all evidences.","type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.evidence.v1beta1.QueryEvidenceResponse":{"description":"QueryEvidenceResponse is the response type for the Query/Evidence RPC method.","type":"object","properties":{"evidence":{"description":"evidence returns the requested evidence.","$ref":"#/definitions/google.protobuf.Any"}}},"cosmos.feegrant.v1beta1.Grant":{"type":"object","title":"Grant is stored in the KVStore to record a grant with full context","properties":{"allowance":{"description":"allowance can be any of basic, periodic, allowed fee allowance.","$ref":"#/definitions/google.protobuf.Any"},"grantee":{"description":"grantee is the address of the user being granted an allowance of another user's funds.","type":"string"},"granter":{"description":"granter is the address of the user granting an allowance of their funds.","type":"string"}}},"cosmos.feegrant.v1beta1.QueryAllowanceResponse":{"description":"QueryAllowanceResponse is the response type for the Query/Allowance RPC method.","type":"object","properties":{"allowance":{"description":"allowance is a allowance granted for grantee by granter.","$ref":"#/definitions/cosmos.feegrant.v1beta1.Grant"}}},"cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse":{"description":"QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method.","type":"object","properties":{"allowances":{"description":"allowances that have been issued by the granter.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.feegrant.v1beta1.Grant"}},"pagination":{"description":"pagination defines an pagination for the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.feegrant.v1beta1.QueryAllowancesResponse":{"description":"QueryAllowancesResponse is the response type for the Query/Allowances RPC method.","type":"object","properties":{"allowances":{"description":"allowances are allowance's granted for grantee by granter.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.feegrant.v1beta1.Grant"}},"pagination":{"description":"pagination defines an pagination for the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.gov.v1.Deposit":{"description":"Deposit defines an amount deposited by an account address to an active\nproposal.","type":"object","properties":{"amount":{"description":"amount to be deposited by depositor.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"depositor":{"description":"depositor defines the deposit addresses from the proposals.","type":"string"},"proposal_id":{"description":"proposal_id defines the unique id of the proposal.","type":"string","format":"uint64"}}},"cosmos.gov.v1.DepositParams":{"description":"DepositParams defines the params for deposits on governance proposals.","type":"object","properties":{"max_deposit_period":{"description":"Maximum period for Atom holders to deposit on a proposal. Initial value: 2\nmonths.","type":"string"},"min_deposit":{"description":"Minimum deposit for a proposal to enter voting period.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}}},"cosmos.gov.v1.Params":{"description":"Params defines the parameters for the x/gov module.","type":"object","properties":{"burn_proposal_deposit_prevote":{"type":"boolean","title":"burn deposits if the proposal does not enter voting period"},"burn_vote_quorum":{"type":"boolean","title":"burn deposits if a proposal does not meet quorum"},"burn_vote_veto":{"type":"boolean","title":"burn deposits if quorum with vote type no_veto is met"},"expedited_min_deposit":{"description":"Minimum expedited deposit for a proposal to enter voting period.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"expedited_threshold":{"description":"Minimum proportion of Yes votes for proposal to pass. Default value: 0.67.","type":"string"},"expedited_voting_period":{"description":"Duration of the voting period of an expedited proposal.","type":"string"},"max_deposit_period":{"description":"Maximum period for Atom holders to deposit on a proposal. Initial value: 2\nmonths.","type":"string"},"min_deposit":{"description":"Minimum deposit for a proposal to enter voting period.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"min_deposit_ratio":{"description":"The ratio representing the proportion of the deposit value minimum that must be met when making a deposit.\nDefault value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be\nrequired.","type":"string"},"min_initial_deposit_ratio":{"description":"The ratio representing the proportion of the deposit value that must be paid at proposal submission.","type":"string"},"proposal_cancel_dest":{"description":"The address which will receive (proposal_cancel_ratio * deposit) proposal deposits.\nIf empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned.","type":"string"},"proposal_cancel_ratio":{"description":"The cancel ratio which will not be returned back to the depositors when a proposal is cancelled.","type":"string"},"quorum":{"description":"Minimum percentage of total stake needed to vote for a result to be\n considered valid.","type":"string"},"threshold":{"description":"Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.","type":"string"},"veto_threshold":{"description":"Minimum value of Veto votes to Total votes ratio for proposal to be\n vetoed. Default value: 1/3.","type":"string"},"voting_period":{"description":"Duration of the voting period.","type":"string"}}},"cosmos.gov.v1.Proposal":{"description":"Proposal defines the core field members of a governance proposal.","type":"object","properties":{"deposit_end_time":{"description":"deposit_end_time is the end time for deposition.","type":"string","format":"date-time"},"expedited":{"type":"boolean","title":"expedited defines if the proposal is expedited"},"failed_reason":{"type":"string","title":"failed_reason defines the reason why the proposal failed"},"final_tally_result":{"description":"final_tally_result is the final tally result of the proposal. When\nquerying a proposal via gRPC, this field is not populated until the\nproposal's voting period has ended.","$ref":"#/definitions/cosmos.gov.v1.TallyResult"},"id":{"description":"id defines the unique id of the proposal.","type":"string","format":"uint64"},"messages":{"description":"messages are the arbitrary messages to be executed if the proposal passes.","type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"metadata":{"type":"string","title":"metadata is any arbitrary metadata attached to the proposal.\nthe recommended format of the metadata is to be found here:\nhttps://docs.cosmos.network/v0.47/modules/gov#proposal-3"},"proposer":{"type":"string","title":"proposer is the address of the proposal sumbitter"},"status":{"description":"status defines the proposal status.","$ref":"#/definitions/cosmos.gov.v1.ProposalStatus"},"submit_time":{"description":"submit_time is the time of proposal submission.","type":"string","format":"date-time"},"summary":{"type":"string","title":"summary is a short summary of the proposal"},"title":{"type":"string","title":"title is the title of the proposal"},"total_deposit":{"description":"total_deposit is the total deposit on the proposal.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"voting_end_time":{"description":"voting_end_time is the end time of voting on a proposal.","type":"string","format":"date-time"},"voting_start_time":{"description":"voting_start_time is the starting time to vote on a proposal.","type":"string","format":"date-time"}}},"cosmos.gov.v1.ProposalStatus":{"description":"ProposalStatus enumerates the valid statuses of a proposal.\n\n - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status.\n - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit\nperiod.\n - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting\nperiod.\n - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has\npassed.\n - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has\nbeen rejected.\n - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has\nfailed.","type":"string","default":"PROPOSAL_STATUS_UNSPECIFIED","enum":["PROPOSAL_STATUS_UNSPECIFIED","PROPOSAL_STATUS_DEPOSIT_PERIOD","PROPOSAL_STATUS_VOTING_PERIOD","PROPOSAL_STATUS_PASSED","PROPOSAL_STATUS_REJECTED","PROPOSAL_STATUS_FAILED"]},"cosmos.gov.v1.QueryConstitutionResponse":{"type":"object","title":"QueryConstitutionResponse is the response type for the Query/Constitution RPC method","properties":{"constitution":{"type":"string"}}},"cosmos.gov.v1.QueryDepositResponse":{"description":"QueryDepositResponse is the response type for the Query/Deposit RPC method.","type":"object","properties":{"deposit":{"description":"deposit defines the requested deposit.","$ref":"#/definitions/cosmos.gov.v1.Deposit"}}},"cosmos.gov.v1.QueryDepositsResponse":{"description":"QueryDepositsResponse is the response type for the Query/Deposits RPC method.","type":"object","properties":{"deposits":{"description":"deposits defines the requested deposits.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.gov.v1.Deposit"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.gov.v1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"deposit_params":{"description":"Deprecated: Prefer to use `params` instead.\ndeposit_params defines the parameters related to deposit.","$ref":"#/definitions/cosmos.gov.v1.DepositParams"},"params":{"description":"params defines all the paramaters of x/gov module.","$ref":"#/definitions/cosmos.gov.v1.Params"},"tally_params":{"description":"Deprecated: Prefer to use `params` instead.\ntally_params defines the parameters related to tally.","$ref":"#/definitions/cosmos.gov.v1.TallyParams"},"voting_params":{"description":"Deprecated: Prefer to use `params` instead.\nvoting_params defines the parameters related to voting.","$ref":"#/definitions/cosmos.gov.v1.VotingParams"}}},"cosmos.gov.v1.QueryProposalResponse":{"description":"QueryProposalResponse is the response type for the Query/Proposal RPC method.","type":"object","properties":{"proposal":{"description":"proposal is the requested governance proposal.","$ref":"#/definitions/cosmos.gov.v1.Proposal"}}},"cosmos.gov.v1.QueryProposalsResponse":{"description":"QueryProposalsResponse is the response type for the Query/Proposals RPC\nmethod.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"proposals":{"description":"proposals defines all the requested governance proposals.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.gov.v1.Proposal"}}}},"cosmos.gov.v1.QueryTallyResultResponse":{"description":"QueryTallyResultResponse is the response type for the Query/Tally RPC method.","type":"object","properties":{"tally":{"description":"tally defines the requested tally.","$ref":"#/definitions/cosmos.gov.v1.TallyResult"}}},"cosmos.gov.v1.QueryVoteResponse":{"description":"QueryVoteResponse is the response type for the Query/Vote RPC method.","type":"object","properties":{"vote":{"description":"vote defines the queried vote.","$ref":"#/definitions/cosmos.gov.v1.Vote"}}},"cosmos.gov.v1.QueryVotesResponse":{"description":"QueryVotesResponse is the response type for the Query/Votes RPC method.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"votes":{"description":"votes defines the queried votes.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.gov.v1.Vote"}}}},"cosmos.gov.v1.TallyParams":{"description":"TallyParams defines the params for tallying votes on governance proposals.","type":"object","properties":{"quorum":{"description":"Minimum percentage of total stake needed to vote for a result to be\nconsidered valid.","type":"string"},"threshold":{"description":"Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.","type":"string"},"veto_threshold":{"description":"Minimum value of Veto votes to Total votes ratio for proposal to be\nvetoed. Default value: 1/3.","type":"string"}}},"cosmos.gov.v1.TallyResult":{"description":"TallyResult defines a standard tally for a governance proposal.","type":"object","properties":{"abstain_count":{"description":"abstain_count is the number of abstain votes on a proposal.","type":"string"},"no_count":{"description":"no_count is the number of no votes on a proposal.","type":"string"},"no_with_veto_count":{"description":"no_with_veto_count is the number of no with veto votes on a proposal.","type":"string"},"yes_count":{"description":"yes_count is the number of yes votes on a proposal.","type":"string"}}},"cosmos.gov.v1.Vote":{"description":"Vote defines a vote on a governance proposal.\nA Vote consists of a proposal ID, the voter, and the vote option.","type":"object","properties":{"metadata":{"type":"string","title":"metadata is any arbitrary metadata attached to the vote.\nthe recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5"},"options":{"description":"options is the weighted vote options.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.gov.v1.WeightedVoteOption"}},"proposal_id":{"description":"proposal_id defines the unique id of the proposal.","type":"string","format":"uint64"},"voter":{"description":"voter is the voter address of the proposal.","type":"string"}}},"cosmos.gov.v1.VoteOption":{"description":"VoteOption enumerates the valid vote options for a given governance proposal.\n\n - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option.\n - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option.\n - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option.\n - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option.\n - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option.","type":"string","default":"VOTE_OPTION_UNSPECIFIED","enum":["VOTE_OPTION_UNSPECIFIED","VOTE_OPTION_YES","VOTE_OPTION_ABSTAIN","VOTE_OPTION_NO","VOTE_OPTION_NO_WITH_VETO"]},"cosmos.gov.v1.VotingParams":{"description":"VotingParams defines the params for voting on governance proposals.","type":"object","properties":{"voting_period":{"description":"Duration of the voting period.","type":"string"}}},"cosmos.gov.v1.WeightedVoteOption":{"description":"WeightedVoteOption defines a unit of vote for vote split.","type":"object","properties":{"option":{"description":"option defines the valid vote options, it must not contain duplicate vote options.","$ref":"#/definitions/cosmos.gov.v1.VoteOption"},"weight":{"description":"weight is the vote weight associated with the vote option.","type":"string"}}},"cosmos.gov.v1beta1.Deposit":{"description":"Deposit defines an amount deposited by an account address to an active\nproposal.","type":"object","properties":{"amount":{"description":"amount to be deposited by depositor.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"depositor":{"description":"depositor defines the deposit addresses from the proposals.","type":"string"},"proposal_id":{"description":"proposal_id defines the unique id of the proposal.","type":"string","format":"uint64"}}},"cosmos.gov.v1beta1.DepositParams":{"description":"DepositParams defines the params for deposits on governance proposals.","type":"object","properties":{"max_deposit_period":{"description":"Maximum period for Atom holders to deposit on a proposal. Initial value: 2\nmonths.","type":"string"},"min_deposit":{"description":"Minimum deposit for a proposal to enter voting period.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}}},"cosmos.gov.v1beta1.Proposal":{"description":"Proposal defines the core field members of a governance proposal.","type":"object","properties":{"content":{"description":"content is the proposal's content.","$ref":"#/definitions/google.protobuf.Any"},"deposit_end_time":{"description":"deposit_end_time is the end time for deposition.","type":"string","format":"date-time"},"final_tally_result":{"description":"final_tally_result is the final tally result of the proposal. When\nquerying a proposal via gRPC, this field is not populated until the\nproposal's voting period has ended.","$ref":"#/definitions/cosmos.gov.v1beta1.TallyResult"},"proposal_id":{"description":"proposal_id defines the unique id of the proposal.","type":"string","format":"uint64"},"status":{"description":"status defines the proposal status.","$ref":"#/definitions/cosmos.gov.v1beta1.ProposalStatus"},"submit_time":{"description":"submit_time is the time of proposal submission.","type":"string","format":"date-time"},"total_deposit":{"description":"total_deposit is the total deposit on the proposal.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"voting_end_time":{"description":"voting_end_time is the end time of voting on a proposal.","type":"string","format":"date-time"},"voting_start_time":{"description":"voting_start_time is the starting time to vote on a proposal.","type":"string","format":"date-time"}}},"cosmos.gov.v1beta1.ProposalStatus":{"description":"ProposalStatus enumerates the valid statuses of a proposal.\n\n - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status.\n - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit\nperiod.\n - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting\nperiod.\n - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has\npassed.\n - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has\nbeen rejected.\n - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has\nfailed.","type":"string","default":"PROPOSAL_STATUS_UNSPECIFIED","enum":["PROPOSAL_STATUS_UNSPECIFIED","PROPOSAL_STATUS_DEPOSIT_PERIOD","PROPOSAL_STATUS_VOTING_PERIOD","PROPOSAL_STATUS_PASSED","PROPOSAL_STATUS_REJECTED","PROPOSAL_STATUS_FAILED"]},"cosmos.gov.v1beta1.QueryDepositResponse":{"description":"QueryDepositResponse is the response type for the Query/Deposit RPC method.","type":"object","properties":{"deposit":{"description":"deposit defines the requested deposit.","$ref":"#/definitions/cosmos.gov.v1beta1.Deposit"}}},"cosmos.gov.v1beta1.QueryDepositsResponse":{"description":"QueryDepositsResponse is the response type for the Query/Deposits RPC method.","type":"object","properties":{"deposits":{"description":"deposits defines the requested deposits.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.gov.v1beta1.Deposit"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.gov.v1beta1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"deposit_params":{"description":"deposit_params defines the parameters related to deposit.","$ref":"#/definitions/cosmos.gov.v1beta1.DepositParams"},"tally_params":{"description":"tally_params defines the parameters related to tally.","$ref":"#/definitions/cosmos.gov.v1beta1.TallyParams"},"voting_params":{"description":"voting_params defines the parameters related to voting.","$ref":"#/definitions/cosmos.gov.v1beta1.VotingParams"}}},"cosmos.gov.v1beta1.QueryProposalResponse":{"description":"QueryProposalResponse is the response type for the Query/Proposal RPC method.","type":"object","properties":{"proposal":{"$ref":"#/definitions/cosmos.gov.v1beta1.Proposal"}}},"cosmos.gov.v1beta1.QueryProposalsResponse":{"description":"QueryProposalsResponse is the response type for the Query/Proposals RPC\nmethod.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"proposals":{"description":"proposals defines all the requested governance proposals.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.gov.v1beta1.Proposal"}}}},"cosmos.gov.v1beta1.QueryTallyResultResponse":{"description":"QueryTallyResultResponse is the response type for the Query/Tally RPC method.","type":"object","properties":{"tally":{"description":"tally defines the requested tally.","$ref":"#/definitions/cosmos.gov.v1beta1.TallyResult"}}},"cosmos.gov.v1beta1.QueryVoteResponse":{"description":"QueryVoteResponse is the response type for the Query/Vote RPC method.","type":"object","properties":{"vote":{"description":"vote defines the queried vote.","$ref":"#/definitions/cosmos.gov.v1beta1.Vote"}}},"cosmos.gov.v1beta1.QueryVotesResponse":{"description":"QueryVotesResponse is the response type for the Query/Votes RPC method.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"votes":{"description":"votes defines the queried votes.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.gov.v1beta1.Vote"}}}},"cosmos.gov.v1beta1.TallyParams":{"description":"TallyParams defines the params for tallying votes on governance proposals.","type":"object","properties":{"quorum":{"description":"Minimum percentage of total stake needed to vote for a result to be\nconsidered valid.","type":"string","format":"byte"},"threshold":{"description":"Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.","type":"string","format":"byte"},"veto_threshold":{"description":"Minimum value of Veto votes to Total votes ratio for proposal to be\nvetoed. Default value: 1/3.","type":"string","format":"byte"}}},"cosmos.gov.v1beta1.TallyResult":{"description":"TallyResult defines a standard tally for a governance proposal.","type":"object","properties":{"abstain":{"description":"abstain is the number of abstain votes on a proposal.","type":"string"},"no":{"description":"no is the number of no votes on a proposal.","type":"string"},"no_with_veto":{"description":"no_with_veto is the number of no with veto votes on a proposal.","type":"string"},"yes":{"description":"yes is the number of yes votes on a proposal.","type":"string"}}},"cosmos.gov.v1beta1.Vote":{"description":"Vote defines a vote on a governance proposal.\nA Vote consists of a proposal ID, the voter, and the vote option.","type":"object","properties":{"option":{"description":"Deprecated: Prefer to use `options` instead. This field is set in queries\nif and only if `len(options) == 1` and that option has weight 1. In all\nother cases, this field will default to VOTE_OPTION_UNSPECIFIED.","$ref":"#/definitions/cosmos.gov.v1beta1.VoteOption"},"options":{"description":"options is the weighted vote options.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.gov.v1beta1.WeightedVoteOption"}},"proposal_id":{"description":"proposal_id defines the unique id of the proposal.","type":"string","format":"uint64"},"voter":{"description":"voter is the voter address of the proposal.","type":"string"}}},"cosmos.gov.v1beta1.VoteOption":{"description":"VoteOption enumerates the valid vote options for a given governance proposal.\n\n - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option.\n - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option.\n - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option.\n - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option.\n - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option.","type":"string","default":"VOTE_OPTION_UNSPECIFIED","enum":["VOTE_OPTION_UNSPECIFIED","VOTE_OPTION_YES","VOTE_OPTION_ABSTAIN","VOTE_OPTION_NO","VOTE_OPTION_NO_WITH_VETO"]},"cosmos.gov.v1beta1.VotingParams":{"description":"VotingParams defines the params for voting on governance proposals.","type":"object","properties":{"voting_period":{"description":"Duration of the voting period.","type":"string"}}},"cosmos.gov.v1beta1.WeightedVoteOption":{"description":"WeightedVoteOption defines a unit of vote for vote split.","type":"object","properties":{"option":{"description":"option defines the valid vote options, it must not contain duplicate vote options.","$ref":"#/definitions/cosmos.gov.v1beta1.VoteOption"},"weight":{"description":"weight is the vote weight associated with the vote option.","type":"string"}}},"cosmos.group.v1.GroupInfo":{"description":"GroupInfo represents the high-level on-chain information for a group.","type":"object","properties":{"admin":{"description":"admin is the account address of the group's admin.","type":"string"},"created_at":{"description":"created_at is a timestamp specifying when a group was created.","type":"string","format":"date-time"},"id":{"description":"id is the unique ID of the group.","type":"string","format":"uint64"},"metadata":{"type":"string","title":"metadata is any arbitrary metadata to attached to the group.\nthe recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#group-1"},"total_weight":{"description":"total_weight is the sum of the group members' weights.","type":"string"},"version":{"type":"string","format":"uint64","title":"version is used to track changes to a group's membership structure that\nwould break existing proposals. Whenever any members weight is changed,\nor any member is added or removed this version is incremented and will\ncause proposals based on older versions of this group to fail"}}},"cosmos.group.v1.GroupMember":{"description":"GroupMember represents the relationship between a group and a member.","type":"object","properties":{"group_id":{"description":"group_id is the unique ID of the group.","type":"string","format":"uint64"},"member":{"description":"member is the member data.","$ref":"#/definitions/cosmos.group.v1.Member"}}},"cosmos.group.v1.GroupPolicyInfo":{"description":"GroupPolicyInfo represents the high-level on-chain information for a group policy.","type":"object","properties":{"address":{"description":"address is the account address of group policy.","type":"string"},"admin":{"description":"admin is the account address of the group admin.","type":"string"},"created_at":{"description":"created_at is a timestamp specifying when a group policy was created.","type":"string","format":"date-time"},"decision_policy":{"description":"decision_policy specifies the group policy's decision policy.","$ref":"#/definitions/google.protobuf.Any"},"group_id":{"description":"group_id is the unique ID of the group.","type":"string","format":"uint64"},"metadata":{"type":"string","title":"metadata is any arbitrary metadata attached to the group policy.\nthe recommended format of the metadata is to be found here:\nhttps://docs.cosmos.network/v0.47/modules/group#decision-policy-1"},"version":{"description":"version is used to track changes to a group's GroupPolicyInfo structure that\nwould create a different result on a running proposal.","type":"string","format":"uint64"}}},"cosmos.group.v1.Member":{"description":"Member represents a group member with an account address,\nnon-zero weight, metadata and added_at timestamp.","type":"object","properties":{"added_at":{"description":"added_at is a timestamp specifying when a member was added.","type":"string","format":"date-time"},"address":{"description":"address is the member's account address.","type":"string"},"metadata":{"description":"metadata is any arbitrary metadata attached to the member.","type":"string"},"weight":{"description":"weight is the member's voting weight that should be greater than 0.","type":"string"}}},"cosmos.group.v1.Proposal":{"description":"Proposal defines a group proposal. Any member of a group can submit a proposal\nfor a group policy to decide upon.\nA proposal consists of a set of `sdk.Msg`s that will be executed if the proposal\npasses as well as some optional metadata associated with the proposal.","type":"object","properties":{"executor_result":{"description":"executor_result is the final result of the proposal execution. Initial value is NotRun.","$ref":"#/definitions/cosmos.group.v1.ProposalExecutorResult"},"final_tally_result":{"description":"final_tally_result contains the sums of all weighted votes for this\nproposal for each vote option. It is empty at submission, and only\npopulated after tallying, at voting period end or at proposal execution,\nwhichever happens first.","$ref":"#/definitions/cosmos.group.v1.TallyResult"},"group_policy_address":{"description":"group_policy_address is the account address of group policy.","type":"string"},"group_policy_version":{"description":"group_policy_version tracks the version of the group policy at proposal submission.\nWhen a decision policy is changed, existing proposals from previous policy\nversions will become invalid with the `ABORTED` status.\nThis field is here for informational purposes only.","type":"string","format":"uint64"},"group_version":{"description":"group_version tracks the version of the group at proposal submission.\nThis field is here for informational purposes only.","type":"string","format":"uint64"},"id":{"description":"id is the unique id of the proposal.","type":"string","format":"uint64"},"messages":{"description":"messages is a list of `sdk.Msg`s that will be executed if the proposal passes.","type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"metadata":{"type":"string","title":"metadata is any arbitrary metadata attached to the proposal.\nthe recommended format of the metadata is to be found here:\nhttps://docs.cosmos.network/v0.47/modules/group#proposal-4"},"proposers":{"description":"proposers are the account addresses of the proposers.","type":"array","items":{"type":"string"}},"status":{"description":"status represents the high level position in the life cycle of the proposal. Initial value is Submitted.","$ref":"#/definitions/cosmos.group.v1.ProposalStatus"},"submit_time":{"description":"submit_time is a timestamp specifying when a proposal was submitted.","type":"string","format":"date-time"},"summary":{"type":"string","title":"summary is a short summary of the proposal"},"title":{"type":"string","title":"title is the title of the proposal"},"voting_period_end":{"description":"voting_period_end is the timestamp before which voting must be done.\nUnless a successful MsgExec is called before (to execute a proposal whose\ntally is successful before the voting period ends), tallying will be done\nat this point, and the `final_tally_result`and `status` fields will be\naccordingly updated.","type":"string","format":"date-time"}}},"cosmos.group.v1.ProposalExecutorResult":{"description":"ProposalExecutorResult defines types of proposal executor results.\n\n - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED: An empty value is not allowed.\n - PROPOSAL_EXECUTOR_RESULT_NOT_RUN: We have not yet run the executor.\n - PROPOSAL_EXECUTOR_RESULT_SUCCESS: The executor was successful and proposed action updated state.\n - PROPOSAL_EXECUTOR_RESULT_FAILURE: The executor returned an error and proposed action didn't update state.","type":"string","default":"PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED","enum":["PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED","PROPOSAL_EXECUTOR_RESULT_NOT_RUN","PROPOSAL_EXECUTOR_RESULT_SUCCESS","PROPOSAL_EXECUTOR_RESULT_FAILURE"]},"cosmos.group.v1.ProposalStatus":{"description":"ProposalStatus defines proposal statuses.\n\n - PROPOSAL_STATUS_UNSPECIFIED: An empty value is invalid and not allowed.\n - PROPOSAL_STATUS_SUBMITTED: Initial status of a proposal when submitted.\n - PROPOSAL_STATUS_ACCEPTED: Final status of a proposal when the final tally is done and the outcome\npasses the group policy's decision policy.\n - PROPOSAL_STATUS_REJECTED: Final status of a proposal when the final tally is done and the outcome\nis rejected by the group policy's decision policy.\n - PROPOSAL_STATUS_ABORTED: Final status of a proposal when the group policy is modified before the\nfinal tally.\n - PROPOSAL_STATUS_WITHDRAWN: A proposal can be withdrawn before the voting start time by the owner.\nWhen this happens the final status is Withdrawn.","type":"string","default":"PROPOSAL_STATUS_UNSPECIFIED","enum":["PROPOSAL_STATUS_UNSPECIFIED","PROPOSAL_STATUS_SUBMITTED","PROPOSAL_STATUS_ACCEPTED","PROPOSAL_STATUS_REJECTED","PROPOSAL_STATUS_ABORTED","PROPOSAL_STATUS_WITHDRAWN"]},"cosmos.group.v1.QueryGroupInfoResponse":{"description":"QueryGroupInfoResponse is the Query/GroupInfo response type.","type":"object","properties":{"info":{"description":"info is the GroupInfo of the group.","$ref":"#/definitions/cosmos.group.v1.GroupInfo"}}},"cosmos.group.v1.QueryGroupMembersResponse":{"description":"QueryGroupMembersResponse is the Query/GroupMembersResponse response type.","type":"object","properties":{"members":{"description":"members are the members of the group with given group_id.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.GroupMember"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.group.v1.QueryGroupPoliciesByAdminResponse":{"description":"QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type.","type":"object","properties":{"group_policies":{"description":"group_policies are the group policies info with provided admin.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.GroupPolicyInfo"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.group.v1.QueryGroupPoliciesByGroupResponse":{"description":"QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type.","type":"object","properties":{"group_policies":{"description":"group_policies are the group policies info associated with the provided group.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.GroupPolicyInfo"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.group.v1.QueryGroupPolicyInfoResponse":{"description":"QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type.","type":"object","properties":{"info":{"description":"info is the GroupPolicyInfo of the group policy.","$ref":"#/definitions/cosmos.group.v1.GroupPolicyInfo"}}},"cosmos.group.v1.QueryGroupsByAdminResponse":{"description":"QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type.","type":"object","properties":{"groups":{"description":"groups are the groups info with the provided admin.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.GroupInfo"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.group.v1.QueryGroupsByMemberResponse":{"description":"QueryGroupsByMemberResponse is the Query/GroupsByMember response type.","type":"object","properties":{"groups":{"description":"groups are the groups info with the provided group member.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.GroupInfo"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.group.v1.QueryGroupsResponse":{"description":"QueryGroupsResponse is the Query/Groups response type.","type":"object","properties":{"groups":{"description":"`groups` is all the groups present in state.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.GroupInfo"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.group.v1.QueryProposalResponse":{"description":"QueryProposalResponse is the Query/Proposal response type.","type":"object","properties":{"proposal":{"description":"proposal is the proposal info.","$ref":"#/definitions/cosmos.group.v1.Proposal"}}},"cosmos.group.v1.QueryProposalsByGroupPolicyResponse":{"description":"QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"proposals":{"description":"proposals are the proposals with given group policy.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.Proposal"}}}},"cosmos.group.v1.QueryTallyResultResponse":{"description":"QueryTallyResultResponse is the Query/TallyResult response type.","type":"object","properties":{"tally":{"description":"tally defines the requested tally.","$ref":"#/definitions/cosmos.group.v1.TallyResult"}}},"cosmos.group.v1.QueryVoteByProposalVoterResponse":{"description":"QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type.","type":"object","properties":{"vote":{"description":"vote is the vote with given proposal_id and voter.","$ref":"#/definitions/cosmos.group.v1.Vote"}}},"cosmos.group.v1.QueryVotesByProposalResponse":{"description":"QueryVotesByProposalResponse is the Query/VotesByProposal response type.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"votes":{"description":"votes are the list of votes for given proposal_id.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.Vote"}}}},"cosmos.group.v1.QueryVotesByVoterResponse":{"description":"QueryVotesByVoterResponse is the Query/VotesByVoter response type.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"votes":{"description":"votes are the list of votes by given voter.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.Vote"}}}},"cosmos.group.v1.TallyResult":{"description":"TallyResult represents the sum of weighted votes for each vote option.","type":"object","properties":{"abstain_count":{"description":"abstain_count is the weighted sum of abstainers.","type":"string"},"no_count":{"description":"no_count is the weighted sum of no votes.","type":"string"},"no_with_veto_count":{"description":"no_with_veto_count is the weighted sum of veto.","type":"string"},"yes_count":{"description":"yes_count is the weighted sum of yes votes.","type":"string"}}},"cosmos.group.v1.Vote":{"type":"object","title":"Vote represents a vote for a proposal.string metadata","properties":{"metadata":{"type":"string","title":"metadata is any arbitrary metadata attached to the vote.\nthe recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#vote-2"},"option":{"description":"option is the voter's choice on the proposal.","$ref":"#/definitions/cosmos.group.v1.VoteOption"},"proposal_id":{"description":"proposal is the unique ID of the proposal.","type":"string","format":"uint64"},"submit_time":{"description":"submit_time is the timestamp when the vote was submitted.","type":"string","format":"date-time"},"voter":{"description":"voter is the account address of the voter.","type":"string"}}},"cosmos.group.v1.VoteOption":{"description":"VoteOption enumerates the valid vote options for a given proposal.\n\n - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will\nreturn an error.\n - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option.\n - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option.\n - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option.\n - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option.","type":"string","default":"VOTE_OPTION_UNSPECIFIED","enum":["VOTE_OPTION_UNSPECIFIED","VOTE_OPTION_YES","VOTE_OPTION_ABSTAIN","VOTE_OPTION_NO","VOTE_OPTION_NO_WITH_VETO"]},"cosmos.mint.v1beta1.Params":{"description":"Params defines the parameters for the x/mint module.","type":"object","properties":{"blocks_per_year":{"type":"string","format":"uint64","title":"expected blocks per year"},"goal_bonded":{"type":"string","title":"goal of percent bonded atoms"},"inflation_max":{"type":"string","title":"maximum inflation rate"},"inflation_min":{"type":"string","title":"minimum inflation rate"},"inflation_rate_change":{"type":"string","title":"maximum annual change in inflation rate"},"mint_denom":{"type":"string","title":"type of coin to mint"}}},"cosmos.mint.v1beta1.QueryAnnualProvisionsResponse":{"description":"QueryAnnualProvisionsResponse is the response type for the\nQuery/AnnualProvisions RPC method.","type":"object","properties":{"annual_provisions":{"description":"annual_provisions is the current minting annual provisions value.","type":"string","format":"byte"}}},"cosmos.mint.v1beta1.QueryInflationResponse":{"description":"QueryInflationResponse is the response type for the Query/Inflation RPC\nmethod.","type":"object","properties":{"inflation":{"description":"inflation is the current minting inflation value.","type":"string","format":"byte"}}},"cosmos.mint.v1beta1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params defines the parameters of the module.","$ref":"#/definitions/cosmos.mint.v1beta1.Params"}}},"cosmos.nft.v1beta1.Class":{"description":"Class defines the class of the nft type.","type":"object","properties":{"data":{"title":"data is the app specific metadata of the NFT class. Optional","$ref":"#/definitions/google.protobuf.Any"},"description":{"type":"string","title":"description is a brief description of nft classification. Optional"},"id":{"type":"string","title":"id defines the unique identifier of the NFT classification, similar to the contract address of ERC721"},"name":{"type":"string","title":"name defines the human-readable name of the NFT classification. Optional"},"symbol":{"type":"string","title":"symbol is an abbreviated name for nft classification. Optional"},"uri":{"type":"string","title":"uri for the class metadata stored off chain. It can define schema for Class and NFT `Data` attributes. Optional"},"uri_hash":{"type":"string","title":"uri_hash is a hash of the document pointed by uri. Optional"}}},"cosmos.nft.v1beta1.NFT":{"description":"NFT defines the NFT.","type":"object","properties":{"class_id":{"type":"string","title":"class_id associated with the NFT, similar to the contract address of ERC721"},"data":{"title":"data is an app specific data of the NFT. Optional","$ref":"#/definitions/google.protobuf.Any"},"id":{"type":"string","title":"id is a unique identifier of the NFT"},"uri":{"type":"string","title":"uri for the NFT metadata stored off chain"},"uri_hash":{"type":"string","title":"uri_hash is a hash of the document pointed by uri"}}},"cosmos.nft.v1beta1.QueryBalanceResponse":{"type":"object","title":"QueryBalanceResponse is the response type for the Query/Balance RPC method","properties":{"amount":{"type":"string","format":"uint64","title":"amount is the number of all NFTs of a given class owned by the owner"}}},"cosmos.nft.v1beta1.QueryClassResponse":{"type":"object","title":"QueryClassResponse is the response type for the Query/Class RPC method","properties":{"class":{"description":"class defines the class of the nft type.","$ref":"#/definitions/cosmos.nft.v1beta1.Class"}}},"cosmos.nft.v1beta1.QueryClassesResponse":{"type":"object","title":"QueryClassesResponse is the response type for the Query/Classes RPC method","properties":{"classes":{"description":"class defines the class of the nft type.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.nft.v1beta1.Class"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.nft.v1beta1.QueryNFTResponse":{"type":"object","title":"QueryNFTResponse is the response type for the Query/NFT RPC method","properties":{"nft":{"title":"owner is the owner address of the nft","$ref":"#/definitions/cosmos.nft.v1beta1.NFT"}}},"cosmos.nft.v1beta1.QueryNFTsResponse":{"type":"object","title":"QueryNFTsResponse is the response type for the Query/NFTs RPC methods","properties":{"nfts":{"type":"array","title":"NFT defines the NFT","items":{"type":"object","$ref":"#/definitions/cosmos.nft.v1beta1.NFT"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.nft.v1beta1.QueryOwnerResponse":{"type":"object","title":"QueryOwnerResponse is the response type for the Query/Owner RPC method","properties":{"owner":{"type":"string","title":"owner is the owner address of the nft"}}},"cosmos.nft.v1beta1.QuerySupplyResponse":{"type":"object","title":"QuerySupplyResponse is the response type for the Query/Supply RPC method","properties":{"amount":{"type":"string","format":"uint64","title":"amount is the number of all NFTs from the given class"}}},"cosmos.params.v1beta1.ParamChange":{"description":"ParamChange defines an individual parameter change, for use in\nParameterChangeProposal.","type":"object","properties":{"key":{"type":"string"},"subspace":{"type":"string"},"value":{"type":"string"}}},"cosmos.params.v1beta1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"param":{"description":"param defines the queried parameter.","$ref":"#/definitions/cosmos.params.v1beta1.ParamChange"}}},"cosmos.params.v1beta1.QuerySubspacesResponse":{"description":"QuerySubspacesResponse defines the response types for querying for all\nregistered subspaces and all keys for a subspace.","type":"object","properties":{"subspaces":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.params.v1beta1.Subspace"}}}},"cosmos.params.v1beta1.Subspace":{"description":"Subspace defines a parameter subspace name and all the keys that exist for\nthe subspace.","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"subspace":{"type":"string"}}},"cosmos.protocolpool.v1.ContinuousFund":{"description":"ContinuousFund defines the fields of continuous fund proposal.","type":"object","properties":{"expiry":{"description":"Optional, if expiry is set, removes the state object when expired.","type":"string","format":"date-time"},"percentage":{"description":"Percentage is the percentage of funds to be allocated from Community pool.","type":"string"},"recipient":{"description":"Recipient is the address string of the account receiving funds.","type":"string"}}},"cosmos.protocolpool.v1.Params":{"description":"Params defines the parameters for the protocolpool module.","type":"object","properties":{"distribution_frequency":{"description":"DistributionFrequency is the frequency (in terms of blocks) that funds are distributed out from the\nx/protocolpool module.","type":"string","format":"uint64"},"enabled_distribution_denoms":{"description":"EnabledDistributionDenoms lists the denoms that are allowed to be distributed.\nThis is to avoid spending time distributing undesired tokens to continuous funds and budgets.","type":"array","items":{"type":"string"}}}},"cosmos.protocolpool.v1.QueryCommunityPoolResponse":{"description":"QueryCommunityPoolResponse is the response type for the Query/CommunityPool\nRPC method.","type":"object","properties":{"pool":{"description":"pool defines community pool's coins.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}}},"cosmos.protocolpool.v1.QueryContinuousFundResponse":{"description":"QueryUnclaimedBudgetResponse is the response type for the Query/ContinuousFund\nRPC method.","type":"object","properties":{"continuous_fund":{"description":"ContinuousFunds is the given continuous fund returned in the query.","$ref":"#/definitions/cosmos.protocolpool.v1.ContinuousFund"}}},"cosmos.protocolpool.v1.QueryContinuousFundsResponse":{"description":"QueryUnclaimedBudgetResponse is the response type for the Query/ContinuousFunds\nRPC method.","type":"object","properties":{"continuous_funds":{"description":"ContinuousFunds defines all continuous funds in state.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.protocolpool.v1.ContinuousFund"}}}},"cosmos.protocolpool.v1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"params":{"$ref":"#/definitions/cosmos.protocolpool.v1.Params"}}},"cosmos.slashing.v1beta1.Params":{"description":"Params represents the parameters used for by the slashing module.","type":"object","properties":{"downtime_jail_duration":{"type":"string"},"min_signed_per_window":{"type":"string","format":"byte"},"signed_blocks_window":{"type":"string","format":"int64"},"slash_fraction_double_sign":{"type":"string","format":"byte"},"slash_fraction_downtime":{"type":"string","format":"byte"}}},"cosmos.slashing.v1beta1.QueryParamsResponse":{"type":"object","title":"QueryParamsResponse is the response type for the Query/Params RPC method","properties":{"params":{"$ref":"#/definitions/cosmos.slashing.v1beta1.Params"}}},"cosmos.slashing.v1beta1.QuerySigningInfoResponse":{"type":"object","title":"QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC\nmethod","properties":{"val_signing_info":{"title":"val_signing_info is the signing info of requested val cons address","$ref":"#/definitions/cosmos.slashing.v1beta1.ValidatorSigningInfo"}}},"cosmos.slashing.v1beta1.QuerySigningInfosResponse":{"type":"object","title":"QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC\nmethod","properties":{"info":{"type":"array","title":"info is the signing info of all validators","items":{"type":"object","$ref":"#/definitions/cosmos.slashing.v1beta1.ValidatorSigningInfo"}},"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.slashing.v1beta1.ValidatorSigningInfo":{"description":"ValidatorSigningInfo defines a validator's signing info for monitoring their\nliveness activity.","type":"object","properties":{"address":{"type":"string"},"index_offset":{"description":"Index which is incremented every time a validator is bonded in a block and\n_may_ have signed a pre-commit or not. This in conjunction with the\nsigned_blocks_window param determines the index in the missed block bitmap.","type":"string","format":"int64"},"jailed_until":{"description":"Timestamp until which the validator is jailed due to liveness downtime.","type":"string","format":"date-time"},"missed_blocks_counter":{"description":"A counter of missed (unsigned) blocks. It is used to avoid unnecessary\nreads in the missed block bitmap.","type":"string","format":"int64"},"start_height":{"type":"string","format":"int64","title":"Height at which validator was first a candidate OR was un-jailed"},"tombstoned":{"description":"Whether or not a validator has been tombstoned (killed out of validator\nset). It is set once the validator commits an equivocation or for any other\nconfigured misbehavior.","type":"boolean"}}},"cosmos.staking.v1beta1.BondStatus":{"description":"BondStatus is the status of a validator.\n\n - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status.\n - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded.\n - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding.\n - BOND_STATUS_BONDED: BONDED defines a validator that is bonded.","type":"string","default":"BOND_STATUS_UNSPECIFIED","enum":["BOND_STATUS_UNSPECIFIED","BOND_STATUS_UNBONDED","BOND_STATUS_UNBONDING","BOND_STATUS_BONDED"]},"cosmos.staking.v1beta1.Commission":{"description":"Commission defines commission parameters for a given validator.","type":"object","properties":{"commission_rates":{"description":"commission_rates defines the initial commission rates to be used for creating a validator.","$ref":"#/definitions/cosmos.staking.v1beta1.CommissionRates"},"update_time":{"description":"update_time is the last time the commission rate was changed.","type":"string","format":"date-time"}}},"cosmos.staking.v1beta1.CommissionRates":{"description":"CommissionRates defines the initial commission rates to be used for creating\na validator.","type":"object","properties":{"max_change_rate":{"description":"max_change_rate defines the maximum daily increase of the validator commission, as a fraction.","type":"string"},"max_rate":{"description":"max_rate defines the maximum commission rate which validator can ever charge, as a fraction.","type":"string"},"rate":{"description":"rate is the commission rate charged to delegators, as a fraction.","type":"string"}}},"cosmos.staking.v1beta1.Delegation":{"description":"Delegation represents the bond with tokens held by an account. It is\nowned by one delegator, and is associated with the voting power of one\nvalidator.","type":"object","properties":{"delegator_address":{"description":"delegator_address is the encoded address of the delegator.","type":"string"},"shares":{"description":"shares define the delegation shares received.","type":"string"},"validator_address":{"description":"validator_address is the encoded address of the validator.","type":"string"}}},"cosmos.staking.v1beta1.DelegationResponse":{"description":"DelegationResponse is equivalent to Delegation except that it contains a\nbalance in addition to shares which is more suitable for client responses.","type":"object","properties":{"balance":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"delegation":{"$ref":"#/definitions/cosmos.staking.v1beta1.Delegation"}}},"cosmos.staking.v1beta1.Description":{"description":"Description defines a validator description.","type":"object","properties":{"details":{"description":"details define other optional details.","type":"string"},"identity":{"description":"identity defines an optional identity signature (ex. UPort or Keybase).","type":"string"},"moniker":{"description":"moniker defines a human-readable name for the validator.","type":"string"},"security_contact":{"description":"security_contact defines an optional email for security contact.","type":"string"},"website":{"description":"website defines an optional website link.","type":"string"}}},"cosmos.staking.v1beta1.HistoricalInfo":{"description":"HistoricalInfo contains header and validator information for a given block.\nIt is stored as part of staking module's state, which persists the `n` most\nrecent HistoricalInfo\n(`n` is set by the staking module's `historical_entries` parameter).","type":"object","properties":{"header":{"$ref":"#/definitions/tendermint.types.Header"},"valset":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.Validator"}}}},"cosmos.staking.v1beta1.Params":{"description":"Params defines the parameters for the x/staking module.","type":"object","properties":{"bond_denom":{"description":"bond_denom defines the bondable coin denomination.","type":"string"},"historical_entries":{"description":"historical_entries is the number of historical entries to persist.","type":"integer","format":"int64"},"max_entries":{"description":"max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio).","type":"integer","format":"int64"},"max_validators":{"description":"max_validators is the maximum number of validators.","type":"integer","format":"int64"},"min_commission_rate":{"type":"string","title":"min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators"},"unbonding_time":{"description":"unbonding_time is the time duration of unbonding.","type":"string"}}},"cosmos.staking.v1beta1.Pool":{"description":"Pool is used for tracking bonded and not-bonded token supply of the bond\ndenomination.","type":"object","properties":{"bonded_tokens":{"type":"string"},"not_bonded_tokens":{"type":"string"}}},"cosmos.staking.v1beta1.QueryDelegationResponse":{"description":"QueryDelegationResponse is response type for the Query/Delegation RPC method.","type":"object","properties":{"delegation_response":{"description":"delegation_responses defines the delegation info of a delegation.","$ref":"#/definitions/cosmos.staking.v1beta1.DelegationResponse"}}},"cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse":{"description":"QueryDelegatorDelegationsResponse is response type for the\nQuery/DelegatorDelegations RPC method.","type":"object","properties":{"delegation_responses":{"description":"delegation_responses defines all the delegations' info of a delegator.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.DelegationResponse"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse":{"description":"QueryUnbondingDelegatorDelegationsResponse is response type for the\nQuery/UnbondingDelegatorDelegations RPC method.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"unbonding_responses":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.UnbondingDelegation"}}}},"cosmos.staking.v1beta1.QueryDelegatorValidatorResponse":{"description":"QueryDelegatorValidatorResponse response type for the\nQuery/DelegatorValidator RPC method.","type":"object","properties":{"validator":{"description":"validator defines the validator info.","$ref":"#/definitions/cosmos.staking.v1beta1.Validator"}}},"cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse":{"description":"QueryDelegatorValidatorsResponse is response type for the\nQuery/DelegatorValidators RPC method.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"validators":{"description":"validators defines the validators' info of a delegator.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.Validator"}}}},"cosmos.staking.v1beta1.QueryHistoricalInfoResponse":{"description":"QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC\nmethod.","type":"object","properties":{"hist":{"description":"hist defines the historical info at the given height.","$ref":"#/definitions/cosmos.staking.v1beta1.HistoricalInfo"}}},"cosmos.staking.v1beta1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/cosmos.staking.v1beta1.Params"}}},"cosmos.staking.v1beta1.QueryPoolResponse":{"description":"QueryPoolResponse is response type for the Query/Pool RPC method.","type":"object","properties":{"pool":{"description":"pool defines the pool info.","$ref":"#/definitions/cosmos.staking.v1beta1.Pool"}}},"cosmos.staking.v1beta1.QueryRedelegationsResponse":{"description":"QueryRedelegationsResponse is response type for the Query/Redelegations RPC\nmethod.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"redelegation_responses":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.RedelegationResponse"}}}},"cosmos.staking.v1beta1.QueryUnbondingDelegationResponse":{"description":"QueryDelegationResponse is response type for the Query/UnbondingDelegation\nRPC method.","type":"object","properties":{"unbond":{"description":"unbond defines the unbonding information of a delegation.","$ref":"#/definitions/cosmos.staking.v1beta1.UnbondingDelegation"}}},"cosmos.staking.v1beta1.QueryValidatorDelegationsResponse":{"type":"object","title":"QueryValidatorDelegationsResponse is response type for the\nQuery/ValidatorDelegations RPC method","properties":{"delegation_responses":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.DelegationResponse"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.staking.v1beta1.QueryValidatorResponse":{"type":"object","title":"QueryValidatorResponse is response type for the Query/Validator RPC method","properties":{"validator":{"description":"validator defines the validator info.","$ref":"#/definitions/cosmos.staking.v1beta1.Validator"}}},"cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse":{"description":"QueryValidatorUnbondingDelegationsResponse is response type for the\nQuery/ValidatorUnbondingDelegations RPC method.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"unbonding_responses":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.UnbondingDelegation"}}}},"cosmos.staking.v1beta1.QueryValidatorsResponse":{"type":"object","title":"QueryValidatorsResponse is response type for the Query/Validators RPC method","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"validators":{"description":"validators contains all the queried validators.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.Validator"}}}},"cosmos.staking.v1beta1.Redelegation":{"description":"Redelegation contains the list of a particular delegator's redelegating bonds\nfrom a particular source validator to a particular destination validator.","type":"object","properties":{"delegator_address":{"description":"delegator_address is the bech32-encoded address of the delegator.","type":"string"},"entries":{"description":"entries are the redelegation entries.\n\nredelegation entries","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.RedelegationEntry"}},"validator_dst_address":{"description":"validator_dst_address is the validator redelegation destination operator address.","type":"string"},"validator_src_address":{"description":"validator_src_address is the validator redelegation source operator address.","type":"string"}}},"cosmos.staking.v1beta1.RedelegationEntry":{"description":"RedelegationEntry defines a redelegation object with relevant metadata.","type":"object","properties":{"completion_time":{"description":"completion_time defines the unix time for redelegation completion.","type":"string","format":"date-time"},"creation_height":{"description":"creation_height defines the height which the redelegation took place.","type":"string","format":"int64"},"initial_balance":{"description":"initial_balance defines the initial balance when redelegation started.","type":"string"},"shares_dst":{"description":"shares_dst is the amount of destination-validator shares created by redelegation.","type":"string"},"unbonding_id":{"type":"string","format":"uint64","title":"Incrementing id that uniquely identifies this entry"},"unbonding_on_hold_ref_count":{"type":"string","format":"int64","title":"Strictly positive if this entry's unbonding has been stopped by external modules"}}},"cosmos.staking.v1beta1.RedelegationEntryResponse":{"description":"RedelegationEntryResponse is equivalent to a RedelegationEntry except that it\ncontains a balance in addition to shares which is more suitable for client\nresponses.","type":"object","properties":{"balance":{"type":"string"},"redelegation_entry":{"$ref":"#/definitions/cosmos.staking.v1beta1.RedelegationEntry"}}},"cosmos.staking.v1beta1.RedelegationResponse":{"description":"RedelegationResponse is equivalent to a Redelegation except that its entries\ncontain a balance in addition to shares which is more suitable for client\nresponses.","type":"object","properties":{"entries":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.RedelegationEntryResponse"}},"redelegation":{"$ref":"#/definitions/cosmos.staking.v1beta1.Redelegation"}}},"cosmos.staking.v1beta1.UnbondingDelegation":{"description":"UnbondingDelegation stores all of a single delegator's unbonding bonds\nfor a single validator in an time-ordered list.","type":"object","properties":{"delegator_address":{"description":"delegator_address is the encoded address of the delegator.","type":"string"},"entries":{"description":"entries are the unbonding delegation entries.\n\nunbonding delegation entries","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.UnbondingDelegationEntry"}},"validator_address":{"description":"validator_address is the encoded address of the validator.","type":"string"}}},"cosmos.staking.v1beta1.UnbondingDelegationEntry":{"description":"UnbondingDelegationEntry defines an unbonding object with relevant metadata.","type":"object","properties":{"balance":{"description":"balance defines the tokens to receive at completion.","type":"string"},"completion_time":{"description":"completion_time is the unix time for unbonding completion.","type":"string","format":"date-time"},"creation_height":{"description":"creation_height is the height which the unbonding took place.","type":"string","format":"int64"},"initial_balance":{"description":"initial_balance defines the tokens initially scheduled to receive at completion.","type":"string"},"unbonding_id":{"type":"string","format":"uint64","title":"Incrementing id that uniquely identifies this entry"},"unbonding_on_hold_ref_count":{"type":"string","format":"int64","title":"Strictly positive if this entry's unbonding has been stopped by external modules"}}},"cosmos.staking.v1beta1.Validator":{"description":"Validator defines a validator, together with the total amount of the\nValidator's bond shares and their exchange rate to coins. Slashing results in\na decrease in the exchange rate, allowing correct calculation of future\nundelegations without iterating over delegators. When coins are delegated to\nthis validator, the validator is credited with a delegation whose number of\nbond shares is based on the amount of coins delegated divided by the current\nexchange rate. Voting power can be calculated as total bonded shares\nmultiplied by exchange rate.","type":"object","properties":{"commission":{"description":"commission defines the commission parameters.","$ref":"#/definitions/cosmos.staking.v1beta1.Commission"},"consensus_pubkey":{"description":"consensus_pubkey is the consensus public key of the validator, as a Protobuf Any.","$ref":"#/definitions/google.protobuf.Any"},"delegator_shares":{"description":"delegator_shares defines total shares issued to a validator's delegators.","type":"string"},"description":{"description":"description defines the description terms for the validator.","$ref":"#/definitions/cosmos.staking.v1beta1.Description"},"jailed":{"description":"jailed defined whether the validator has been jailed from bonded status or not.","type":"boolean"},"min_self_delegation":{"description":"min_self_delegation is the validator's self declared minimum self delegation.","type":"string"},"operator_address":{"description":"operator_address defines the address of the validator's operator; bech encoded in JSON.","type":"string"},"status":{"description":"status is the validator status (bonded/unbonding/unbonded).","$ref":"#/definitions/cosmos.staking.v1beta1.BondStatus"},"tokens":{"description":"tokens define the delegated tokens (incl. self-delegation).","type":"string"},"unbonding_height":{"description":"unbonding_height defines, if unbonding, the height at which this validator has begun unbonding.","type":"string","format":"int64"},"unbonding_ids":{"type":"array","title":"list of unbonding ids, each uniquely identifing an unbonding of this validator","items":{"type":"string","format":"uint64"}},"unbonding_on_hold_ref_count":{"type":"string","format":"int64","title":"strictly positive if this validator's unbonding has been stopped by external modules"},"unbonding_time":{"description":"unbonding_time defines, if unbonding, the min time for the validator to complete unbonding.","type":"string","format":"date-time"}}},"cosmos.tx.signing.v1beta1.SignMode":{"description":"SignMode represents a signing mode with its own security guarantees.\n\nThis enum should be considered a registry of all known sign modes\nin the Cosmos ecosystem. Apps are not expected to support all known\nsign modes. Apps that would like to support custom sign modes are\nencouraged to open a small PR against this file to add a new case\nto this SignMode enum describing their sign mode so that different\napps have a consistent version of this enum.\n\n - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be\nrejected.\n - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is\nverified with raw bytes from Tx.\n - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some\nhuman-readable textual representation on top of the binary representation\nfrom SIGN_MODE_DIRECT.\n\nSince: cosmos-sdk 0.50\n - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses\nSignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not\nrequire signers signing over other signers' `signer_info`.\n\nSince: cosmos-sdk 0.46\n - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses\nAmino JSON and will be removed in the future.\n - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos\nSDK. Ref: https://eips.ethereum.org/EIPS/eip-191\n\nCurrently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant,\nbut is not implemented on the SDK by default. To enable EIP-191, you need\nto pass a custom `TxConfig` that has an implementation of\n`SignModeHandler` for EIP-191. The SDK may decide to fully support\nEIP-191 in the future.\n\nSince: cosmos-sdk 0.45.2","type":"string","default":"SIGN_MODE_UNSPECIFIED","enum":["SIGN_MODE_UNSPECIFIED","SIGN_MODE_DIRECT","SIGN_MODE_TEXTUAL","SIGN_MODE_DIRECT_AUX","SIGN_MODE_LEGACY_AMINO_JSON","SIGN_MODE_EIP_191"]},"cosmos.tx.v1beta1.AuthInfo":{"description":"AuthInfo describes the fee and signer modes that are used to sign a\ntransaction.","type":"object","properties":{"fee":{"description":"Fee is the fee and gas limit for the transaction. The first signer is the\nprimary signer and the one which pays the fee. The fee can be calculated\nbased on the cost of evaluating the body and doing signature verification\nof the signers. This can be estimated via simulation.","$ref":"#/definitions/cosmos.tx.v1beta1.Fee"},"signer_infos":{"description":"signer_infos defines the signing modes for the required signers. The number\nand order of elements must match the required signers from TxBody's\nmessages. The first element is the primary signer and the one which pays\nthe fee.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.tx.v1beta1.SignerInfo"}},"tip":{"description":"Tip is the optional tip used for transactions fees paid in another denom.\n\nThis field is ignored if the chain didn't enable tips, i.e. didn't add the\n`TipDecorator` in its posthandler.","$ref":"#/definitions/cosmos.tx.v1beta1.Tip"}}},"cosmos.tx.v1beta1.BroadcastMode":{"description":"BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC\nmethod.\n\n - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering\n - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead,\nBROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards.\n - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits\nfor a CheckTx execution response only.\n - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client\nreturns immediately.","type":"string","default":"BROADCAST_MODE_UNSPECIFIED","enum":["BROADCAST_MODE_UNSPECIFIED","BROADCAST_MODE_BLOCK","BROADCAST_MODE_SYNC","BROADCAST_MODE_ASYNC"]},"cosmos.tx.v1beta1.BroadcastTxRequest":{"description":"BroadcastTxRequest is the request type for the Service.BroadcastTxRequest\nRPC method.","type":"object","properties":{"mode":{"$ref":"#/definitions/cosmos.tx.v1beta1.BroadcastMode"},"tx_bytes":{"description":"tx_bytes is the raw transaction.","type":"string","format":"byte"}}},"cosmos.tx.v1beta1.BroadcastTxResponse":{"description":"BroadcastTxResponse is the response type for the\nService.BroadcastTx method.","type":"object","properties":{"tx_response":{"description":"tx_response is the queried TxResponses.","$ref":"#/definitions/cosmos.base.abci.v1beta1.TxResponse"}}},"cosmos.tx.v1beta1.Fee":{"description":"Fee includes the amount of coins paid in fees and the maximum\ngas to be used by the transaction. The ratio yields an effective \"gasprice\",\nwhich must be above some miminum to be accepted into the mempool.","type":"object","properties":{"amount":{"type":"array","title":"amount is the amount of coins to be paid as a fee","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"gas_limit":{"type":"string","format":"uint64","title":"gas_limit is the maximum gas that can be used in transaction processing\nbefore an out of gas error occurs"},"granter":{"type":"string","title":"if set, the fee payer (either the first signer or the value of the payer\nfield) requests that a fee grant be used to pay fees instead of the fee\npayer's own balance. If an appropriate fee grant does not exist or the\nchain does not support fee grants, this will fail"},"payer":{"description":"if unset, the first signer is responsible for paying the fees. If set, the\nspecified account must pay the fees. the payer must be a tx signer (and\nthus have signed this field in AuthInfo). setting this field does *not*\nchange the ordering of required signers for the transaction.","type":"string"}}},"cosmos.tx.v1beta1.GetBlockWithTxsResponse":{"description":"GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs\nmethod.","type":"object","properties":{"block":{"$ref":"#/definitions/tendermint.types.Block"},"block_id":{"$ref":"#/definitions/tendermint.types.BlockID"},"pagination":{"description":"pagination defines a pagination for the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"txs":{"description":"txs are the transactions in the block.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.tx.v1beta1.Tx"}}}},"cosmos.tx.v1beta1.GetTxResponse":{"description":"GetTxResponse is the response type for the Service.GetTx method.","type":"object","properties":{"tx":{"description":"tx is the queried transaction.","$ref":"#/definitions/cosmos.tx.v1beta1.Tx"},"tx_response":{"description":"tx_response is the queried TxResponses.","$ref":"#/definitions/cosmos.base.abci.v1beta1.TxResponse"}}},"cosmos.tx.v1beta1.GetTxsEventResponse":{"description":"GetTxsEventResponse is the response type for the Service.TxsByEvents\nRPC method.","type":"object","properties":{"pagination":{"description":"pagination defines a pagination for the response.\nDeprecated post v0.46.x: use total instead.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"total":{"type":"string","format":"uint64","title":"total is total number of results available"},"tx_responses":{"description":"tx_responses is the list of queried TxResponses.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.abci.v1beta1.TxResponse"}},"txs":{"description":"txs is the list of queried transactions.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.tx.v1beta1.Tx"}}}},"cosmos.tx.v1beta1.ModeInfo":{"description":"ModeInfo describes the signing mode of a single or nested multisig signer.","type":"object","properties":{"multi":{"title":"multi represents a nested multisig signer","$ref":"#/definitions/cosmos.tx.v1beta1.ModeInfo.Multi"},"single":{"title":"single represents a single signer","$ref":"#/definitions/cosmos.tx.v1beta1.ModeInfo.Single"}}},"cosmos.tx.v1beta1.ModeInfo.Multi":{"type":"object","title":"Multi is the mode info for a multisig public key","properties":{"bitarray":{"title":"bitarray specifies which keys within the multisig are signing","$ref":"#/definitions/cosmos.crypto.multisig.v1beta1.CompactBitArray"},"mode_infos":{"type":"array","title":"mode_infos is the corresponding modes of the signers of the multisig\nwhich could include nested multisig public keys","items":{"type":"object","$ref":"#/definitions/cosmos.tx.v1beta1.ModeInfo"}}}},"cosmos.tx.v1beta1.ModeInfo.Single":{"type":"object","title":"Single is the mode info for a single signer. It is structured as a message\nto allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the\nfuture","properties":{"mode":{"title":"mode is the signing mode of the single signer","$ref":"#/definitions/cosmos.tx.signing.v1beta1.SignMode"}}},"cosmos.tx.v1beta1.OrderBy":{"description":"- ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults\nto ASC in this case.\n - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order\n - ORDER_BY_DESC: ORDER_BY_DESC defines descending order","type":"string","title":"OrderBy defines the sorting order","default":"ORDER_BY_UNSPECIFIED","enum":["ORDER_BY_UNSPECIFIED","ORDER_BY_ASC","ORDER_BY_DESC"]},"cosmos.tx.v1beta1.SignerInfo":{"description":"SignerInfo describes the public key and signing mode of a single top-level\nsigner.","type":"object","properties":{"mode_info":{"title":"mode_info describes the signing mode of the signer and is a nested\nstructure to support nested multisig pubkey's","$ref":"#/definitions/cosmos.tx.v1beta1.ModeInfo"},"public_key":{"description":"public_key is the public key of the signer. It is optional for accounts\nthat already exist in state. If unset, the verifier can use the required \\\nsigner address for this position and lookup the public key.","$ref":"#/definitions/google.protobuf.Any"},"sequence":{"description":"sequence is the sequence of the account, which describes the\nnumber of committed transactions signed by a given address. It is used to\nprevent replay attacks.","type":"string","format":"uint64"}}},"cosmos.tx.v1beta1.SimulateRequest":{"description":"SimulateRequest is the request type for the Service.Simulate\nRPC method.","type":"object","properties":{"tx":{"description":"tx is the transaction to simulate.\nDeprecated. Send raw tx bytes instead.","$ref":"#/definitions/cosmos.tx.v1beta1.Tx"},"tx_bytes":{"description":"tx_bytes is the raw transaction.","type":"string","format":"byte"}}},"cosmos.tx.v1beta1.SimulateResponse":{"description":"SimulateResponse is the response type for the\nService.SimulateRPC method.","type":"object","properties":{"gas_info":{"description":"gas_info is the information about gas used in the simulation.","$ref":"#/definitions/cosmos.base.abci.v1beta1.GasInfo"},"result":{"description":"result is the result of the simulation.","$ref":"#/definitions/cosmos.base.abci.v1beta1.Result"}}},"cosmos.tx.v1beta1.Tip":{"description":"Tip is the tip used for meta-transactions.","type":"object","properties":{"amount":{"type":"array","title":"amount is the amount of the tip","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"tipper":{"type":"string","title":"tipper is the address of the account paying for the tip"}}},"cosmos.tx.v1beta1.Tx":{"description":"Tx is the standard type used for broadcasting transactions.","type":"object","properties":{"auth_info":{"title":"auth_info is the authorization related content of the transaction,\nspecifically signers, signer modes and fee","$ref":"#/definitions/cosmos.tx.v1beta1.AuthInfo"},"body":{"title":"body is the processable content of the transaction","$ref":"#/definitions/cosmos.tx.v1beta1.TxBody"},"signatures":{"description":"signatures is a list of signatures that matches the length and order of\nAuthInfo's signer_infos to allow connecting signature meta information like\npublic key and signing mode by position.","type":"array","items":{"type":"string","format":"byte"}}}},"cosmos.tx.v1beta1.TxBody":{"description":"TxBody is the body of a transaction that all signers sign over.","type":"object","properties":{"extension_options":{"type":"array","title":"extension_options are arbitrary options that can be added by chains\nwhen the default options are not sufficient. If any of these are present\nand can't be handled, the transaction will be rejected","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"memo":{"description":"memo is any arbitrary note/comment to be added to the transaction.\nWARNING: in clients, any publicly exposed text should not be called memo,\nbut should be called `note` instead (see\nhttps://github.com/cosmos/cosmos-sdk/issues/9122).","type":"string"},"messages":{"description":"messages is a list of messages to be executed. The required signers of\nthose messages define the number and order of elements in AuthInfo's\nsigner_infos and Tx's signatures. Each required signer address is added to\nthe list only the first time it occurs.\nBy convention, the first required signer (usually from the first message)\nis referred to as the primary signer and pays the fee for the whole\ntransaction.","type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"non_critical_extension_options":{"type":"array","title":"extension_options are arbitrary options that can be added by chains\nwhen the default options are not sufficient. If any of these are present\nand can't be handled, they will be ignored","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"timeout_height":{"description":"timeout_height is the block height after which this transaction will not\nbe processed by the chain.","type":"string","format":"uint64"},"timeout_timestamp":{"description":"timeout_timestamp is the block time after which this transaction will not\nbe processed by the chain.\n\nNote, if unordered=true this value MUST be set\nand will act as a short-lived TTL in which the transaction is deemed valid\nand kept in memory to prevent duplicates.","type":"string","format":"date-time"},"unordered":{"description":"unordered, when set to true, indicates that the transaction signer(s)\nintend for the transaction to be evaluated and executed in an un-ordered\nfashion. Specifically, the account's nonce will NOT be checked or\nincremented, which allows for fire-and-forget as well as concurrent\ntransaction execution.\n\nNote, when set to true, the existing 'timeout_timestamp' value must\nbe set and will be used to correspond to a timestamp in which the transaction is deemed\nvalid.\n\nWhen true, the sequence value MUST be 0, and any transaction with unordered=true and a non-zero sequence value will\nbe rejected.\nExternal services that make assumptions about sequence values may need to be updated because of this.","type":"boolean"}}},"cosmos.tx.v1beta1.TxDecodeAminoRequest":{"description":"TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino\nRPC method.","type":"object","properties":{"amino_binary":{"type":"string","format":"byte"}}},"cosmos.tx.v1beta1.TxDecodeAminoResponse":{"description":"TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino\nRPC method.","type":"object","properties":{"amino_json":{"type":"string"}}},"cosmos.tx.v1beta1.TxDecodeRequest":{"description":"TxDecodeRequest is the request type for the Service.TxDecode\nRPC method.","type":"object","properties":{"tx_bytes":{"description":"tx_bytes is the raw transaction.","type":"string","format":"byte"}}},"cosmos.tx.v1beta1.TxDecodeResponse":{"description":"TxDecodeResponse is the response type for the\nService.TxDecode method.","type":"object","properties":{"tx":{"description":"tx is the decoded transaction.","$ref":"#/definitions/cosmos.tx.v1beta1.Tx"}}},"cosmos.tx.v1beta1.TxEncodeAminoRequest":{"description":"TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino\nRPC method.","type":"object","properties":{"amino_json":{"type":"string"}}},"cosmos.tx.v1beta1.TxEncodeAminoResponse":{"description":"TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino\nRPC method.","type":"object","properties":{"amino_binary":{"type":"string","format":"byte"}}},"cosmos.tx.v1beta1.TxEncodeRequest":{"description":"TxEncodeRequest is the request type for the Service.TxEncode\nRPC method.","type":"object","properties":{"tx":{"description":"tx is the transaction to encode.","$ref":"#/definitions/cosmos.tx.v1beta1.Tx"}}},"cosmos.tx.v1beta1.TxEncodeResponse":{"description":"TxEncodeResponse is the response type for the\nService.TxEncode method.","type":"object","properties":{"tx_bytes":{"description":"tx_bytes is the encoded transaction bytes.","type":"string","format":"byte"}}},"cosmos.upgrade.v1beta1.ModuleVersion":{"description":"ModuleVersion specifies a module and its consensus version.","type":"object","properties":{"name":{"type":"string","title":"name of the app module"},"version":{"type":"string","format":"uint64","title":"consensus version of the app module"}}},"cosmos.upgrade.v1beta1.Plan":{"description":"Plan specifies information about a planned upgrade and when it should occur.","type":"object","properties":{"height":{"description":"The height at which the upgrade must be performed.","type":"string","format":"int64"},"info":{"type":"string","title":"Any application specific upgrade info to be included on-chain\nsuch as a git commit that validators could automatically upgrade to"},"name":{"description":"Sets the name for the upgrade. This name will be used by the upgraded\nversion of the software to apply any special \"on-upgrade\" commands during\nthe first BeginBlock method after the upgrade is applied. It is also used\nto detect whether a software version can handle a given upgrade. If no\nupgrade handler with this name has been set in the software, it will be\nassumed that the software is out-of-date when the upgrade Time or Height is\nreached and the software will exit.","type":"string"},"time":{"description":"Deprecated: Time based upgrades have been deprecated. Time based upgrade logic\nhas been removed from the SDK.\nIf this field is not empty, an error will be thrown.","type":"string","format":"date-time"},"upgraded_client_state":{"description":"Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been\nmoved to the IBC module in the sub module 02-client.\nIf this field is not empty, an error will be thrown.","$ref":"#/definitions/google.protobuf.Any"}}},"cosmos.upgrade.v1beta1.QueryAppliedPlanResponse":{"description":"QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC\nmethod.","type":"object","properties":{"height":{"description":"height is the block height at which the plan was applied.","type":"string","format":"int64"}}},"cosmos.upgrade.v1beta1.QueryAuthorityResponse":{"type":"object","title":"QueryAuthorityResponse is the response type for Query/Authority","properties":{"address":{"type":"string"}}},"cosmos.upgrade.v1beta1.QueryCurrentPlanResponse":{"description":"QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC\nmethod.","type":"object","properties":{"plan":{"description":"plan is the current upgrade plan.","$ref":"#/definitions/cosmos.upgrade.v1beta1.Plan"}}},"cosmos.upgrade.v1beta1.QueryModuleVersionsResponse":{"description":"QueryModuleVersionsResponse is the response type for the Query/ModuleVersions\nRPC method.","type":"object","properties":{"module_versions":{"description":"module_versions is a list of module names with their consensus versions.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.upgrade.v1beta1.ModuleVersion"}}}},"cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse":{"description":"QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState\nRPC method.","type":"object","properties":{"upgraded_consensus_state":{"type":"string","format":"byte"}}},"google.protobuf.Any":{"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{}},"google.rpc.Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"details":{"type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"message":{"type":"string"}}},"ibc.applications.interchain_accounts.controller.v1.Params":{"description":"Params defines the set of on-chain interchain accounts parameters.\nThe following parameters may be used to disable the controller submodule.","type":"object","properties":{"controller_enabled":{"description":"controller_enabled enables or disables the controller submodule.","type":"boolean"}}},"ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse":{"description":"QueryInterchainAccountResponse the response type for the Query/InterchainAccount RPC method.","type":"object","properties":{"address":{"type":"string"}}},"ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params defines the parameters of the module.","$ref":"#/definitions/ibc.applications.interchain_accounts.controller.v1.Params"}}},"ibc.applications.interchain_accounts.host.v1.Params":{"description":"Params defines the set of on-chain interchain accounts parameters.\nThe following parameters may be used to disable the host submodule.","type":"object","properties":{"allow_messages":{"description":"allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain.","type":"array","items":{"type":"string"}},"host_enabled":{"description":"host_enabled enables or disables the host submodule.","type":"boolean"}}},"ibc.applications.interchain_accounts.host.v1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params defines the parameters of the module.","$ref":"#/definitions/ibc.applications.interchain_accounts.host.v1.Params"}}},"ibc.applications.transfer.v1.Denom":{"description":"Denom holds the base denom of a Token and a trace of the chains it was sent through.","type":"object","properties":{"base":{"type":"string","title":"the base token denomination"},"trace":{"type":"array","title":"the trace of the token","items":{"type":"object","$ref":"#/definitions/ibc.applications.transfer.v1.Hop"}}}},"ibc.applications.transfer.v1.Hop":{"type":"object","title":"Hop defines a port ID, channel ID pair specifying a unique \"hop\" in a trace","properties":{"channel_id":{"type":"string"},"port_id":{"type":"string"}}},"ibc.applications.transfer.v1.Params":{"description":"Params defines the set of IBC transfer parameters.\nNOTE: To prevent a single token from being transferred, set the\nTransfersEnabled parameter to true and then set the bank module's SendEnabled\nparameter for the denomination to false.","type":"object","properties":{"receive_enabled":{"description":"receive_enabled enables or disables all cross-chain token transfers to this\nchain.","type":"boolean"},"send_enabled":{"description":"send_enabled enables or disables all cross-chain token transfers from this\nchain.","type":"boolean"}}},"ibc.applications.transfer.v1.QueryDenomHashResponse":{"description":"QueryDenomHashResponse is the response type for the Query/DenomHash RPC\nmethod.","type":"object","properties":{"hash":{"description":"hash (in hex format) of the denomination trace information.","type":"string"}}},"ibc.applications.transfer.v1.QueryDenomResponse":{"description":"QueryDenomResponse is the response type for the Query/Denom RPC\nmethod.","type":"object","properties":{"denom":{"description":"denom returns the requested denomination.","$ref":"#/definitions/ibc.applications.transfer.v1.Denom"}}},"ibc.applications.transfer.v1.QueryDenomsResponse":{"description":"QueryDenomsResponse is the response type for the Query/Denoms RPC\nmethod.","type":"object","properties":{"denoms":{"description":"denoms returns all denominations.","type":"array","items":{"type":"object","$ref":"#/definitions/ibc.applications.transfer.v1.Denom"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.applications.transfer.v1.QueryEscrowAddressResponse":{"description":"QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method.","type":"object","properties":{"escrow_address":{"type":"string","title":"the escrow account address"}}},"ibc.applications.transfer.v1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params defines the parameters of the module.","$ref":"#/definitions/ibc.applications.transfer.v1.Params"}}},"ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse":{"description":"QueryTotalEscrowForDenomResponse is the response type for TotalEscrowForDenom RPC method.","type":"object","properties":{"amount":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}},"ibc.core.channel.v1.Channel":{"description":"Channel defines pipeline for exactly-once packet delivery between specific\nmodules on separate blockchains, which has at least one end capable of\nsending packets and one end capable of receiving packets.","type":"object","properties":{"connection_hops":{"type":"array","title":"list of connection identifiers, in order, along which packets sent on\nthis channel will travel","items":{"type":"string"}},"counterparty":{"title":"counterparty channel end","$ref":"#/definitions/ibc.core.channel.v1.Counterparty"},"ordering":{"title":"whether the channel is ordered or unordered","$ref":"#/definitions/ibc.core.channel.v1.Order"},"state":{"title":"current state of the channel end","$ref":"#/definitions/ibc.core.channel.v1.State"},"version":{"type":"string","title":"opaque channel version, which is agreed upon during the handshake"}}},"ibc.core.channel.v1.Counterparty":{"type":"object","title":"Counterparty defines a channel end counterparty","properties":{"channel_id":{"type":"string","title":"channel end on the counterparty chain"},"port_id":{"description":"port on the counterparty chain which owns the other end of the channel.","type":"string"}}},"ibc.core.channel.v1.IdentifiedChannel":{"description":"IdentifiedChannel defines a channel with additional port and channel\nidentifier fields.","type":"object","properties":{"channel_id":{"type":"string","title":"channel identifier"},"connection_hops":{"type":"array","title":"list of connection identifiers, in order, along which packets sent on\nthis channel will travel","items":{"type":"string"}},"counterparty":{"title":"counterparty channel end","$ref":"#/definitions/ibc.core.channel.v1.Counterparty"},"ordering":{"title":"whether the channel is ordered or unordered","$ref":"#/definitions/ibc.core.channel.v1.Order"},"port_id":{"type":"string","title":"port identifier"},"state":{"title":"current state of the channel end","$ref":"#/definitions/ibc.core.channel.v1.State"},"version":{"type":"string","title":"opaque channel version, which is agreed upon during the handshake"}}},"ibc.core.channel.v1.Order":{"description":"- ORDER_NONE_UNSPECIFIED: zero-value for channel ordering\n - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in\nwhich they were sent.\n - ORDER_ORDERED: packets are delivered exactly in the order which they were sent","type":"string","title":"Order defines if a channel is ORDERED or UNORDERED","default":"ORDER_NONE_UNSPECIFIED","enum":["ORDER_NONE_UNSPECIFIED","ORDER_UNORDERED","ORDER_ORDERED"]},"ibc.core.channel.v1.PacketState":{"description":"PacketState defines the generic type necessary to retrieve and store\npacket commitments, acknowledgements, and receipts.\nCaller is responsible for knowing the context necessary to interpret this\nstate as a commitment, acknowledgement, or a receipt.","type":"object","properties":{"channel_id":{"description":"channel unique identifier.","type":"string"},"data":{"description":"embedded data that represents packet state.","type":"string","format":"byte"},"port_id":{"description":"channel port identifier.","type":"string"},"sequence":{"description":"packet sequence.","type":"string","format":"uint64"}}},"ibc.core.channel.v1.QueryChannelClientStateResponse":{"type":"object","title":"QueryChannelClientStateResponse is the Response type for the\nQuery/QueryChannelClientState RPC method","properties":{"identified_client_state":{"title":"client state associated with the channel","$ref":"#/definitions/ibc.core.client.v1.IdentifiedClientState"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v1.QueryChannelConsensusStateResponse":{"type":"object","title":"QueryChannelClientStateResponse is the Response type for the\nQuery/QueryChannelClientState RPC method","properties":{"client_id":{"type":"string","title":"client ID associated with the consensus state"},"consensus_state":{"title":"consensus state associated with the channel","$ref":"#/definitions/google.protobuf.Any"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v1.QueryChannelResponse":{"description":"QueryChannelResponse is the response type for the Query/Channel RPC method.\nBesides the Channel end, it includes a proof and the height from which the\nproof was retrieved.","type":"object","properties":{"channel":{"title":"channel associated with the request identifiers","$ref":"#/definitions/ibc.core.channel.v1.Channel"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v1.QueryChannelsResponse":{"description":"QueryChannelsResponse is the response type for the Query/Channels RPC method.","type":"object","properties":{"channels":{"description":"list of stored channels of the chain.","type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.channel.v1.IdentifiedChannel"}},"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.channel.v1.QueryConnectionChannelsResponse":{"type":"object","title":"QueryConnectionChannelsResponse is the Response type for the\nQuery/QueryConnectionChannels RPC method","properties":{"channels":{"description":"list of channels associated with a connection.","type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.channel.v1.IdentifiedChannel"}},"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.channel.v1.QueryNextSequenceReceiveResponse":{"type":"object","title":"QuerySequenceResponse is the response type for the\nQuery/QueryNextSequenceReceiveResponse RPC method","properties":{"next_sequence_receive":{"type":"string","format":"uint64","title":"next sequence receive number"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v1.QueryNextSequenceSendResponse":{"type":"object","title":"QueryNextSequenceSendResponse is the request type for the\nQuery/QueryNextSequenceSend RPC method","properties":{"next_sequence_send":{"type":"string","format":"uint64","title":"next sequence send number"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v1.QueryPacketAcknowledgementResponse":{"type":"object","title":"QueryPacketAcknowledgementResponse defines the client query response for a\npacket which also includes a proof and the height from which the\nproof was retrieved","properties":{"acknowledgement":{"type":"string","format":"byte","title":"packet associated with the request fields"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v1.QueryPacketAcknowledgementsResponse":{"type":"object","title":"QueryPacketAcknowledgemetsResponse is the request type for the\nQuery/QueryPacketAcknowledgements RPC method","properties":{"acknowledgements":{"type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.channel.v1.PacketState"}},"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.channel.v1.QueryPacketCommitmentResponse":{"type":"object","title":"QueryPacketCommitmentResponse defines the client query response for a packet\nwhich also includes a proof and the height from which the proof was\nretrieved","properties":{"commitment":{"type":"string","format":"byte","title":"packet associated with the request fields"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v1.QueryPacketCommitmentsResponse":{"type":"object","title":"QueryPacketCommitmentsResponse is the request type for the\nQuery/QueryPacketCommitments RPC method","properties":{"commitments":{"type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.channel.v1.PacketState"}},"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.channel.v1.QueryPacketReceiptResponse":{"type":"object","title":"QueryPacketReceiptResponse defines the client query response for a packet\nreceipt which also includes a proof, and the height from which the proof was\nretrieved","properties":{"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"},"received":{"type":"boolean","title":"success flag for if receipt exists"}}},"ibc.core.channel.v1.QueryUnreceivedAcksResponse":{"type":"object","title":"QueryUnreceivedAcksResponse is the response type for the\nQuery/UnreceivedAcks RPC method","properties":{"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"sequences":{"type":"array","title":"list of unreceived acknowledgement sequences","items":{"type":"string","format":"uint64"}}}},"ibc.core.channel.v1.QueryUnreceivedPacketsResponse":{"type":"object","title":"QueryUnreceivedPacketsResponse is the response type for the\nQuery/UnreceivedPacketCommitments RPC method","properties":{"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"sequences":{"type":"array","title":"list of unreceived packet sequences","items":{"type":"string","format":"uint64"}}}},"ibc.core.channel.v1.State":{"description":"State defines if a channel is in one of the following states:\nCLOSED, INIT, TRYOPEN, OPEN, or UNINITIALIZED.\n\n - STATE_UNINITIALIZED_UNSPECIFIED: Default State\n - STATE_INIT: A channel has just started the opening handshake.\n - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain.\n - STATE_OPEN: A channel has completed the handshake. Open channels are\nready to send and receive packets.\n - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive\npackets.","type":"string","default":"STATE_UNINITIALIZED_UNSPECIFIED","enum":["STATE_UNINITIALIZED_UNSPECIFIED","STATE_INIT","STATE_TRYOPEN","STATE_OPEN","STATE_CLOSED"]},"ibc.core.channel.v2.PacketState":{"description":"PacketState defines the generic type necessary to retrieve and store\npacket commitments, acknowledgements, and receipts.\nCaller is responsible for knowing the context necessary to interpret this\nstate as a commitment, acknowledgement, or a receipt.","type":"object","properties":{"client_id":{"description":"client unique identifier.","type":"string"},"data":{"description":"embedded data that represents packet state.","type":"string","format":"byte"},"sequence":{"description":"packet sequence.","type":"string","format":"uint64"}}},"ibc.core.channel.v2.QueryNextSequenceSendResponse":{"type":"object","title":"QueryNextSequenceSendResponse is the response type for the Query/QueryNextSequenceSend RPC method","properties":{"next_sequence_send":{"type":"string","format":"uint64","title":"next sequence send number"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v2.QueryPacketAcknowledgementResponse":{"description":"QueryPacketAcknowledgementResponse is the response type for the Query/PacketAcknowledgement RPC method.","type":"object","properties":{"acknowledgement":{"type":"string","format":"byte","title":"acknowledgement associated with the request fields"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v2.QueryPacketAcknowledgementsResponse":{"type":"object","title":"QueryPacketAcknowledgemetsResponse is the request type for the\nQuery/QueryPacketAcknowledgements RPC method","properties":{"acknowledgements":{"type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.channel.v2.PacketState"}},"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.channel.v2.QueryPacketCommitmentResponse":{"description":"QueryPacketCommitmentResponse is the response type for the Query/PacketCommitment RPC method.","type":"object","properties":{"commitment":{"type":"string","format":"byte","title":"packet associated with the request fields"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v2.QueryPacketCommitmentsResponse":{"description":"QueryPacketCommitmentResponse is the response type for the Query/PacketCommitment RPC method.","type":"object","properties":{"commitments":{"description":"collection of packet commitments for the requested channel identifier.","type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.channel.v2.PacketState"}},"height":{"description":"query block height.","$ref":"#/definitions/ibc.core.client.v1.Height"},"pagination":{"description":"pagination response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.channel.v2.QueryPacketReceiptResponse":{"description":"QueryPacketReceiptResponse is the response type for the Query/PacketReceipt RPC method.","type":"object","properties":{"proof":{"type":"string","format":"byte","title":"merkle proof of existence or absence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"},"received":{"type":"boolean","title":"success flag for if receipt exists"}}},"ibc.core.channel.v2.QueryUnreceivedAcksResponse":{"type":"object","title":"QueryUnreceivedAcksResponse is the response type for the\nQuery/UnreceivedAcks RPC method","properties":{"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"sequences":{"type":"array","title":"list of unreceived acknowledgement sequences","items":{"type":"string","format":"uint64"}}}},"ibc.core.channel.v2.QueryUnreceivedPacketsResponse":{"type":"object","title":"QueryUnreceivedPacketsResponse is the response type for the Query/UnreceivedPacketCommitments RPC method","properties":{"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"sequences":{"type":"array","title":"list of unreceived packet sequences","items":{"type":"string","format":"uint64"}}}},"ibc.core.client.v1.ConsensusStateWithHeight":{"description":"ConsensusStateWithHeight defines a consensus state with an additional height\nfield.","type":"object","properties":{"consensus_state":{"title":"consensus state","$ref":"#/definitions/google.protobuf.Any"},"height":{"title":"consensus state height","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.client.v1.Height":{"description":"Normally the RevisionHeight is incremented at each height while keeping\nRevisionNumber the same. However some consensus algorithms may choose to\nreset the height in certain conditions e.g. hard forks, state-machine\nbreaking changes In these cases, the RevisionNumber is incremented so that\nheight continues to be monitonically increasing even as the RevisionHeight\ngets reset\n\nPlease note that json tags for generated Go code are overridden to explicitly exclude the omitempty jsontag.\nThis enforces the Go json marshaller to always emit zero values for both revision_number and revision_height.","type":"object","title":"Height is a monotonically increasing data type\nthat can be compared against another Height for the purposes of updating and\nfreezing clients","properties":{"revision_height":{"type":"string","format":"uint64","title":"the height within the given revision"},"revision_number":{"type":"string","format":"uint64","title":"the revision that the client is currently on"}}},"ibc.core.client.v1.IdentifiedClientState":{"description":"IdentifiedClientState defines a client state with an additional client\nidentifier field.","type":"object","properties":{"client_id":{"type":"string","title":"client identifier"},"client_state":{"title":"client state","$ref":"#/definitions/google.protobuf.Any"}}},"ibc.core.client.v1.Params":{"description":"Params defines the set of IBC light client parameters.","type":"object","properties":{"allowed_clients":{"description":"allowed_clients defines the list of allowed client state types which can be created\nand interacted with. If a client type is removed from the allowed clients list, usage\nof this client will be disabled until it is added again to the list.","type":"array","items":{"type":"string"}}}},"ibc.core.client.v1.QueryClientCreatorResponse":{"description":"QueryClientCreatorResponse is the response type for the Query/ClientCreator RPC\nmethod.","type":"object","properties":{"creator":{"type":"string","title":"creator of the client"}}},"ibc.core.client.v1.QueryClientParamsResponse":{"description":"QueryClientParamsResponse is the response type for the Query/ClientParams RPC\nmethod.","type":"object","properties":{"params":{"description":"params defines the parameters of the module.","$ref":"#/definitions/ibc.core.client.v1.Params"}}},"ibc.core.client.v1.QueryClientStateResponse":{"description":"QueryClientStateResponse is the response type for the Query/ClientState RPC\nmethod. Besides the client state, it includes a proof and the height from\nwhich the proof was retrieved.","type":"object","properties":{"client_state":{"title":"client state associated with the request identifier","$ref":"#/definitions/google.protobuf.Any"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.client.v1.QueryClientStatesResponse":{"description":"QueryClientStatesResponse is the response type for the Query/ClientStates RPC\nmethod.","type":"object","properties":{"client_states":{"description":"list of stored ClientStates of the chain.","type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.client.v1.IdentifiedClientState"}},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.client.v1.QueryClientStatusResponse":{"description":"QueryClientStatusResponse is the response type for the Query/ClientStatus RPC\nmethod. It returns the current status of the IBC client.","type":"object","properties":{"status":{"type":"string"}}},"ibc.core.client.v1.QueryConsensusStateHeightsResponse":{"type":"object","title":"QueryConsensusStateHeightsResponse is the response type for the\nQuery/ConsensusStateHeights RPC method","properties":{"consensus_state_heights":{"type":"array","title":"consensus state heights","items":{"type":"object","$ref":"#/definitions/ibc.core.client.v1.Height"}},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.client.v1.QueryConsensusStateResponse":{"type":"object","title":"QueryConsensusStateResponse is the response type for the Query/ConsensusState\nRPC method","properties":{"consensus_state":{"title":"consensus state associated with the client identifier at the given height","$ref":"#/definitions/google.protobuf.Any"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.client.v1.QueryConsensusStatesResponse":{"type":"object","title":"QueryConsensusStatesResponse is the response type for the\nQuery/ConsensusStates RPC method","properties":{"consensus_states":{"type":"array","title":"consensus states associated with the identifier","items":{"type":"object","$ref":"#/definitions/ibc.core.client.v1.ConsensusStateWithHeight"}},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.client.v1.QueryUpgradedClientStateResponse":{"description":"QueryUpgradedClientStateResponse is the response type for the\nQuery/UpgradedClientState RPC method.","type":"object","properties":{"upgraded_client_state":{"title":"client state associated with the request identifier","$ref":"#/definitions/google.protobuf.Any"}}},"ibc.core.client.v1.QueryUpgradedConsensusStateResponse":{"description":"QueryUpgradedConsensusStateResponse is the response type for the\nQuery/UpgradedConsensusState RPC method.","type":"object","properties":{"upgraded_consensus_state":{"title":"Consensus state associated with the request identifier","$ref":"#/definitions/google.protobuf.Any"}}},"ibc.core.client.v1.QueryVerifyMembershipRequest":{"type":"object","title":"QueryVerifyMembershipRequest is the request type for the Query/VerifyMembership RPC method","properties":{"block_delay":{"type":"string","format":"uint64","title":"optional block delay"},"client_id":{"description":"client unique identifier.","type":"string"},"merkle_path":{"description":"the commitment key path.","$ref":"#/definitions/ibc.core.commitment.v2.MerklePath"},"proof":{"description":"the proof to be verified by the client.","type":"string","format":"byte"},"proof_height":{"description":"the height of the commitment root at which the proof is verified.","$ref":"#/definitions/ibc.core.client.v1.Height"},"time_delay":{"type":"string","format":"uint64","title":"optional time delay"},"value":{"description":"the value which is proven.","type":"string","format":"byte"}}},"ibc.core.client.v1.QueryVerifyMembershipResponse":{"type":"object","title":"QueryVerifyMembershipResponse is the response type for the Query/VerifyMembership RPC method","properties":{"success":{"description":"boolean indicating success or failure of proof verification.","type":"boolean"}}},"ibc.core.client.v2.Config":{"type":"object","title":"Config is a **per-client** configuration struct that sets which relayers are allowed to relay v2 IBC messages\nfor a given client.\nIf it is set, then only relayers in the allow list can send v2 messages\nIf it is not set, then the client allows permissionless relaying of v2 messages","properties":{"allowed_relayers":{"type":"array","title":"allowed_relayers defines the set of allowed relayers for IBC V2 protocol for the given client","items":{"type":"string"}}}},"ibc.core.client.v2.CounterpartyInfo":{"type":"object","title":"CounterpartyInfo defines the key that the counterparty will use to message our client","properties":{"client_id":{"type":"string","title":"client identifier is the identifier used to send packet messages to our client"},"merkle_prefix":{"type":"array","title":"merkle prefix key is the prefix that ics provable keys are stored under","items":{"type":"string","format":"byte"}}}},"ibc.core.client.v2.QueryConfigResponse":{"type":"object","title":"QueryConfigResponse is the response type for the Query/Config RPC method","properties":{"config":{"$ref":"#/definitions/ibc.core.client.v2.Config"}}},"ibc.core.client.v2.QueryCounterpartyInfoResponse":{"description":"QueryCounterpartyInfoResponse is the response type for the\nQuery/CounterpartyInfo RPC method.","type":"object","properties":{"counterparty_info":{"$ref":"#/definitions/ibc.core.client.v2.CounterpartyInfo"}}},"ibc.core.commitment.v1.MerklePrefix":{"type":"object","title":"MerklePrefix is merkle path prefixed to the key.\nThe constructed key from the Path and the key will be append(Path.KeyPath,\nappend(Path.KeyPrefix, key...))","properties":{"key_prefix":{"type":"string","format":"byte"}}},"ibc.core.commitment.v2.MerklePath":{"description":"MerklePath is the path used to verify commitment proofs, which can be an\narbitrary structured object (defined by a commitment type).\nICS-23 verification supports membership proofs for nested merkle trees.\nThe ICS-24 standard provable keys MUST be stored in the lowest level tree with an optional prefix.\nThe IC24 provable tree may then be stored in a higher level tree(s) that hash up to the root hash\nstored in the consensus state of the client.\nEach element of the path represents the key of a merkle tree from the root to the leaf.\nThe elements of the path before the final element must be the path to the tree that contains\nthe ICS24 provable store. Thus, it should remain constant for all ICS24 proofs.\nThe final element of the path is the key of the leaf in the ICS24 provable store,\nThus IBC core will append the ICS24 path to the final element of the MerklePath\nstored in the counterparty to create the full path to the leaf for proof verification.\nExamples:\nCosmos SDK:\nThe Cosmos SDK commits to a multi-tree where each store is an IAVL tree and all store hashes\nare hashed in a simple merkle tree to get the final root hash. Thus, the MerklePath in the counterparty\nMerklePrefix has the following structure: [\"ibc\", \"\"]\nThe core IBC handler will append the ICS24 path to the final element of the MerklePath\nlike so: [\"ibc\", \"{packetCommitmentPath}\"] which will then be used for final verification.\nEthereum:\nThe Ethereum client commits to a single Patricia merkle trie. The ICS24 provable store is managed\nby the smart contract state. Each smart contract has a specific prefix reserved within the global trie.\nThus the MerklePath in the counterparty is the prefix to the smart contract state in the global trie.\nSince there is only one tree in the commitment structure of ethereum the MerklePath in the counterparty\nMerklePrefix has the following structure: [\"IBCCoreContractAddressStoragePrefix\"]\nThe core IBC handler will append the ICS24 path to the final element of the MerklePath\nlike so: [\"IBCCoreContractAddressStoragePrefix{packetCommitmentPath}\"] which will then be used for final\nverification. Thus the MerklePath in the counterparty MerklePrefix is the nested key path from the root hash of the\nconsensus state down to the ICS24 provable store. The IBC handler retrieves the counterparty key path to the ICS24\nprovable store from the MerklePath and appends the ICS24 path to get the final key path to the value being verified\nby the client against the root hash in the client's consensus state.","type":"object","properties":{"key_path":{"type":"array","items":{"type":"string","format":"byte"}}}},"ibc.core.connection.v1.ConnectionEnd":{"description":"ConnectionEnd defines a stateful object on a chain connected to another\nseparate one.\nNOTE: there must only be 2 defined ConnectionEnds to establish\na connection between two chains.","type":"object","properties":{"client_id":{"description":"client associated with this connection.","type":"string"},"counterparty":{"description":"counterparty chain associated with this connection.","$ref":"#/definitions/ibc.core.connection.v1.Counterparty"},"delay_period":{"description":"delay period that must pass before a consensus state can be used for\npacket-verification NOTE: delay period logic is only implemented by some\nclients.","type":"string","format":"uint64"},"state":{"description":"current state of the connection end.","$ref":"#/definitions/ibc.core.connection.v1.State"},"versions":{"description":"IBC version which can be utilised to determine encodings or protocols for\nchannels or packets utilising this connection.","type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.connection.v1.Version"}}}},"ibc.core.connection.v1.Counterparty":{"description":"Counterparty defines the counterparty chain associated with a connection end.","type":"object","properties":{"client_id":{"description":"identifies the client on the counterparty chain associated with a given\nconnection.","type":"string"},"connection_id":{"description":"identifies the connection end on the counterparty chain associated with a\ngiven connection.","type":"string"},"prefix":{"description":"commitment merkle prefix of the counterparty chain.","$ref":"#/definitions/ibc.core.commitment.v1.MerklePrefix"}}},"ibc.core.connection.v1.IdentifiedConnection":{"description":"IdentifiedConnection defines a connection with additional connection\nidentifier field.","type":"object","properties":{"client_id":{"description":"client associated with this connection.","type":"string"},"counterparty":{"description":"counterparty chain associated with this connection.","$ref":"#/definitions/ibc.core.connection.v1.Counterparty"},"delay_period":{"description":"delay period associated with this connection.","type":"string","format":"uint64"},"id":{"description":"connection identifier.","type":"string"},"state":{"description":"current state of the connection end.","$ref":"#/definitions/ibc.core.connection.v1.State"},"versions":{"type":"array","title":"IBC version which can be utilised to determine encodings or protocols for\nchannels or packets utilising this connection","items":{"type":"object","$ref":"#/definitions/ibc.core.connection.v1.Version"}}}},"ibc.core.connection.v1.Params":{"description":"Params defines the set of Connection parameters.","type":"object","properties":{"max_expected_time_per_block":{"description":"maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the\nlargest amount of time that the chain might reasonably take to produce the next block under normal operating\nconditions. A safe choice is 3-5x the expected time per block.","type":"string","format":"uint64"}}},"ibc.core.connection.v1.QueryClientConnectionsResponse":{"type":"object","title":"QueryClientConnectionsResponse is the response type for the\nQuery/ClientConnections RPC method","properties":{"connection_paths":{"description":"slice of all the connection paths associated with a client.","type":"array","items":{"type":"string"}},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was generated","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.connection.v1.QueryConnectionClientStateResponse":{"type":"object","title":"QueryConnectionClientStateResponse is the response type for the\nQuery/ConnectionClientState RPC method","properties":{"identified_client_state":{"title":"client state associated with the channel","$ref":"#/definitions/ibc.core.client.v1.IdentifiedClientState"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.connection.v1.QueryConnectionConsensusStateResponse":{"type":"object","title":"QueryConnectionConsensusStateResponse is the response type for the\nQuery/ConnectionConsensusState RPC method","properties":{"client_id":{"type":"string","title":"client ID associated with the consensus state"},"consensus_state":{"title":"consensus state associated with the channel","$ref":"#/definitions/google.protobuf.Any"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.connection.v1.QueryConnectionParamsResponse":{"description":"QueryConnectionParamsResponse is the response type for the Query/ConnectionParams RPC method.","type":"object","properties":{"params":{"description":"params defines the parameters of the module.","$ref":"#/definitions/ibc.core.connection.v1.Params"}}},"ibc.core.connection.v1.QueryConnectionResponse":{"description":"QueryConnectionResponse is the response type for the Query/Connection RPC\nmethod. Besides the connection end, it includes a proof and the height from\nwhich the proof was retrieved.","type":"object","properties":{"connection":{"title":"connection associated with the request identifier","$ref":"#/definitions/ibc.core.connection.v1.ConnectionEnd"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.connection.v1.QueryConnectionsResponse":{"description":"QueryConnectionsResponse is the response type for the Query/Connections RPC\nmethod.","type":"object","properties":{"connections":{"description":"list of stored connections of the chain.","type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.connection.v1.IdentifiedConnection"}},"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.connection.v1.State":{"description":"State defines if a connection is in one of the following states:\nINIT, TRYOPEN, OPEN or UNINITIALIZED.\n\n - STATE_UNINITIALIZED_UNSPECIFIED: Default State\n - STATE_INIT: A connection end has just started the opening handshake.\n - STATE_TRYOPEN: A connection end has acknowledged the handshake step on the counterparty\nchain.\n - STATE_OPEN: A connection end has completed the handshake.","type":"string","default":"STATE_UNINITIALIZED_UNSPECIFIED","enum":["STATE_UNINITIALIZED_UNSPECIFIED","STATE_INIT","STATE_TRYOPEN","STATE_OPEN"]},"ibc.core.connection.v1.Version":{"description":"Version defines the versioning scheme used to negotiate the IBC version in\nthe connection handshake.","type":"object","properties":{"features":{"type":"array","title":"list of features compatible with the specified identifier","items":{"type":"string"}},"identifier":{"type":"string","title":"unique version identifier"}}},"ibc.lightclients.wasm.v1.QueryChecksumsResponse":{"description":"QueryChecksumsResponse is the response type for the Query/Checksums RPC method.","type":"object","properties":{"checksums":{"description":"checksums is a list of the hex encoded checksums of all wasm codes stored.","type":"array","items":{"type":"string"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.lightclients.wasm.v1.QueryCodeResponse":{"description":"QueryCodeResponse is the response type for the Query/Code RPC method.","type":"object","properties":{"data":{"type":"string","format":"byte"}}},"pulsarchain.abci.QueryGetValidatorSetWithPowersResponse":{"type":"object","properties":{"validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.common.ValidatorEntry"}}}},"pulsarchain.abci.QueryVoteExtBodyByHeightResponse":{"description":"QueryVoteExtBodyByHeightResponse defines the response for VoteExtBodyByHeight.","type":"object","properties":{"vote_ext_body":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.VoteExtBody"}}},"pulsarchain.bridge.v1.Params":{"description":"Params defines the parameters for the module.","type":"object","properties":{"actions_reduced_root_snapshot_window_size":{"description":"actions_reduced_root_snapshot_window_size is the retained consensus root window.","type":"string","format":"int64"},"confirmation_depth":{"description":"confirmation_depth is the Mina finality depth used by the archive wrapper.","type":"string","format":"int64"},"contract_address":{"description":"contract_address is the Mina bridge contract address.","type":"string"},"max_block_range":{"description":"max_block_range is the maximum Mina height span processed by one request.","type":"string","format":"int64"},"start_block_height":{"description":"start_block_height is the first Mina block indexed by the bridge.","type":"string","format":"int64"}}},"pulsarchain.bridge.v1.QueryActionsReducedRootResponse":{"description":"QueryActionsReducedRootResponse defines the QueryActionsReducedRootResponse message.","type":"object","properties":{"actions_reduced_root":{"type":"string"}}},"pulsarchain.bridge.v1.QueryLatestActionHashesResponse":{"description":"QueryLatestActionHashesResponse defines the QueryLatestActionHashesResponse message.","type":"object","properties":{"action_hashes":{"description":"action_hashes is the ordered canonical hash batch that reconstructs\nthe root transition for the source Cosmos block.","type":"array","items":{"type":"string"}},"action_hashes_cosmos_block_height":{"description":"action_hashes_cosmos_block_height is the Cosmos block height where\nthis query batch was produced.","type":"string","format":"int64"},"latest_fetched_mina_height":{"description":"latest_fetched_mina_height is the inclusive upper Mina cursor of the\ncurrent batch. Together with start_mina_height it defines the consumed\nMina interval (start_mina_height, latest_fetched_mina_height].","type":"string","format":"int64"},"start_mina_height":{"description":"start_mina_height is the exclusive lower Mina cursor of the current batch.","type":"string","format":"int64"}}},"pulsarchain.bridge.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.bridge.v1.Params"}}},"pulsarchain.common.ValidatorEntry":{"type":"object","properties":{"consensus_power":{"type":"string","format":"int64"},"validator_cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.ActorType":{"description":"ActorType identifies the key-registry actor authorized by a signing challenge.\n\n - ACTOR_TYPE_UNSPECIFIED: ACTOR_TYPE_UNSPECIFIED is invalid for key-registry operations.\n - ACTOR_TYPE_USER: ACTOR_TYPE_USER identifies a user account key association.\n - ACTOR_TYPE_VALIDATOR: ACTOR_TYPE_VALIDATOR identifies a validator consensus key association.","type":"string","default":"ACTOR_TYPE_UNSPECIFIED","enum":["ACTOR_TYPE_UNSPECIFIED","ACTOR_TYPE_USER","ACTOR_TYPE_VALIDATOR"]},"pulsarchain.keyregistry.v1.KeySigningOperation":{"description":"KeySigningOperation identifies the key-registry state transition authorized\nby a wallet field signature.\n\n - KEY_SIGNING_OPERATION_UNSPECIFIED: KEY_SIGNING_OPERATION_UNSPECIFIED is invalid for signing requests.\n - KEY_SIGNING_OPERATION_REGISTER: KEY_SIGNING_OPERATION_REGISTER creates the first stable-key association.\n - KEY_SIGNING_OPERATION_UPDATE: KEY_SIGNING_OPERATION_UPDATE replaces an existing Mina key.","type":"string","default":"KEY_SIGNING_OPERATION_UNSPECIFIED","enum":["KEY_SIGNING_OPERATION_UNSPECIFIED","KEY_SIGNING_OPERATION_REGISTER","KEY_SIGNING_OPERATION_UPDATE"]},"pulsarchain.keyregistry.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.keyregistry.v1.QueryGetKeySigningChallengeResponse":{"description":"QueryGetKeySigningChallengeResponse contains the exact field and state version to sign.","type":"object","properties":{"challenge":{"type":"string"},"challenge_bytes":{"type":"string","format":"byte"},"new_key_version":{"type":"string","format":"uint64"},"previous_mina_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetUserCosmosPublicKeyResponse":{"description":"QueryGetUserCosmosPublicKeyResponse defines the QueryGetUserCosmosPublicKeyResponse message.","type":"object","properties":{"user_cosmos_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetUserMinaPublicKeyResponse":{"description":"QueryGetUserMinaPublicKeyResponse defines the QueryGetUserMinaPublicKeyResponse message.","type":"object","properties":{"user_mina_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse":{"description":"QueryGetValidatorCosmosPubKeyResponse defines the QueryGetValidatorCosmosPubKeyResponse message.","type":"object","properties":{"validator_cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse":{"description":"QueryGetValidatorMinaPubKeyResponse defines the QueryGetValidatorMinaPubKeyResponse message.","type":"object","properties":{"validator_mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorSetWithMinaKeysResponse":{"description":"QueryGetValidatorSetWithMinaKeysResponse defines the response for GetValidatorSetWithMinaKeys.","type":"object","properties":{"registered_validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.keyregistry.v1.RegisteredValidatorSetEntry"}}}},"pulsarchain.keyregistry.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.keyregistry.v1.Params"}}},"pulsarchain.keyregistry.v1.RegisteredValidatorSetEntry":{"type":"object","properties":{"consensus_power":{"type":"string","format":"int64"},"validator_cosmos_pub_key":{"type":"string","format":"byte"},"validator_mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.smartaccounts.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.smartaccounts.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.smartaccounts.v1.Params"}}},"pulsarchain.verification.v1.CommitmentEntry":{"description":"CommitmentEntry is a query representation of a retained commitment.","type":"object","properties":{"commitment":{"$ref":"#/definitions/pulsarchain.verification.v1.CommitmentRecord"},"commitment_height":{"type":"string","format":"uint64"},"validator":{"type":"string"}}},"pulsarchain.verification.v1.CommitmentRecord":{"description":"CommitmentRecord stores a validator commitment root.","type":"object","properties":{"commitment":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.FinalProofResult":{"description":"FinalProofResult stores an immutable finalized proof outcome.","type":"object","properties":{"finalized_height":{"type":"string","format":"uint64"},"invalid_voting_power":{"type":"string","format":"int64"},"proof_hash":{"type":"string","format":"byte"},"proof_type":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofType"},"public_inputs_hash":{"type":"string","format":"byte"},"status":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofStatus"},"submission_height":{"type":"string","format":"uint64"},"total_voting_power":{"type":"string","format":"int64"},"valid_voting_power":{"type":"string","format":"int64"},"verification_id":{"type":"string","format":"byte"},"verification_key_hash":{"type":"string","format":"byte"},"voting_power_threshold":{"type":"string","format":"int64"}}},"pulsarchain.verification.v1.Params":{"description":"Params defines the governance-controlled verification module parameters.","type":"object","properties":{"max_proofs_per_block":{"type":"integer","format":"int64"}}},"pulsarchain.verification.v1.ProofKey":{"description":"ProofKey identifies a proof by absolute block height and in-block index.","type":"object","properties":{"index_in_block":{"type":"integer","format":"int64"},"submission_height":{"type":"string","format":"uint64"}}},"pulsarchain.verification.v1.ProofRecord":{"description":"ProofRecord stores the complete descriptor and its chain-derived identity.","type":"object","properties":{"proof_hash":{"type":"string","format":"byte"},"proof_type":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofType"},"public_inputs_hash":{"type":"string","format":"byte"},"verification_id":{"type":"string","format":"byte"},"verification_key_hash":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.ProofStatus":{"description":"ProofStatus is the finalized verification outcome.\n\n - PROOF_STATUS_PENDING: PROOF_STATUS_PENDING is the non-finalized status.\n - PROOF_STATUS_VALID: PROOF_STATUS_VALID means valid voting power exceeded two thirds.\n - PROOF_STATUS_INVALID: PROOF_STATUS_INVALID means invalid voting power exceeded two thirds.\n - PROOF_STATUS_INCONCLUSIVE: PROOF_STATUS_INCONCLUSIVE means neither side reached threshold.","type":"string","default":"PROOF_STATUS_PENDING","enum":["PROOF_STATUS_PENDING","PROOF_STATUS_VALID","PROOF_STATUS_INVALID","PROOF_STATUS_INCONCLUSIVE"]},"pulsarchain.verification.v1.ProofTally":{"description":"ProofTally stores the historical consensus power behind effective votes.","type":"object","properties":{"invalid_voting_power":{"type":"string","format":"int64"},"valid_voting_power":{"type":"string","format":"int64"}}},"pulsarchain.verification.v1.ProofType":{"description":"ProofType selects the verifier family. The exact statement and circuit are\nbound separately by the public-input and verification-key hashes.\n\n - PROOF_TYPE_UNSPECIFIED: PROOF_TYPE_UNSPECIFIED is invalid for proof submission.\n - PROOF_TYPE_MINA_PICKLES: PROOF_TYPE_MINA_PICKLES selects Mina's Pickles proof system.\n - PROOF_TYPE_NOIR_BARRETENBERG: PROOF_TYPE_NOIR_BARRETENBERG selects Noir proofs using Barretenberg.","type":"string","default":"PROOF_TYPE_UNSPECIFIED","enum":["PROOF_TYPE_UNSPECIFIED","PROOF_TYPE_MINA_PICKLES","PROOF_TYPE_NOIR_BARRETENBERG"]},"pulsarchain.verification.v1.QueryCommitmentResponse":{"description":"QueryCommitmentResponse contains one retained commitment.","type":"object","properties":{"commitment":{"$ref":"#/definitions/pulsarchain.verification.v1.CommitmentEntry"}}},"pulsarchain.verification.v1.QueryCommitmentsByValidatorResponse":{"description":"QueryCommitmentsByValidatorResponse contains retained commitments.","type":"object","properties":{"commitments":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.CommitmentEntry"}},"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"pulsarchain.verification.v1.QueryFinalProofResultResponse":{"description":"QueryFinalProofResultResponse contains an immutable proof result.","type":"object","properties":{"final_result":{"$ref":"#/definitions/pulsarchain.verification.v1.FinalProofResult"},"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"}}},"pulsarchain.verification.v1.QueryParamsResponse":{"description":"QueryParamsResponse contains verification parameters.","type":"object","properties":{"params":{"$ref":"#/definitions/pulsarchain.verification.v1.Params"}}},"pulsarchain.verification.v1.QueryProofResponse":{"description":"QueryProofResponse contains either pending or finalized proof state.","type":"object","properties":{"final_result":{"$ref":"#/definitions/pulsarchain.verification.v1.FinalProofResult"},"pending":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofRecord"},"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"}}},"pulsarchain.verification.v1.QueryProofTallyResponse":{"description":"QueryProofTallyResponse contains a pending proof tally.","type":"object","properties":{"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"},"tally":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofTally"}}},"pulsarchain.verification.v1.QueryProofsByHeightResponse":{"description":"QueryProofsByHeightResponse contains a page of proofs.","type":"object","properties":{"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"proofs":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}}}},"pulsarchain.verification.v1.QueryVerificationVotesResponse":{"description":"QueryVerificationVotesResponse contains effective votes.","type":"object","properties":{"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"votes":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.VerificationVoteEntry"}}}},"pulsarchain.verification.v1.QueryVoteResponse":{"description":"QueryVoteResponse contains one effective vote.","type":"object","properties":{"vote":{"$ref":"#/definitions/pulsarchain.verification.v1.VerificationVoteEntry"}}},"pulsarchain.verification.v1.VerificationVoteEntry":{"description":"VerificationVoteEntry is a query representation of an effective vote.","type":"object","properties":{"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"},"state":{"$ref":"#/definitions/pulsarchain.verification.v1.VoteState"},"validator":{"type":"string"}}},"pulsarchain.verification.v1.VoteState":{"description":"VoteState tracks a validator's effective vote.\n\n - VOTE_STATE_NONE: VOTE_STATE_NONE means the validator has not voted.\n - VOTE_STATE_TRUE: VOTE_STATE_TRUE is an effective valid vote.\n - VOTE_STATE_FALSE: VOTE_STATE_FALSE is an effective invalid vote.\n - VOTE_STATE_EQUIVOCATED: VOTE_STATE_EQUIVOCATED excludes conflicting votes from the tally.","type":"string","default":"VOTE_STATE_NONE","enum":["VOTE_STATE_NONE","VOTE_STATE_TRUE","VOTE_STATE_FALSE","VOTE_STATE_EQUIVOCATED"]},"pulsarchain.votepersistence.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.votepersistence.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.votepersistence.v1.Params"}}},"pulsarchain.votepersistence.v1.QueryVoteExtensionsResponse":{"description":"QueryVoteExtensionsResponse defines the QueryVoteExtensionsResponse message.","type":"object","properties":{"persisted_vote_extensions_block_height":{"description":"persisted_vote_extensions_block_height is the signed source/current state\nheight. For vote extensions produced at height N, this value is N-2.","type":"string","format":"int64"},"query_block_height":{"type":"string","format":"int64"},"vote_extensions":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.votepersistence.v1.StoredVoteExtension"}}}},"pulsarchain.votepersistence.v1.StoredVoteExtension":{"description":"StoredVoteExtension defines a persisted Mina validator vote extension.","type":"object","properties":{"mina_public_key":{"type":"string","format":"byte"},"vote_extension":{"type":"string","format":"byte"}}},"pulsarchain.votepersistence.v1.VoteExtBody":{"description":"VoteExtBody defines the VoteExtBody message.","type":"object","properties":{"actions_reduced_root":{"type":"string","format":"byte"},"current_block_height":{"type":"string","format":"int64"},"current_state_root":{"type":"string","format":"byte"},"next_validator_set_hash":{"type":"string","format":"byte"}}},"tendermint.abci.Event":{"description":"Event allows application developers to attach additional information to\nResponseFinalizeBlock and ResponseCheckTx.\nLater, transactions may be queried using these events.","type":"object","properties":{"attributes":{"type":"array","items":{"type":"object","$ref":"#/definitions/tendermint.abci.EventAttribute"}},"type":{"type":"string"}}},"tendermint.abci.EventAttribute":{"description":"EventAttribute is a single key-value pair, associated with an event.","type":"object","properties":{"index":{"type":"boolean","title":"nondeterministic"},"key":{"type":"string"},"value":{"type":"string"}}},"tendermint.crypto.PublicKey":{"type":"object","title":"PublicKey defines the keys available for use with Validators","properties":{"ed25519":{"type":"string","format":"byte"},"secp256k1":{"type":"string","format":"byte"}}},"tendermint.p2p.DefaultNodeInfo":{"type":"object","properties":{"channels":{"type":"string","format":"byte"},"default_node_id":{"type":"string"},"listen_addr":{"type":"string"},"moniker":{"type":"string"},"network":{"type":"string"},"other":{"$ref":"#/definitions/tendermint.p2p.DefaultNodeInfoOther"},"protocol_version":{"$ref":"#/definitions/tendermint.p2p.ProtocolVersion"},"version":{"type":"string"}}},"tendermint.p2p.DefaultNodeInfoOther":{"type":"object","properties":{"rpc_address":{"type":"string"},"tx_index":{"type":"string"}}},"tendermint.p2p.ProtocolVersion":{"type":"object","properties":{"app":{"type":"string","format":"uint64"},"block":{"type":"string","format":"uint64"},"p2p":{"type":"string","format":"uint64"}}},"tendermint.types.ABCIParams":{"description":"ABCIParams configure functionality specific to the Application Blockchain Interface.","type":"object","properties":{"vote_extensions_enable_height":{"description":"vote_extensions_enable_height configures the first height during which\nvote extensions will be enabled. During this specified height, and for all\nsubsequent heights, precommit messages that do not contain valid extension data\nwill be considered invalid. Prior to this height, vote extensions will not\nbe used or accepted by validators on the network.\n\nOnce enabled, vote extensions will be created by the application in ExtendVote,\npassed to the application for validation in VerifyVoteExtension and given\nto the application to use when proposing a block during PrepareProposal.","type":"string","format":"int64"}}},"tendermint.types.Block":{"type":"object","properties":{"data":{"$ref":"#/definitions/tendermint.types.Data"},"evidence":{"$ref":"#/definitions/tendermint.types.EvidenceList"},"header":{"$ref":"#/definitions/tendermint.types.Header"},"last_commit":{"$ref":"#/definitions/tendermint.types.Commit"}}},"tendermint.types.BlockID":{"type":"object","title":"BlockID","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"$ref":"#/definitions/tendermint.types.PartSetHeader"}}},"tendermint.types.BlockIDFlag":{"description":"- BLOCK_ID_FLAG_UNKNOWN: indicates an error condition\n - BLOCK_ID_FLAG_ABSENT: the vote was not received\n - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority\n - BLOCK_ID_FLAG_NIL: voted for nil","type":"string","title":"BlockIdFlag indicates which BlockID the signature is for","default":"BLOCK_ID_FLAG_UNKNOWN","enum":["BLOCK_ID_FLAG_UNKNOWN","BLOCK_ID_FLAG_ABSENT","BLOCK_ID_FLAG_COMMIT","BLOCK_ID_FLAG_NIL"]},"tendermint.types.BlockParams":{"description":"BlockParams contains limits on the block size.","type":"object","properties":{"max_bytes":{"type":"string","format":"int64","title":"Max block size, in bytes.\nNote: must be greater than 0"},"max_gas":{"type":"string","format":"int64","title":"Max gas per block.\nNote: must be greater or equal to -1"}}},"tendermint.types.Commit":{"description":"Commit contains the evidence that a block was committed by a set of validators.","type":"object","properties":{"block_id":{"$ref":"#/definitions/tendermint.types.BlockID"},"height":{"type":"string","format":"int64"},"round":{"type":"integer","format":"int32"},"signatures":{"type":"array","items":{"type":"object","$ref":"#/definitions/tendermint.types.CommitSig"}}}},"tendermint.types.CommitSig":{"description":"CommitSig is a part of the Vote included in a Commit.","type":"object","properties":{"block_id_flag":{"$ref":"#/definitions/tendermint.types.BlockIDFlag"},"signature":{"type":"string","format":"byte"},"timestamp":{"type":"string","format":"date-time"},"validator_address":{"type":"string","format":"byte"}}},"tendermint.types.ConsensusParams":{"description":"ConsensusParams contains consensus critical parameters that determine the\nvalidity of blocks.","type":"object","properties":{"abci":{"$ref":"#/definitions/tendermint.types.ABCIParams"},"block":{"$ref":"#/definitions/tendermint.types.BlockParams"},"evidence":{"$ref":"#/definitions/tendermint.types.EvidenceParams"},"validator":{"$ref":"#/definitions/tendermint.types.ValidatorParams"},"version":{"$ref":"#/definitions/tendermint.types.VersionParams"}}},"tendermint.types.Data":{"type":"object","title":"Data contains the set of transactions included in the block","properties":{"txs":{"description":"Txs that will be applied by state @ block.Height+1.\nNOTE: not all txs here are valid. We're just agreeing on the order first.\nThis means that block.AppHash does not include these txs.","type":"array","items":{"type":"string","format":"byte"}}}},"tendermint.types.DuplicateVoteEvidence":{"description":"DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes.","type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"total_voting_power":{"type":"string","format":"int64"},"validator_power":{"type":"string","format":"int64"},"vote_a":{"$ref":"#/definitions/tendermint.types.Vote"},"vote_b":{"$ref":"#/definitions/tendermint.types.Vote"}}},"tendermint.types.Evidence":{"type":"object","properties":{"duplicate_vote_evidence":{"$ref":"#/definitions/tendermint.types.DuplicateVoteEvidence"},"light_client_attack_evidence":{"$ref":"#/definitions/tendermint.types.LightClientAttackEvidence"}}},"tendermint.types.EvidenceList":{"type":"object","properties":{"evidence":{"type":"array","items":{"type":"object","$ref":"#/definitions/tendermint.types.Evidence"}}}},"tendermint.types.EvidenceParams":{"description":"EvidenceParams determine how we handle evidence of malfeasance.","type":"object","properties":{"max_age_duration":{"description":"Max age of evidence, in time.\n\nIt should correspond with an app's \"unbonding period\" or other similar\nmechanism for handling [Nothing-At-Stake\nattacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).","type":"string"},"max_age_num_blocks":{"description":"Max age of evidence, in blocks.\n\nThe basic formula for calculating this is: MaxAgeDuration / {average block\ntime}.","type":"string","format":"int64"},"max_bytes":{"type":"string","format":"int64","title":"This sets the maximum size of total evidence in bytes that can be committed in a single block.\nand should fall comfortably under the max block bytes.\nDefault is 1048576 or 1MB"}}},"tendermint.types.Header":{"description":"Header defines the structure of a block header.","type":"object","properties":{"app_hash":{"type":"string","format":"byte","title":"state after txs from the previous block"},"chain_id":{"type":"string"},"consensus_hash":{"type":"string","format":"byte","title":"consensus params for current block"},"data_hash":{"type":"string","format":"byte","title":"transactions"},"evidence_hash":{"description":"evidence included in the block","type":"string","format":"byte","title":"consensus info"},"height":{"type":"string","format":"int64"},"last_block_id":{"title":"prev block info","$ref":"#/definitions/tendermint.types.BlockID"},"last_commit_hash":{"description":"commit from validators from the last block","type":"string","format":"byte","title":"hashes of block data"},"last_results_hash":{"type":"string","format":"byte","title":"root hash of all results from the txs from the previous block"},"next_validators_hash":{"type":"string","format":"byte","title":"validators for the next block"},"proposer_address":{"type":"string","format":"byte","title":"original proposer of the block"},"time":{"type":"string","format":"date-time"},"validators_hash":{"description":"validators for the current block","type":"string","format":"byte","title":"hashes from the app output from the prev block"},"version":{"title":"basic block info","$ref":"#/definitions/tendermint.version.Consensus"}}},"tendermint.types.LightBlock":{"type":"object","properties":{"signed_header":{"$ref":"#/definitions/tendermint.types.SignedHeader"},"validator_set":{"$ref":"#/definitions/tendermint.types.ValidatorSet"}}},"tendermint.types.LightClientAttackEvidence":{"description":"LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client.","type":"object","properties":{"byzantine_validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/tendermint.types.Validator"}},"common_height":{"type":"string","format":"int64"},"conflicting_block":{"$ref":"#/definitions/tendermint.types.LightBlock"},"timestamp":{"type":"string","format":"date-time"},"total_voting_power":{"type":"string","format":"int64"}}},"tendermint.types.PartSetHeader":{"type":"object","title":"PartsetHeader","properties":{"hash":{"type":"string","format":"byte"},"total":{"type":"integer","format":"int64"}}},"tendermint.types.SignedHeader":{"type":"object","properties":{"commit":{"$ref":"#/definitions/tendermint.types.Commit"},"header":{"$ref":"#/definitions/tendermint.types.Header"}}},"tendermint.types.SignedMsgType":{"description":"SignedMsgType is a type of signed message in the consensus.\n\n - SIGNED_MSG_TYPE_PREVOTE: Votes\n - SIGNED_MSG_TYPE_PROPOSAL: Proposals","type":"string","default":"SIGNED_MSG_TYPE_UNKNOWN","enum":["SIGNED_MSG_TYPE_UNKNOWN","SIGNED_MSG_TYPE_PREVOTE","SIGNED_MSG_TYPE_PRECOMMIT","SIGNED_MSG_TYPE_PROPOSAL"]},"tendermint.types.Validator":{"type":"object","properties":{"address":{"type":"string","format":"byte"},"proposer_priority":{"type":"string","format":"int64"},"pub_key":{"$ref":"#/definitions/tendermint.crypto.PublicKey"},"voting_power":{"type":"string","format":"int64"}}},"tendermint.types.ValidatorParams":{"description":"ValidatorParams restrict the public key types validators can use.\nNOTE: uses ABCI pubkey naming, not Amino names.","type":"object","properties":{"pub_key_types":{"type":"array","items":{"type":"string"}}}},"tendermint.types.ValidatorSet":{"type":"object","properties":{"proposer":{"$ref":"#/definitions/tendermint.types.Validator"},"total_voting_power":{"type":"string","format":"int64"},"validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/tendermint.types.Validator"}}}},"tendermint.types.VersionParams":{"description":"VersionParams contains the ABCI application version.","type":"object","properties":{"app":{"type":"string","format":"uint64"}}},"tendermint.types.Vote":{"description":"Vote represents a prevote or precommit vote from validators for\nconsensus.","type":"object","properties":{"block_id":{"description":"zero if vote is nil.","$ref":"#/definitions/tendermint.types.BlockID"},"extension":{"description":"Vote extension provided by the application. Only valid for precommit\nmessages.","type":"string","format":"byte"},"extension_signature":{"description":"Vote extension signature by the validator if they participated in\nconsensus for the associated block.\nOnly valid for precommit messages.","type":"string","format":"byte"},"height":{"type":"string","format":"int64"},"round":{"type":"integer","format":"int32"},"signature":{"description":"Vote signature by the validator if they participated in consensus for the\nassociated block.","type":"string","format":"byte"},"timestamp":{"type":"string","format":"date-time"},"type":{"$ref":"#/definitions/tendermint.types.SignedMsgType"},"validator_address":{"type":"string","format":"byte"},"validator_index":{"type":"integer","format":"int32"}}},"tendermint.version.Consensus":{"description":"Consensus captures the consensus rules for processing a block in the blockchain,\nincluding all blockchain data structures and the rules of the application's\nstate transition machine.","type":"object","properties":{"app":{"type":"string","format":"uint64"},"block":{"type":"string","format":"uint64"}}}},"tags":[{"name":"VerificationService"},{"name":"Query"},{"name":"Msg"},{"name":"Service"},{"name":"ReflectionService"},{"name":"ABCIListenerService"},{"name":"ABCI"}]} \ No newline at end of file diff --git a/proto/pulsarchain/bridge/v1/bridge_state.proto b/proto/pulsarchain/bridge/v1/bridge_state.proto index 2d1d9e66..a75cba2d 100644 --- a/proto/pulsarchain/bridge/v1/bridge_state.proto +++ b/proto/pulsarchain/bridge/v1/bridge_state.proto @@ -6,7 +6,6 @@ option go_package = "github.com/node101-io/pulsar-chain/x/bridge/types"; // BridgeState stores the bridge's processed Mina cursor. message BridgeState { - // latest_fetched_mina_height is the latest Mina height processed by the bridge. int64 latest_fetched_mina_height = 1; diff --git a/proto/pulsarchain/smartaccounts/module/v1/module.proto b/proto/pulsarchain/smartaccounts/module/v1/module.proto new file mode 100644 index 00000000..b8a8e546 --- /dev/null +++ b/proto/pulsarchain/smartaccounts/module/v1/module.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package pulsarchain.smartaccounts.module.v1; + +import "cosmos/app/v1alpha1/module.proto"; + +option go_package = "github.com/node101-io/pulsar-chain/x/smartaccounts/types"; + +// Module is the config object for the module. +message Module { + option (cosmos.app.v1alpha1.module) = {go_import: "github.com/node101-io/pulsar-chain/x/smartaccounts"}; + + // authority defines the custom module authority. + // If not set, defaults to the governance module. + string authority = 1; +} diff --git a/proto/pulsarchain/smartaccounts/v1/genesis.proto b/proto/pulsarchain/smartaccounts/v1/genesis.proto new file mode 100644 index 00000000..a50fc85e --- /dev/null +++ b/proto/pulsarchain/smartaccounts/v1/genesis.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package pulsarchain.smartaccounts.v1; + +import "amino/amino.proto"; +import "gogoproto/gogo.proto"; +import "pulsarchain/smartaccounts/v1/params.proto"; + +option go_package = "github.com/node101-io/pulsar-chain/x/smartaccounts/types"; + +// GenesisState defines the smartaccounts module's genesis state. +message GenesisState { + // params defines all the parameters of the module. + Params params = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} diff --git a/proto/pulsarchain/smartaccounts/v1/params.proto b/proto/pulsarchain/smartaccounts/v1/params.proto new file mode 100644 index 00000000..9ccd7c1b --- /dev/null +++ b/proto/pulsarchain/smartaccounts/v1/params.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; +package pulsarchain.smartaccounts.v1; + +import "amino/amino.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/node101-io/pulsar-chain/x/smartaccounts/types"; + +// Params defines the parameters for the module. +message Params { + option (amino.name) = "pulsarchain/x/smartaccounts/Params"; + option (gogoproto.equal) = true; +} diff --git a/proto/pulsarchain/smartaccounts/v1/query.proto b/proto/pulsarchain/smartaccounts/v1/query.proto new file mode 100644 index 00000000..573f89ce --- /dev/null +++ b/proto/pulsarchain/smartaccounts/v1/query.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +package pulsarchain.smartaccounts.v1; + +import "amino/amino.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "pulsarchain/smartaccounts/v1/params.proto"; + +option go_package = "github.com/node101-io/pulsar-chain/x/smartaccounts/types"; + +// Query defines the gRPC querier service. +service Query { + // Parameters queries the parameters of the module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/node101-io/pulsar-chain/smartaccounts/v1/params"; + } +} + +// QueryParamsRequest is request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is response type for the Query/Params RPC method. +message QueryParamsResponse { + // params holds all the parameters of this module. + Params params = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} diff --git a/proto/pulsarchain/smartaccounts/v1/tx.proto b/proto/pulsarchain/smartaccounts/v1/tx.proto new file mode 100644 index 00000000..da224f62 --- /dev/null +++ b/proto/pulsarchain/smartaccounts/v1/tx.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; +package pulsarchain.smartaccounts.v1; + +import "amino/amino.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "pulsarchain/smartaccounts/v1/params.proto"; + +option go_package = "github.com/node101-io/pulsar-chain/x/smartaccounts/types"; + +// Msg defines the Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); +} + +// MsgUpdateParams is the Msg/UpdateParams request type. +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + option (amino.name) = "pulsarchain/x/smartaccounts/MsgUpdateParams"; + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the module parameters to update. + // + // NOTE: All parameters must be supplied. + Params params = 2 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +message MsgUpdateParamsResponse {} diff --git a/proto/pulsarchain/verification/v1/query.proto b/proto/pulsarchain/verification/v1/query.proto index 186bd796..53f357d4 100644 --- a/proto/pulsarchain/verification/v1/query.proto +++ b/proto/pulsarchain/verification/v1/query.proto @@ -60,7 +60,10 @@ message QueryParamsRequest {} // QueryParamsResponse contains verification parameters. message QueryParamsResponse { - Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + Params params = 1 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true + ]; } // QueryProofRequest identifies a proof by key. diff --git a/x/bridge/types/action.pb.go b/x/bridge/types/action.pb.go index d3b29f1e..046c2906 100644 --- a/x/bridge/types/action.pb.go +++ b/x/bridge/types/action.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/bridge/types/actions_root_snapshot.pb.go b/x/bridge/types/actions_root_snapshot.pb.go index 6b06b298..4d1e11e8 100644 --- a/x/bridge/types/actions_root_snapshot.pb.go +++ b/x/bridge/types/actions_root_snapshot.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/bridge/types/bridge_state.pb.go b/x/bridge/types/bridge_state.pb.go index 74d7c353..0fec46da 100644 --- a/x/bridge/types/bridge_state.pb.go +++ b/x/bridge/types/bridge_state.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/bridge/types/genesis.pb.go b/x/bridge/types/genesis.pb.go index f0e6c608..1c6c2255 100644 --- a/x/bridge/types/genesis.pb.go +++ b/x/bridge/types/genesis.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/bridge/types/module.pb.go b/x/bridge/types/module.pb.go index 447cd299..2940c12e 100644 --- a/x/bridge/types/module.pb.go +++ b/x/bridge/types/module.pb.go @@ -4,12 +4,13 @@ package types import ( - _ "cosmossdk.io/api/cosmos/app/v1alpha1" fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "cosmossdk.io/api/cosmos/app/v1alpha1" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/bridge/types/params.pb.go b/x/bridge/types/params.pb.go index 64a3b319..2c0bd426 100644 --- a/x/bridge/types/params.pb.go +++ b/x/bridge/types/params.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/bridge/types/query.pb.go b/x/bridge/types/query.pb.go index 17545560..7aedd835 100644 --- a/x/bridge/types/query.pb.go +++ b/x/bridge/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" @@ -15,9 +19,6 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/bridge/types/tx.pb.go b/x/bridge/types/tx.pb.go index 18fb51d4..da0d158c 100644 --- a/x/bridge/types/tx.pb.go +++ b/x/bridge/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -15,9 +19,6 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/actor_type.pb.go b/x/keyregistry/types/actor_type.pb.go index cf47d15f..fd395b0e 100644 --- a/x/keyregistry/types/actor_type.pb.go +++ b/x/keyregistry/types/actor_type.pb.go @@ -5,8 +5,9 @@ package types import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" math "math" + + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/genesis.pb.go b/x/keyregistry/types/genesis.pb.go index 38980463..892df56a 100644 --- a/x/keyregistry/types/genesis.pb.go +++ b/x/keyregistry/types/genesis.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/key_signing_operation.pb.go b/x/keyregistry/types/key_signing_operation.pb.go index 514130c4..7f41e613 100644 --- a/x/keyregistry/types/key_signing_operation.pb.go +++ b/x/keyregistry/types/key_signing_operation.pb.go @@ -5,8 +5,9 @@ package types import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" math "math" + + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/module.pb.go b/x/keyregistry/types/module.pb.go index c42802f0..6c939884 100644 --- a/x/keyregistry/types/module.pb.go +++ b/x/keyregistry/types/module.pb.go @@ -4,12 +4,13 @@ package types import ( - _ "cosmossdk.io/api/cosmos/app/v1alpha1" fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "cosmossdk.io/api/cosmos/app/v1alpha1" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/params.pb.go b/x/keyregistry/types/params.pb.go index 378f92bb..083d03b5 100644 --- a/x/keyregistry/types/params.pb.go +++ b/x/keyregistry/types/params.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/public_key_pair.pb.go b/x/keyregistry/types/public_key_pair.pb.go index 63b44139..bddbc23f 100644 --- a/x/keyregistry/types/public_key_pair.pb.go +++ b/x/keyregistry/types/public_key_pair.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/query.pb.go b/x/keyregistry/types/query.pb.go index 288ae05b..37346d1c 100644 --- a/x/keyregistry/types/query.pb.go +++ b/x/keyregistry/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" @@ -16,9 +20,6 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/registered_validator_set_entry.pb.go b/x/keyregistry/types/registered_validator_set_entry.pb.go index 90d01a7e..d3c3b3bc 100644 --- a/x/keyregistry/types/registered_validator_set_entry.pb.go +++ b/x/keyregistry/types/registered_validator_set_entry.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/tx.pb.go b/x/keyregistry/types/tx.pb.go index 0cb535ad..dd9b1108 100644 --- a/x/keyregistry/types/tx.pb.go +++ b/x/keyregistry/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -15,9 +19,6 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/smartaccounts/keeper/genesis.go b/x/smartaccounts/keeper/genesis.go new file mode 100644 index 00000000..c58efe30 --- /dev/null +++ b/x/smartaccounts/keeper/genesis.go @@ -0,0 +1,25 @@ +package keeper + +import ( + "context" + + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +// InitGenesis initializes the module's state from a provided genesis state. +func (k Keeper) InitGenesis(ctx context.Context, genState types.GenesisState) error { + return k.Params.Set(ctx, genState.Params) +} + +// ExportGenesis returns the module's exported genesis. +func (k Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) { + var err error + + genesis := types.DefaultGenesis() + genesis.Params, err = k.Params.Get(ctx) + if err != nil { + return nil, err + } + + return genesis, nil +} diff --git a/x/smartaccounts/keeper/genesis_test.go b/x/smartaccounts/keeper/genesis_test.go new file mode 100644 index 00000000..43cf6058 --- /dev/null +++ b/x/smartaccounts/keeper/genesis_test.go @@ -0,0 +1,24 @@ +package keeper_test + +import ( + "testing" + + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" + + "github.com/stretchr/testify/require" +) + +func TestGenesis(t *testing.T) { + genesisState := types.GenesisState{ + Params: types.DefaultParams(), + } + + f := initFixture(t) + err := f.keeper.InitGenesis(f.ctx, genesisState) + require.NoError(t, err) + got, err := f.keeper.ExportGenesis(f.ctx) + require.NoError(t, err) + require.NotNil(t, got) + + require.EqualExportedValues(t, genesisState.Params, got.Params) +} diff --git a/x/smartaccounts/keeper/keeper.go b/x/smartaccounts/keeper/keeper.go new file mode 100644 index 00000000..5023dcfd --- /dev/null +++ b/x/smartaccounts/keeper/keeper.go @@ -0,0 +1,60 @@ +package keeper + +import ( + "fmt" + + "cosmossdk.io/collections" + "cosmossdk.io/core/address" + corestore "cosmossdk.io/core/store" + "github.com/cosmos/cosmos-sdk/codec" + + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +type Keeper struct { + storeService corestore.KVStoreService + cdc codec.Codec + addressCodec address.Codec + // Address capable of executing a MsgUpdateParams message. + // Typically, this should be the x/gov module account. + authority []byte + + Schema collections.Schema + Params collections.Item[types.Params] +} + +func NewKeeper( + storeService corestore.KVStoreService, + cdc codec.Codec, + addressCodec address.Codec, + authority []byte, + +) Keeper { + if _, err := addressCodec.BytesToString(authority); err != nil { + panic(fmt.Sprintf("invalid authority address %s: %s", authority, err)) + } + + sb := collections.NewSchemaBuilder(storeService) + + k := Keeper{ + storeService: storeService, + cdc: cdc, + addressCodec: addressCodec, + authority: authority, + + Params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[types.Params](cdc)), + } + + schema, err := sb.Build() + if err != nil { + panic(err) + } + k.Schema = schema + + return k +} + +// GetAuthority returns the module's authority. +func (k Keeper) GetAuthority() []byte { + return k.authority +} diff --git a/x/smartaccounts/keeper/keeper_test.go b/x/smartaccounts/keeper/keeper_test.go new file mode 100644 index 00000000..b28a1df1 --- /dev/null +++ b/x/smartaccounts/keeper/keeper_test.go @@ -0,0 +1,56 @@ +package keeper_test + +import ( + "context" + "testing" + + "cosmossdk.io/core/address" + storetypes "cosmossdk.io/store/types" + addresscodec "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + + "github.com/node101-io/pulsar-chain/x/smartaccounts/keeper" + module "github.com/node101-io/pulsar-chain/x/smartaccounts/module" + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +type fixture struct { + ctx context.Context + keeper keeper.Keeper + addressCodec address.Codec +} + +func initFixture(t *testing.T) *fixture { + t.Helper() + + encCfg := moduletestutil.MakeTestEncodingConfig(module.AppModule{}) + addressCodec := addresscodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()) + storeKey := storetypes.NewKVStoreKey(types.StoreKey) + + storeService := runtime.NewKVStoreService(storeKey) + ctx := testutil.DefaultContextWithDB(t, storeKey, storetypes.NewTransientStoreKey("transient_test")).Ctx + + authority := authtypes.NewModuleAddress(types.GovModuleName) + + k := keeper.NewKeeper( + storeService, + encCfg.Codec, + addressCodec, + authority, + ) + + // Initialize params + if err := k.Params.Set(ctx, types.DefaultParams()); err != nil { + t.Fatalf("failed to set params: %v", err) + } + + return &fixture{ + ctx: ctx, + keeper: k, + addressCodec: addressCodec, + } +} diff --git a/x/smartaccounts/keeper/msg_server.go b/x/smartaccounts/keeper/msg_server.go new file mode 100644 index 00000000..4fb6edf1 --- /dev/null +++ b/x/smartaccounts/keeper/msg_server.go @@ -0,0 +1,17 @@ +package keeper + +import ( + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +type msgServer struct { + Keeper +} + +// NewMsgServerImpl returns an implementation of the MsgServer interface +// for the provided Keeper. +func NewMsgServerImpl(keeper Keeper) types.MsgServer { + return &msgServer{Keeper: keeper} +} + +var _ types.MsgServer = msgServer{} diff --git a/x/smartaccounts/keeper/msg_update_params.go b/x/smartaccounts/keeper/msg_update_params.go new file mode 100644 index 00000000..57a0b36a --- /dev/null +++ b/x/smartaccounts/keeper/msg_update_params.go @@ -0,0 +1,32 @@ +package keeper + +import ( + "bytes" + "context" + + errorsmod "cosmossdk.io/errors" + + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +func (k msgServer) UpdateParams(ctx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { + authority, err := k.addressCodec.StringToBytes(req.Authority) + if err != nil { + return nil, errorsmod.Wrap(err, "invalid authority address") + } + + if !bytes.Equal(k.GetAuthority(), authority) { + expectedAuthorityStr, _ := k.addressCodec.BytesToString(k.GetAuthority()) + return nil, errorsmod.Wrapf(types.ErrInvalidSigner, "invalid authority; expected %s, got %s", expectedAuthorityStr, req.Authority) + } + + if err := req.Params.Validate(); err != nil { + return nil, err + } + + if err := k.Params.Set(ctx, req.Params); err != nil { + return nil, err + } + + return &types.MsgUpdateParamsResponse{}, nil +} diff --git a/x/smartaccounts/keeper/msg_update_params_test.go b/x/smartaccounts/keeper/msg_update_params_test.go new file mode 100644 index 00000000..fcaf6838 --- /dev/null +++ b/x/smartaccounts/keeper/msg_update_params_test.go @@ -0,0 +1,68 @@ +package keeper_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/node101-io/pulsar-chain/x/smartaccounts/keeper" + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +func TestMsgUpdateParams(t *testing.T) { + f := initFixture(t) + ms := keeper.NewMsgServerImpl(f.keeper) + + params := types.DefaultParams() + require.NoError(t, f.keeper.Params.Set(f.ctx, params)) + + authorityStr, err := f.addressCodec.BytesToString(f.keeper.GetAuthority()) + require.NoError(t, err) + + // default params + testCases := []struct { + name string + input *types.MsgUpdateParams + expErr bool + expErrMsg string + }{ + { + name: "invalid authority", + input: &types.MsgUpdateParams{ + Authority: "invalid", + Params: params, + }, + expErr: true, + expErrMsg: "invalid authority", + }, + { + name: "send enabled param", + input: &types.MsgUpdateParams{ + Authority: authorityStr, + Params: types.Params{}, + }, + expErr: false, + }, + { + name: "all good", + input: &types.MsgUpdateParams{ + Authority: authorityStr, + Params: params, + }, + expErr: false, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + _, err := ms.UpdateParams(f.ctx, tc.input) + + if tc.expErr { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expErrMsg) + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/x/smartaccounts/keeper/query.go b/x/smartaccounts/keeper/query.go new file mode 100644 index 00000000..977908a6 --- /dev/null +++ b/x/smartaccounts/keeper/query.go @@ -0,0 +1,17 @@ +package keeper + +import ( + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +var _ types.QueryServer = queryServer{} + +// NewQueryServerImpl returns an implementation of the QueryServer interface +// for the provided Keeper. +func NewQueryServerImpl(k Keeper) types.QueryServer { + return queryServer{k} +} + +type queryServer struct { + k Keeper +} diff --git a/x/smartaccounts/keeper/query_params.go b/x/smartaccounts/keeper/query_params.go new file mode 100644 index 00000000..c2e5d846 --- /dev/null +++ b/x/smartaccounts/keeper/query_params.go @@ -0,0 +1,26 @@ +package keeper + +import ( + "context" + "errors" + + "cosmossdk.io/collections" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +func (q queryServer) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + params, err := q.k.Params.Get(ctx) + if err != nil && !errors.Is(err, collections.ErrNotFound) { + return nil, status.Error(codes.Internal, "internal error") + } + + return &types.QueryParamsResponse{Params: params}, nil +} diff --git a/x/smartaccounts/keeper/query_params_test.go b/x/smartaccounts/keeper/query_params_test.go new file mode 100644 index 00000000..c11b7b2a --- /dev/null +++ b/x/smartaccounts/keeper/query_params_test.go @@ -0,0 +1,22 @@ +package keeper_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/node101-io/pulsar-chain/x/smartaccounts/keeper" + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +func TestParamsQuery(t *testing.T) { + f := initFixture(t) + + qs := keeper.NewQueryServerImpl(f.keeper) + params := types.DefaultParams() + require.NoError(t, f.keeper.Params.Set(f.ctx, params)) + + response, err := qs.Params(f.ctx, &types.QueryParamsRequest{}) + require.NoError(t, err) + require.Equal(t, &types.QueryParamsResponse{Params: params}, response) +} diff --git a/x/smartaccounts/module/autocli.go b/x/smartaccounts/module/autocli.go new file mode 100644 index 00000000..0fddd0f7 --- /dev/null +++ b/x/smartaccounts/module/autocli.go @@ -0,0 +1,33 @@ +package smartaccounts + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: types.Query_serviceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Params", + Use: "params", + Short: "Shows the parameters of the module", + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: types.Msg_serviceDesc.ServiceName, + EnhanceCustomCommand: true, // only required if you want to use the custom command + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "UpdateParams", + Skip: true, // skipped because authority gated + }, + }, + }, + } +} diff --git a/x/smartaccounts/module/depinject.go b/x/smartaccounts/module/depinject.go new file mode 100644 index 00000000..f60b7fd6 --- /dev/null +++ b/x/smartaccounts/module/depinject.go @@ -0,0 +1,62 @@ +package smartaccounts + +import ( + "cosmossdk.io/core/address" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/store" + "cosmossdk.io/depinject" + "cosmossdk.io/depinject/appconfig" + "github.com/cosmos/cosmos-sdk/codec" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + + "github.com/node101-io/pulsar-chain/x/smartaccounts/keeper" + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +var _ depinject.OnePerModuleType = AppModule{} + +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (AppModule) IsOnePerModuleType() {} + +func init() { + appconfig.Register( + &types.Module{}, + appconfig.Provide(ProvideModule), + ) +} + +type ModuleInputs struct { + depinject.In + + Config *types.Module + StoreService store.KVStoreService + Cdc codec.Codec + AddressCodec address.Codec + + AuthKeeper types.AuthKeeper + BankKeeper types.BankKeeper +} + +type ModuleOutputs struct { + depinject.Out + + SmartaccountsKeeper keeper.Keeper + Module appmodule.AppModule +} + +func ProvideModule(in ModuleInputs) ModuleOutputs { + // default to governance authority if not provided + authority := authtypes.NewModuleAddress(types.GovModuleName) + if in.Config.Authority != "" { + authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) + } + k := keeper.NewKeeper( + in.StoreService, + in.Cdc, + in.AddressCodec, + authority, + ) + m := NewAppModule(in.Cdc, k, in.AuthKeeper, in.BankKeeper) + + return ModuleOutputs{SmartaccountsKeeper: k, Module: m} +} diff --git a/x/smartaccounts/module/module.go b/x/smartaccounts/module/module.go new file mode 100644 index 00000000..e4b4bd14 --- /dev/null +++ b/x/smartaccounts/module/module.go @@ -0,0 +1,143 @@ +package smartaccounts + +import ( + "context" + "encoding/json" + "fmt" + + "cosmossdk.io/core/appmodule" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "google.golang.org/grpc" + + "github.com/node101-io/pulsar-chain/x/smartaccounts/keeper" + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +var ( + _ module.AppModuleBasic = (*AppModule)(nil) + _ module.AppModule = (*AppModule)(nil) + _ module.HasGenesis = (*AppModule)(nil) + + _ appmodule.AppModule = (*AppModule)(nil) + _ appmodule.HasBeginBlocker = (*AppModule)(nil) + _ appmodule.HasEndBlocker = (*AppModule)(nil) +) + +// AppModule implements the AppModule interface that defines the inter-dependent methods that modules need to implement +type AppModule struct { + cdc codec.Codec + keeper keeper.Keeper + authKeeper types.AuthKeeper + bankKeeper types.BankKeeper +} + +func NewAppModule( + cdc codec.Codec, + keeper keeper.Keeper, + authKeeper types.AuthKeeper, + bankKeeper types.BankKeeper, +) AppModule { + return AppModule{ + cdc: cdc, + keeper: keeper, + authKeeper: authKeeper, + bankKeeper: bankKeeper, + } +} + +// IsAppModule implements the appmodule.AppModule interface. +func (AppModule) IsAppModule() {} + +// Name returns the name of the module as a string. +func (AppModule) Name() string { + return types.ModuleName +} + +// RegisterLegacyAminoCodec registers the amino codec +func (AppModule) RegisterLegacyAminoCodec(*codec.LegacyAmino) {} + +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. +func (AppModule) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { + if err := types.RegisterQueryHandlerClient(clientCtx.CmdContext, mux, types.NewQueryClient(clientCtx)); err != nil { + panic(err) + } +} + +// RegisterInterfaces registers a module's interface types and their concrete implementations as proto.Message. +func (AppModule) RegisterInterfaces(registrar codectypes.InterfaceRegistry) { + types.RegisterInterfaces(registrar) +} + +// RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries +func (am AppModule) RegisterServices(registrar grpc.ServiceRegistrar) error { + types.RegisterMsgServer(registrar, keeper.NewMsgServerImpl(am.keeper)) + types.RegisterQueryServer(registrar, keeper.NewQueryServerImpl(am.keeper)) + + return nil +} + +// DefaultGenesis returns a default GenesisState for the module, marshalled to json.RawMessage. +// The default GenesisState need to be defined by the module developer and is primarily used for testing. +func (am AppModule) DefaultGenesis(codec.JSONCodec) json.RawMessage { + return am.cdc.MustMarshalJSON(types.DefaultGenesis()) +} + +// ValidateGenesis used to validate the GenesisState, given in its json.RawMessage form. +func (am AppModule) ValidateGenesis(_ codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { + var genState types.GenesisState + if err := am.cdc.UnmarshalJSON(bz, &genState); err != nil { + return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) + } + + return genState.Validate() +} + +// InitGenesis performs the module's genesis initialization. It returns no validator updates. +func (am AppModule) InitGenesis(ctx sdk.Context, _ codec.JSONCodec, gs json.RawMessage) { + var genState types.GenesisState + // Initialize global index to index in genesis state + if err := am.cdc.UnmarshalJSON(gs, &genState); err != nil { + panic(fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err)) + } + + if err := am.keeper.InitGenesis(ctx, genState); err != nil { + panic(fmt.Errorf("failed to initialize %s genesis state: %w", types.ModuleName, err)) + } +} + +// ExportGenesis returns the module's exported genesis state as raw JSON bytes. +func (am AppModule) ExportGenesis(ctx sdk.Context, _ codec.JSONCodec) json.RawMessage { + genState, err := am.keeper.ExportGenesis(ctx) + if err != nil { + panic(fmt.Errorf("failed to export %s genesis state: %w", types.ModuleName, err)) + } + + bz, err := am.cdc.MarshalJSON(genState) + if err != nil { + panic(fmt.Errorf("failed to marshal %s genesis state: %w", types.ModuleName, err)) + } + + return bz +} + +// ConsensusVersion is a sequence number for state-breaking change of the module. +// It should be incremented on each consensus-breaking change introduced by the module. +// To avoid wrong/empty versions, the initial version should be set to 1. +func (AppModule) ConsensusVersion() uint64 { return 1 } + +// BeginBlock contains the logic that is automatically triggered at the beginning of each block. +// The begin block implementation is optional. +func (am AppModule) BeginBlock(_ context.Context) error { + return nil +} + +// EndBlock contains the logic that is automatically triggered at the end of each block. +// The end block implementation is optional. +func (am AppModule) EndBlock(_ context.Context) error { + return nil +} diff --git a/x/smartaccounts/module/simulation.go b/x/smartaccounts/module/simulation.go new file mode 100644 index 00000000..50e5c607 --- /dev/null +++ b/x/smartaccounts/module/simulation.go @@ -0,0 +1,34 @@ +package smartaccounts + +import ( + "github.com/cosmos/cosmos-sdk/types/module" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +// GenerateGenesisState creates a randomized GenState of the module. +func (AppModule) GenerateGenesisState(simState *module.SimulationState) { + accs := make([]string, len(simState.Accounts)) + for i, acc := range simState.Accounts { + accs[i] = acc.Address.String() + } + smartaccountsGenesis := types.GenesisState{ + Params: types.DefaultParams(), + } + simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&smartaccountsGenesis) +} + +// RegisterStoreDecoder registers a decoder. +func (am AppModule) RegisterStoreDecoder(_ simtypes.StoreDecoderRegistry) {} + +// WeightedOperations returns the all the gov module operations with their respective weights. +func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { + operations := make([]simtypes.WeightedOperation, 0) + return operations +} + +// ProposalMsgs returns msgs used for governance proposals for simulations. +func (am AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.WeightedProposalMsg { + return []simtypes.WeightedProposalMsg{} +} diff --git a/x/smartaccounts/types/codec.go b/x/smartaccounts/types/codec.go new file mode 100644 index 00000000..56398f5e --- /dev/null +++ b/x/smartaccounts/types/codec.go @@ -0,0 +1,14 @@ +package types + +import ( + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +func RegisterInterfaces(registrar codectypes.InterfaceRegistry) { + registrar.RegisterImplementations((*sdk.Msg)(nil), + &MsgUpdateParams{}, + ) + msgservice.RegisterMsgServiceDesc(registrar, &_Msg_serviceDesc) +} diff --git a/x/smartaccounts/types/errors.go b/x/smartaccounts/types/errors.go new file mode 100644 index 00000000..b6914ed1 --- /dev/null +++ b/x/smartaccounts/types/errors.go @@ -0,0 +1,12 @@ +package types + +// DONTCOVER + +import ( + "cosmossdk.io/errors" +) + +// x/smartaccounts module sentinel errors +var ( + ErrInvalidSigner = errors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message") +) diff --git a/x/smartaccounts/types/expected_keepers.go b/x/smartaccounts/types/expected_keepers.go new file mode 100644 index 00000000..b175461c --- /dev/null +++ b/x/smartaccounts/types/expected_keepers.go @@ -0,0 +1,27 @@ +package types + +import ( + "context" + + "cosmossdk.io/core/address" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// AuthKeeper defines the expected interface for the Auth module. +type AuthKeeper interface { + AddressCodec() address.Codec + 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 +} + +// ParamSubspace defines the expected Subspace interface for parameters. +type ParamSubspace interface { + Get(context.Context, []byte, interface{}) + Set(context.Context, []byte, interface{}) +} diff --git a/x/smartaccounts/types/genesis.go b/x/smartaccounts/types/genesis.go new file mode 100644 index 00000000..9d633ecd --- /dev/null +++ b/x/smartaccounts/types/genesis.go @@ -0,0 +1,14 @@ +package types + +// DefaultGenesis returns the default genesis state +func DefaultGenesis() *GenesisState { + return &GenesisState{ + Params: DefaultParams(), + } +} + +// Validate performs basic genesis state validation returning an error upon any +// failure. +func (gs GenesisState) Validate() error { + return gs.Params.Validate() +} diff --git a/x/smartaccounts/types/genesis.pb.go b/x/smartaccounts/types/genesis.pb.go new file mode 100644 index 00000000..bcfd4846 --- /dev/null +++ b/x/smartaccounts/types/genesis.pb.go @@ -0,0 +1,328 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: pulsarchain/smartaccounts/v1/genesis.proto + +package types + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the smartaccounts module's genesis state. +type GenesisState struct { + // params defines all the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_a0f3311099fd44bf, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "pulsarchain.smartaccounts.v1.GenesisState") +} + +func init() { + proto.RegisterFile("pulsarchain/smartaccounts/v1/genesis.proto", fileDescriptor_a0f3311099fd44bf) +} + +var fileDescriptor_a0f3311099fd44bf = []byte{ + // 232 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x2a, 0x28, 0xcd, 0x29, + 0x4e, 0x2c, 0x4a, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x2f, 0xce, 0x4d, 0x2c, 0x2a, 0x49, 0x4c, 0x4e, + 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, + 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x41, 0x52, 0xab, 0x87, 0xa2, 0x56, 0xaf, 0xcc, + 0x50, 0x4a, 0x30, 0x31, 0x37, 0x33, 0x2f, 0x5f, 0x1f, 0x4c, 0x42, 0x34, 0x48, 0x89, 0xa4, 0xe7, + 0xa7, 0xe7, 0x83, 0x99, 0xfa, 0x20, 0x16, 0x54, 0x54, 0x13, 0xaf, 0x95, 0x05, 0x89, 0x45, 0x89, + 0xb9, 0x50, 0x1b, 0x95, 0xc2, 0xb9, 0x78, 0xdc, 0x21, 0x4e, 0x08, 0x2e, 0x49, 0x2c, 0x49, 0x15, + 0x72, 0xe7, 0x62, 0x83, 0xc8, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0xa9, 0xe8, 0xe1, 0x73, + 0x92, 0x5e, 0x00, 0x58, 0xad, 0x13, 0xe7, 0x89, 0x7b, 0xf2, 0x0c, 0x2b, 0x9e, 0x6f, 0xd0, 0x62, + 0x0c, 0x82, 0x6a, 0x77, 0x0a, 0x3a, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, + 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, + 0x8b, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xbc, 0xfc, 0x94, 0x54, + 0x43, 0x03, 0x43, 0xdd, 0xcc, 0x7c, 0x7d, 0x88, 0x3d, 0xba, 0x10, 0x47, 0x57, 0xa0, 0x39, 0xbb, + 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xec, 0x66, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x17, 0x6f, 0x86, 0x72, 0x53, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/smartaccounts/types/genesis_test.go b/x/smartaccounts/types/genesis_test.go new file mode 100644 index 00000000..98403d3c --- /dev/null +++ b/x/smartaccounts/types/genesis_test.go @@ -0,0 +1,37 @@ +package types_test + +import ( + "testing" + + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" + "github.com/stretchr/testify/require" +) + +func TestGenesisState_Validate(t *testing.T) { + tests := []struct { + desc string + genState *types.GenesisState + valid bool + }{ + { + desc: "default is valid", + genState: types.DefaultGenesis(), + valid: true, + }, + { + desc: "valid genesis state", + genState: &types.GenesisState{}, + valid: true, + }, + } + for _, tc := range tests { + t.Run(tc.desc, func(t *testing.T) { + err := tc.genState.Validate() + if tc.valid { + require.NoError(t, err) + } else { + require.Error(t, err) + } + }) + } +} diff --git a/x/smartaccounts/types/keys.go b/x/smartaccounts/types/keys.go new file mode 100644 index 00000000..b7fb2ccf --- /dev/null +++ b/x/smartaccounts/types/keys.go @@ -0,0 +1,19 @@ +package types + +import "cosmossdk.io/collections" + +const ( + // ModuleName defines the module name + ModuleName = "smartaccounts" + + // StoreKey defines the primary module store key + StoreKey = ModuleName + + // GovModuleName duplicates the gov module's name to avoid a dependency with x/gov. + // It should be synced with the gov module's name if it is ever changed. + // See: https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.2/x/gov/types/keys.go#L9 + GovModuleName = "gov" +) + +// ParamsKey is the prefix to retrieve all Params +var ParamsKey = collections.NewPrefix("p_smartaccounts") diff --git a/x/smartaccounts/types/module.pb.go b/x/smartaccounts/types/module.pb.go new file mode 100644 index 00000000..137c2cc6 --- /dev/null +++ b/x/smartaccounts/types/module.pb.go @@ -0,0 +1,325 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: pulsarchain/smartaccounts/module/v1/module.proto + +package types + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + _ "cosmossdk.io/api/cosmos/app/v1alpha1" + proto "github.com/cosmos/gogoproto/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Module is the config object for the module. +type Module struct { + // authority defines the custom module authority. + // If not set, defaults to the governance module. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` +} + +func (m *Module) Reset() { *m = Module{} } +func (m *Module) String() string { return proto.CompactTextString(m) } +func (*Module) ProtoMessage() {} +func (*Module) Descriptor() ([]byte, []int) { + return fileDescriptor_7f695f04f9c4d3b5, []int{0} +} +func (m *Module) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Module) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Module.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Module) XXX_Merge(src proto.Message) { + xxx_messageInfo_Module.Merge(m, src) +} +func (m *Module) XXX_Size() int { + return m.Size() +} +func (m *Module) XXX_DiscardUnknown() { + xxx_messageInfo_Module.DiscardUnknown(m) +} + +var xxx_messageInfo_Module proto.InternalMessageInfo + +func (m *Module) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func init() { + proto.RegisterType((*Module)(nil), "pulsarchain.smartaccounts.module.v1.Module") +} + +func init() { + proto.RegisterFile("pulsarchain/smartaccounts/module/v1/module.proto", fileDescriptor_7f695f04f9c4d3b5) +} + +var fileDescriptor_7f695f04f9c4d3b5 = []byte{ + // 217 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x28, 0x28, 0xcd, 0x29, + 0x4e, 0x2c, 0x4a, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x2f, 0xce, 0x4d, 0x2c, 0x2a, 0x49, 0x4c, 0x4e, + 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0xcf, 0xcd, 0x4f, 0x29, 0xcd, 0x49, 0xd5, 0x2f, 0x33, 0x84, + 0xb2, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x94, 0x91, 0x74, 0xe8, 0xa1, 0xe8, 0xd0, 0x83, + 0xaa, 0x2b, 0x33, 0x94, 0x52, 0x48, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x2c, 0x28, 0xd0, + 0x2f, 0x33, 0x4c, 0xcc, 0x29, 0xc8, 0x48, 0x44, 0x35, 0x46, 0x29, 0x89, 0x8b, 0xcd, 0x17, 0xcc, + 0x17, 0x92, 0xe1, 0xe2, 0x4c, 0x2c, 0x2d, 0xc9, 0xc8, 0x2f, 0xca, 0x2c, 0xa9, 0x94, 0x60, 0x54, + 0x60, 0xd4, 0xe0, 0x0c, 0x42, 0x08, 0x58, 0x59, 0xed, 0x3a, 0x30, 0xed, 0x16, 0xa3, 0x09, 0x97, + 0x51, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x5e, 0x7e, 0x4a, 0xaa, + 0xa1, 0x81, 0xa1, 0x6e, 0x66, 0xbe, 0x3e, 0xc4, 0x31, 0xba, 0x10, 0xf7, 0x57, 0xa0, 0xfa, 0xc0, + 0x29, 0xe8, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, + 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x2c, 0x48, 0x37, 0x4d, + 0xbf, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xec, 0x7c, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x58, 0x5b, 0x34, 0x43, 0x39, 0x01, 0x00, 0x00, +} + +func (m *Module) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Module) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Module) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintModule(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintModule(dAtA []byte, offset int, v uint64) int { + offset -= sovModule(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Module) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovModule(uint64(l)) + } + return n +} + +func sovModule(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozModule(x uint64) (n int) { + return sovModule(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Module) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Module: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModule + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModule + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModule + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModule(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModule + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipModule(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowModule + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowModule + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowModule + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthModule + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupModule + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthModule + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthModule = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowModule = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupModule = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/smartaccounts/types/params.go b/x/smartaccounts/types/params.go new file mode 100644 index 00000000..d7e00501 --- /dev/null +++ b/x/smartaccounts/types/params.go @@ -0,0 +1,17 @@ +package types + +// NewParams creates a new Params instance. +func NewParams() Params { + return Params{} +} + +// DefaultParams returns a default set of parameters. +func DefaultParams() Params { + return NewParams() +} + +// Validate validates the set of params. +func (p Params) Validate() error { + + return nil +} diff --git a/x/smartaccounts/types/params.pb.go b/x/smartaccounts/types/params.pb.go new file mode 100644 index 00000000..2861f4f5 --- /dev/null +++ b/x/smartaccounts/types/params.pb.go @@ -0,0 +1,293 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: pulsarchain/smartaccounts/v1/params.proto + +package types + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the parameters for the module. +type Params struct { +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_07ef7ec9bd065507, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Params)(nil), "pulsarchain.smartaccounts.v1.Params") +} + +func init() { + proto.RegisterFile("pulsarchain/smartaccounts/v1/params.proto", fileDescriptor_07ef7ec9bd065507) +} + +var fileDescriptor_07ef7ec9bd065507 = []byte{ + // 195 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x2c, 0x28, 0xcd, 0x29, + 0x4e, 0x2c, 0x4a, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x2f, 0xce, 0x4d, 0x2c, 0x2a, 0x49, 0x4c, 0x4e, + 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x41, 0x52, 0xaa, 0x87, 0xa2, 0x54, 0xaf, 0xcc, 0x50, + 0x4a, 0x30, 0x31, 0x37, 0x33, 0x2f, 0x5f, 0x1f, 0x4c, 0x42, 0x34, 0x48, 0x89, 0xa4, 0xe7, 0xa7, + 0xe7, 0x83, 0x99, 0xfa, 0x20, 0x16, 0x44, 0x54, 0xc9, 0x94, 0x8b, 0x2d, 0x00, 0x6c, 0xac, 0x95, + 0xf6, 0x8b, 0x05, 0xf2, 0x8c, 0x5d, 0xcf, 0x37, 0x68, 0x29, 0x21, 0x3b, 0xa2, 0x02, 0xcd, 0x19, + 0x10, 0xc5, 0x4e, 0x41, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, + 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x91, + 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x97, 0x9f, 0x92, 0x6a, 0x68, + 0x60, 0xa8, 0x9b, 0x99, 0xaf, 0x0f, 0x31, 0x53, 0x17, 0xbb, 0xa1, 0x25, 0x95, 0x05, 0xa9, 0xc5, + 0x49, 0x6c, 0x60, 0x17, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x9a, 0x0d, 0xfa, 0x05, + 0x01, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/smartaccounts/types/query.pb.go b/x/smartaccounts/types/query.pb.go new file mode 100644 index 00000000..45ec9c33 --- /dev/null +++ b/x/smartaccounts/types/query.pb.go @@ -0,0 +1,545 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: pulsarchain/smartaccounts/v1/query.proto + +package types + +import ( + context "context" + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + _ "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsRequest is request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_a3b4a6c0fe689fae, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params holds all the parameters of this module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a3b4a6c0fe689fae, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "pulsarchain.smartaccounts.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "pulsarchain.smartaccounts.v1.QueryParamsResponse") +} + +func init() { + proto.RegisterFile("pulsarchain/smartaccounts/v1/query.proto", fileDescriptor_a3b4a6c0fe689fae) +} + +var fileDescriptor_a3b4a6c0fe689fae = []byte{ + // 338 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0x31, 0x4b, 0xc3, 0x40, + 0x14, 0xc7, 0x73, 0x82, 0x05, 0xe3, 0x64, 0xec, 0x20, 0xa5, 0x44, 0x29, 0x0e, 0xb5, 0xd0, 0x5c, + 0xaf, 0x2e, 0x9d, 0xbb, 0xb8, 0x6a, 0x47, 0x07, 0xe1, 0x25, 0x1e, 0xe9, 0x41, 0x73, 0xef, 0x9a, + 0xbb, 0x14, 0xbb, 0xfa, 0x09, 0x04, 0x3f, 0x84, 0x8e, 0xfa, 0x2d, 0x3a, 0x16, 0x5c, 0x9c, 0x44, + 0x1a, 0xc1, 0xaf, 0x21, 0xcd, 0x65, 0xb0, 0x8a, 0x01, 0x97, 0xe3, 0xf1, 0xbf, 0xff, 0xff, 0xf7, + 0xde, 0xbb, 0x73, 0xdb, 0x2a, 0x9b, 0x68, 0x48, 0xa3, 0x31, 0x08, 0x49, 0x75, 0x02, 0xa9, 0x81, + 0x28, 0xc2, 0x4c, 0x1a, 0x4d, 0x67, 0x8c, 0x4e, 0x33, 0x9e, 0xce, 0x03, 0x95, 0xa2, 0x41, 0xaf, + 0xf9, 0xcd, 0x19, 0x6c, 0x38, 0x83, 0x19, 0x6b, 0xec, 0x41, 0x22, 0x24, 0xd2, 0xe2, 0xb4, 0x81, + 0x46, 0x3d, 0xc6, 0x18, 0x8b, 0x92, 0xae, 0xab, 0x52, 0x6d, 0xc6, 0x88, 0xf1, 0x84, 0x53, 0x50, + 0x82, 0x82, 0x94, 0x68, 0xc0, 0x08, 0x94, 0xba, 0xbc, 0xed, 0x44, 0xa8, 0x13, 0xd4, 0x34, 0x04, + 0xcd, 0x6d, 0x77, 0x3a, 0x63, 0x21, 0x37, 0xc0, 0xa8, 0x82, 0x58, 0xc8, 0xc2, 0x5c, 0x7a, 0x4f, + 0x2a, 0x47, 0x57, 0x90, 0x42, 0x52, 0x62, 0x5b, 0x75, 0xd7, 0xbb, 0x58, 0xc3, 0xce, 0x0b, 0x71, + 0xc4, 0xa7, 0x19, 0xd7, 0xa6, 0x75, 0xe5, 0xee, 0x6f, 0xa8, 0x5a, 0xa1, 0xd4, 0xdc, 0x3b, 0x73, + 0x6b, 0x36, 0x7c, 0x40, 0x8e, 0x48, 0x7b, 0xb7, 0x7f, 0x1c, 0x54, 0x6d, 0x1e, 0xd8, 0xf4, 0x70, + 0x67, 0xf1, 0x76, 0xe8, 0x3c, 0x7e, 0x3e, 0x75, 0xc8, 0xa8, 0x8c, 0xf7, 0x9f, 0x89, 0xbb, 0x5d, + 0x34, 0xf0, 0x1e, 0x88, 0x5b, 0xb3, 0x3e, 0xaf, 0x57, 0x4d, 0xfb, 0x3d, 0x66, 0x83, 0xfd, 0x23, + 0x61, 0x57, 0x68, 0x0d, 0x6e, 0x5f, 0x3e, 0xee, 0xb7, 0xfa, 0x5e, 0x8f, 0x4a, 0xbc, 0xe6, 0xac, + 0xc7, 0xba, 0x02, 0xa9, 0xa5, 0x74, 0x2b, 0xdf, 0x6b, 0x38, 0x5a, 0xac, 0x7c, 0xb2, 0x5c, 0xf9, + 0xe4, 0x7d, 0xe5, 0x93, 0xbb, 0xdc, 0x77, 0x96, 0xb9, 0xef, 0xbc, 0xe6, 0xbe, 0x73, 0x39, 0x88, + 0x85, 0x19, 0x67, 0x61, 0x10, 0x61, 0xf2, 0x27, 0xf5, 0xe6, 0x07, 0xd7, 0xcc, 0x15, 0xd7, 0x61, + 0xad, 0xf8, 0x84, 0xd3, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xce, 0x80, 0x66, 0x55, 0x6c, 0x02, + 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/pulsarchain.smartaccounts.v1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pulsarchain.smartaccounts.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var Query_serviceDesc = _Query_serviceDesc +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pulsarchain.smartaccounts.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "pulsarchain/smartaccounts/v1/query.proto", +} + +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/smartaccounts/types/query.pb.gw.go b/x/smartaccounts/types/query.pb.gw.go new file mode 100644 index 00000000..c6494007 --- /dev/null +++ b/x/smartaccounts/types/query.pb.gw.go @@ -0,0 +1,153 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: pulsarchain/smartaccounts/v1/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"node101-io", "pulsar-chain", "smartaccounts", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage +) diff --git a/x/smartaccounts/types/tx.pb.go b/x/smartaccounts/types/tx.pb.go new file mode 100644 index 00000000..05f120e7 --- /dev/null +++ b/x/smartaccounts/types/tx.pb.go @@ -0,0 +1,603 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: pulsarchain/smartaccounts/v1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgUpdateParams is the Msg/UpdateParams request type. +type MsgUpdateParams struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the module parameters to update. + // + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_c2293ab44008f8fc, []int{0} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c2293ab44008f8fc, []int{1} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "pulsarchain.smartaccounts.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "pulsarchain.smartaccounts.v1.MsgUpdateParamsResponse") +} + +func init() { + proto.RegisterFile("pulsarchain/smartaccounts/v1/tx.proto", fileDescriptor_c2293ab44008f8fc) +} + +var fileDescriptor_c2293ab44008f8fc = []byte{ + // 366 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2d, 0x28, 0xcd, 0x29, + 0x4e, 0x2c, 0x4a, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x2f, 0xce, 0x4d, 0x2c, 0x2a, 0x49, 0x4c, 0x4e, + 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x92, 0x41, 0x52, 0xa6, 0x87, 0xa2, 0x4c, 0xaf, 0xcc, 0x50, 0x4a, 0x30, 0x31, 0x37, + 0x33, 0x2f, 0x5f, 0x1f, 0x4c, 0x42, 0x34, 0x48, 0x89, 0x27, 0xe7, 0x17, 0xe7, 0xe6, 0x17, 0xeb, + 0xe7, 0x16, 0xa7, 0x83, 0x0c, 0xca, 0x2d, 0x4e, 0x87, 0x4a, 0x48, 0x42, 0x24, 0xe2, 0xc1, 0x3c, + 0x7d, 0x08, 0x07, 0x2a, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x11, 0x07, 0xb1, 0xa0, 0xa2, 0x9a, + 0x78, 0x5d, 0x58, 0x90, 0x58, 0x94, 0x98, 0x0b, 0x35, 0x40, 0xe9, 0x12, 0x23, 0x17, 0xbf, 0x6f, + 0x71, 0x7a, 0x68, 0x41, 0x4a, 0x62, 0x49, 0x6a, 0x00, 0x58, 0x46, 0xc8, 0x8c, 0x8b, 0x33, 0xb1, + 0xb4, 0x24, 0x23, 0xbf, 0x28, 0xb3, 0xa4, 0x52, 0x82, 0x51, 0x81, 0x51, 0x83, 0xd3, 0x49, 0xe2, + 0xd2, 0x16, 0x5d, 0x11, 0xa8, 0xcd, 0x8e, 0x29, 0x29, 0x45, 0xa9, 0xc5, 0xc5, 0xc1, 0x25, 0x45, + 0x99, 0x79, 0xe9, 0x41, 0x08, 0xa5, 0x42, 0xee, 0x5c, 0x6c, 0x10, 0xb3, 0x25, 0x98, 0x14, 0x18, + 0x35, 0xb8, 0x8d, 0x54, 0xf4, 0xf0, 0x05, 0x81, 0x1e, 0xc4, 0x36, 0x27, 0xce, 0x13, 0xf7, 0xe4, + 0x19, 0x56, 0x3c, 0xdf, 0xa0, 0xc5, 0x18, 0x04, 0xd5, 0x6e, 0x65, 0xd7, 0xf4, 0x7c, 0x83, 0x16, + 0xc2, 0xe0, 0xae, 0xe7, 0x1b, 0xb4, 0xb4, 0x91, 0xbd, 0x54, 0x81, 0xe6, 0x29, 0x34, 0x0f, 0x28, + 0x49, 0x72, 0x89, 0xa3, 0x09, 0x05, 0xa5, 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0x1a, 0x35, 0x31, + 0x72, 0x31, 0xfb, 0x16, 0xa7, 0x0b, 0x95, 0x70, 0xf1, 0xa0, 0xf8, 0x59, 0x17, 0xbf, 0x5b, 0xd1, + 0x8c, 0x93, 0x32, 0x25, 0x49, 0x39, 0xcc, 0x76, 0x29, 0xd6, 0x06, 0x90, 0x3f, 0x9d, 0x82, 0x4e, + 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, + 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x22, 0x3d, 0xb3, 0x24, 0xa3, 0x34, + 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x2f, 0x3f, 0x25, 0xd5, 0xd0, 0xc0, 0x50, 0x37, 0x33, 0x5f, + 0x1f, 0x62, 0x99, 0x2e, 0x76, 0xdf, 0x97, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0xe3, 0xd3, + 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x6e, 0x47, 0x82, 0x9e, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/pulsarchain.smartaccounts.v1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // UpdateParams defines a (governance) operation for updating the module + // parameters. The authority defaults to the x/gov module account. + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pulsarchain.smartaccounts.v1.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +var Msg_serviceDesc = _Msg_serviceDesc +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pulsarchain.smartaccounts.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "pulsarchain/smartaccounts/v1/tx.proto", +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/smartaccounts/types/types.go b/x/smartaccounts/types/types.go new file mode 100644 index 00000000..ab1254f4 --- /dev/null +++ b/x/smartaccounts/types/types.go @@ -0,0 +1 @@ +package types diff --git a/x/verification/sidecar/api/v1/verification_service.pb.go b/x/verification/sidecar/api/v1/verification_service.pb.go index 0b70dc2a..cd63a6ac 100644 --- a/x/verification/sidecar/api/v1/verification_service.pb.go +++ b/x/verification/sidecar/api/v1/verification_service.pb.go @@ -6,14 +6,15 @@ package sidecarv1 import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/verification/types/genesis.pb.go b/x/verification/types/genesis.pb.go index f437c2d7..e7d78f6f 100644 --- a/x/verification/types/genesis.pb.go +++ b/x/verification/types/genesis.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/verification/types/module.pb.go b/x/verification/types/module.pb.go index 205cdcd0..c01414e7 100644 --- a/x/verification/types/module.pb.go +++ b/x/verification/types/module.pb.go @@ -4,12 +4,13 @@ package types import ( - _ "cosmossdk.io/api/cosmos/app/v1alpha1" fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "cosmossdk.io/api/cosmos/app/v1alpha1" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/verification/types/params.pb.go b/x/verification/types/params.pb.go index bb06cd5d..d9a3ddee 100644 --- a/x/verification/types/params.pb.go +++ b/x/verification/types/params.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/verification/types/query.pb.go b/x/verification/types/query.pb.go index f2546eb5..0f37931f 100644 --- a/x/verification/types/query.pb.go +++ b/x/verification/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -16,9 +20,6 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/verification/types/tx.pb.go b/x/verification/types/tx.pb.go index 69542a7b..ef7771ce 100644 --- a/x/verification/types/tx.pb.go +++ b/x/verification/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -15,9 +19,6 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/verification/types/types.pb.go b/x/verification/types/types.pb.go index 8b0f7721..1a4a24a5 100644 --- a/x/verification/types/types.pb.go +++ b/x/verification/types/types.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/verification/types/vote_extension.pb.go b/x/verification/types/vote_extension.pb.go index fc3607e6..b273ff6d 100644 --- a/x/verification/types/vote_extension.pb.go +++ b/x/verification/types/vote_extension.pb.go @@ -5,11 +5,12 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/votepersistence/types/genesis.pb.go b/x/votepersistence/types/genesis.pb.go index e252c7ba..9c48d742 100644 --- a/x/votepersistence/types/genesis.pb.go +++ b/x/votepersistence/types/genesis.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/votepersistence/types/module.pb.go b/x/votepersistence/types/module.pb.go index 319820ca..15faa0b1 100644 --- a/x/votepersistence/types/module.pb.go +++ b/x/votepersistence/types/module.pb.go @@ -4,12 +4,13 @@ package types import ( - _ "cosmossdk.io/api/cosmos/app/v1alpha1" fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "cosmossdk.io/api/cosmos/app/v1alpha1" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/votepersistence/types/params.pb.go b/x/votepersistence/types/params.pb.go index 3d572a3f..db7a5855 100644 --- a/x/votepersistence/types/params.pb.go +++ b/x/votepersistence/types/params.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/votepersistence/types/query.pb.go b/x/votepersistence/types/query.pb.go index 75fd7684..4eb69233 100644 --- a/x/votepersistence/types/query.pb.go +++ b/x/votepersistence/types/query.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" @@ -15,9 +19,6 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/votepersistence/types/tx.pb.go b/x/votepersistence/types/tx.pb.go index 31772b17..c72264a0 100644 --- a/x/votepersistence/types/tx.pb.go +++ b/x/votepersistence/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -15,9 +19,6 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/votepersistence/types/vote_ext_body.pb.go b/x/votepersistence/types/vote_ext_body.pb.go index fed4b448..3377e8e8 100644 --- a/x/votepersistence/types/vote_ext_body.pb.go +++ b/x/votepersistence/types/vote_ext_body.pb.go @@ -5,10 +5,11 @@ package types import ( fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. From cbdf712adf2caa20a4380a2bdca65f47b62c7072 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Mon, 24 Aug 2026 16:31:24 +0300 Subject: [PATCH 02/51] feat: define session key and smart contract messages --- abci/payload.pb.go | 5 +- abci/query.pb.go | 7 +- app/ante/types/tx_auth.pb.go | 5 +- common/validator_entry.pb.go | 3 +- .../pulsarchain/smartaccounts/v1/types.proto | 16 + x/bridge/types/action.pb.go | 3 +- x/bridge/types/actions_root_snapshot.pb.go | 7 +- x/bridge/types/bridge_state.pb.go | 3 +- x/bridge/types/genesis.pb.go | 7 +- x/bridge/types/module.pb.go | 5 +- x/bridge/types/params.pb.go | 7 +- x/bridge/types/query.pb.go | 7 +- x/bridge/types/tx.pb.go | 7 +- x/keyregistry/types/actor_type.pb.go | 3 +- x/keyregistry/types/genesis.pb.go | 7 +- .../types/key_signing_operation.pb.go | 3 +- x/keyregistry/types/module.pb.go | 5 +- x/keyregistry/types/params.pb.go | 7 +- x/keyregistry/types/public_key_pair.pb.go | 3 +- x/keyregistry/types/query.pb.go | 7 +- .../registered_validator_set_entry.pb.go | 3 +- x/keyregistry/types/tx.pb.go | 7 +- x/smartaccounts/types/genesis.pb.go | 7 +- x/smartaccounts/types/module.pb.go | 5 +- x/smartaccounts/types/params.pb.go | 7 +- x/smartaccounts/types/query.pb.go | 51 +- x/smartaccounts/types/tx.pb.go | 7 +- x/smartaccounts/types/types.pb.go | 545 ++++++++++++++++++ .../sidecar/api/v1/verification_service.pb.go | 7 +- x/verification/types/genesis.pb.go | 7 +- x/verification/types/module.pb.go | 5 +- x/verification/types/params.pb.go | 7 +- x/verification/types/query.pb.go | 7 +- x/verification/types/tx.pb.go | 7 +- x/verification/types/types.pb.go | 7 +- x/verification/types/vote_extension.pb.go | 5 +- x/votepersistence/types/genesis.pb.go | 7 +- x/votepersistence/types/module.pb.go | 5 +- x/votepersistence/types/params.pb.go | 7 +- x/votepersistence/types/query.pb.go | 7 +- x/votepersistence/types/tx.pb.go | 7 +- x/votepersistence/types/vote_ext_body.pb.go | 3 +- 42 files changed, 679 insertions(+), 158 deletions(-) create mode 100644 proto/pulsarchain/smartaccounts/v1/types.proto create mode 100644 x/smartaccounts/types/types.pb.go diff --git a/abci/payload.pb.go b/abci/payload.pb.go index 5a117aa2..b077d92a 100644 --- a/abci/payload.pb.go +++ b/abci/payload.pb.go @@ -5,12 +5,11 @@ package abci import ( fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + types "github.com/node101-io/pulsar-chain/x/verification/types" io "io" math "math" math_bits "math/bits" - - proto "github.com/cosmos/gogoproto/proto" - types "github.com/node101-io/pulsar-chain/x/verification/types" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/abci/query.pb.go b/abci/query.pb.go index 0d2c409f..02f2665a 100644 --- a/abci/query.pb.go +++ b/abci/query.pb.go @@ -6,10 +6,6 @@ package abci import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" common "github.com/node101-io/pulsar-chain/common" @@ -18,6 +14,9 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/app/ante/types/tx_auth.pb.go b/app/ante/types/tx_auth.pb.go index 08eface7..03c7af3b 100644 --- a/app/ante/types/tx_auth.pb.go +++ b/app/ante/types/tx_auth.pb.go @@ -5,12 +5,11 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/common/validator_entry.pb.go b/common/validator_entry.pb.go index 51ac23f1..6794a059 100644 --- a/common/validator_entry.pb.go +++ b/common/validator_entry.pb.go @@ -5,11 +5,10 @@ package common import ( fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/pulsarchain/smartaccounts/v1/types.proto b/proto/pulsarchain/smartaccounts/v1/types.proto new file mode 100644 index 00000000..9e30dcca --- /dev/null +++ b/proto/pulsarchain/smartaccounts/v1/types.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package pulsarchain.smartaccounts.v1; + +import "amino/amino.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/node101-io/pulsar-chain/x/smartaccounts/types"; + +message SmartAccount { + repeated SessionKey session_keys = 1 [(gogoproto.nullable) = false]; +} + +message SessionKey { + bytes public_key = 1; + uint64 expires_at_height = 2; +} \ No newline at end of file diff --git a/x/bridge/types/action.pb.go b/x/bridge/types/action.pb.go index 046c2906..d3b29f1e 100644 --- a/x/bridge/types/action.pb.go +++ b/x/bridge/types/action.pb.go @@ -5,11 +5,10 @@ package types import ( fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/bridge/types/actions_root_snapshot.pb.go b/x/bridge/types/actions_root_snapshot.pb.go index 4d1e11e8..6b06b298 100644 --- a/x/bridge/types/actions_root_snapshot.pb.go +++ b/x/bridge/types/actions_root_snapshot.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/bridge/types/bridge_state.pb.go b/x/bridge/types/bridge_state.pb.go index 0fec46da..74d7c353 100644 --- a/x/bridge/types/bridge_state.pb.go +++ b/x/bridge/types/bridge_state.pb.go @@ -5,11 +5,10 @@ package types import ( fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/bridge/types/genesis.pb.go b/x/bridge/types/genesis.pb.go index 1c6c2255..f0e6c608 100644 --- a/x/bridge/types/genesis.pb.go +++ b/x/bridge/types/genesis.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/bridge/types/module.pb.go b/x/bridge/types/module.pb.go index 2940c12e..447cd299 100644 --- a/x/bridge/types/module.pb.go +++ b/x/bridge/types/module.pb.go @@ -4,13 +4,12 @@ package types import ( + _ "cosmossdk.io/api/cosmos/app/v1alpha1" fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "cosmossdk.io/api/cosmos/app/v1alpha1" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/bridge/types/params.pb.go b/x/bridge/types/params.pb.go index 2c0bd426..64a3b319 100644 --- a/x/bridge/types/params.pb.go +++ b/x/bridge/types/params.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/bridge/types/query.pb.go b/x/bridge/types/query.pb.go index 7aedd835..17545560 100644 --- a/x/bridge/types/query.pb.go +++ b/x/bridge/types/query.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" @@ -19,6 +15,9 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/bridge/types/tx.pb.go b/x/bridge/types/tx.pb.go index da0d158c..18fb51d4 100644 --- a/x/bridge/types/tx.pb.go +++ b/x/bridge/types/tx.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -19,6 +15,9 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/actor_type.pb.go b/x/keyregistry/types/actor_type.pb.go index fd395b0e..cf47d15f 100644 --- a/x/keyregistry/types/actor_type.pb.go +++ b/x/keyregistry/types/actor_type.pb.go @@ -5,9 +5,8 @@ package types import ( fmt "fmt" - math "math" - proto "github.com/cosmos/gogoproto/proto" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/genesis.pb.go b/x/keyregistry/types/genesis.pb.go index 892df56a..38980463 100644 --- a/x/keyregistry/types/genesis.pb.go +++ b/x/keyregistry/types/genesis.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/key_signing_operation.pb.go b/x/keyregistry/types/key_signing_operation.pb.go index 7f41e613..514130c4 100644 --- a/x/keyregistry/types/key_signing_operation.pb.go +++ b/x/keyregistry/types/key_signing_operation.pb.go @@ -5,9 +5,8 @@ package types import ( fmt "fmt" - math "math" - proto "github.com/cosmos/gogoproto/proto" + math "math" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/module.pb.go b/x/keyregistry/types/module.pb.go index 6c939884..c42802f0 100644 --- a/x/keyregistry/types/module.pb.go +++ b/x/keyregistry/types/module.pb.go @@ -4,13 +4,12 @@ package types import ( + _ "cosmossdk.io/api/cosmos/app/v1alpha1" fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "cosmossdk.io/api/cosmos/app/v1alpha1" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/params.pb.go b/x/keyregistry/types/params.pb.go index 083d03b5..378f92bb 100644 --- a/x/keyregistry/types/params.pb.go +++ b/x/keyregistry/types/params.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/public_key_pair.pb.go b/x/keyregistry/types/public_key_pair.pb.go index bddbc23f..63b44139 100644 --- a/x/keyregistry/types/public_key_pair.pb.go +++ b/x/keyregistry/types/public_key_pair.pb.go @@ -5,11 +5,10 @@ package types import ( fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/query.pb.go b/x/keyregistry/types/query.pb.go index 37346d1c..288ae05b 100644 --- a/x/keyregistry/types/query.pb.go +++ b/x/keyregistry/types/query.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" @@ -20,6 +16,9 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/registered_validator_set_entry.pb.go b/x/keyregistry/types/registered_validator_set_entry.pb.go index d3c3b3bc..90d01a7e 100644 --- a/x/keyregistry/types/registered_validator_set_entry.pb.go +++ b/x/keyregistry/types/registered_validator_set_entry.pb.go @@ -5,11 +5,10 @@ package types import ( fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/keyregistry/types/tx.pb.go b/x/keyregistry/types/tx.pb.go index dd9b1108..0cb535ad 100644 --- a/x/keyregistry/types/tx.pb.go +++ b/x/keyregistry/types/tx.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -19,6 +15,9 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/smartaccounts/types/genesis.pb.go b/x/smartaccounts/types/genesis.pb.go index bcfd4846..34b1c0ae 100644 --- a/x/smartaccounts/types/genesis.pb.go +++ b/x/smartaccounts/types/genesis.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/smartaccounts/types/module.pb.go b/x/smartaccounts/types/module.pb.go index 137c2cc6..2ebc07f9 100644 --- a/x/smartaccounts/types/module.pb.go +++ b/x/smartaccounts/types/module.pb.go @@ -4,13 +4,12 @@ package types import ( + _ "cosmossdk.io/api/cosmos/app/v1alpha1" fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "cosmossdk.io/api/cosmos/app/v1alpha1" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/smartaccounts/types/params.pb.go b/x/smartaccounts/types/params.pb.go index 2861f4f5..9f477a97 100644 --- a/x/smartaccounts/types/params.pb.go +++ b/x/smartaccounts/types/params.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/smartaccounts/types/query.pb.go b/x/smartaccounts/types/query.pb.go index 45ec9c33..408ce051 100644 --- a/x/smartaccounts/types/query.pb.go +++ b/x/smartaccounts/types/query.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" @@ -19,6 +15,9 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -125,29 +124,29 @@ func init() { } var fileDescriptor_a3b4a6c0fe689fae = []byte{ - // 338 bytes of a gzipped FileDescriptorProto + // 337 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0x31, 0x4b, 0xc3, 0x40, - 0x14, 0xc7, 0x73, 0x82, 0x05, 0xe3, 0x64, 0xec, 0x20, 0xa5, 0x44, 0x29, 0x0e, 0xb5, 0xd0, 0x5c, - 0xaf, 0x2e, 0x9d, 0xbb, 0xb8, 0x6a, 0x47, 0x07, 0xe1, 0x25, 0x1e, 0xe9, 0x41, 0x73, 0xef, 0x9a, - 0xbb, 0x14, 0xbb, 0xfa, 0x09, 0x04, 0x3f, 0x84, 0x8e, 0xfa, 0x2d, 0x3a, 0x16, 0x5c, 0x9c, 0x44, - 0x1a, 0xc1, 0xaf, 0x21, 0xcd, 0x65, 0xb0, 0x8a, 0x01, 0x97, 0xe3, 0xf1, 0xbf, 0xff, 0xff, 0xf7, - 0xde, 0xbb, 0x73, 0xdb, 0x2a, 0x9b, 0x68, 0x48, 0xa3, 0x31, 0x08, 0x49, 0x75, 0x02, 0xa9, 0x81, - 0x28, 0xc2, 0x4c, 0x1a, 0x4d, 0x67, 0x8c, 0x4e, 0x33, 0x9e, 0xce, 0x03, 0x95, 0xa2, 0x41, 0xaf, - 0xf9, 0xcd, 0x19, 0x6c, 0x38, 0x83, 0x19, 0x6b, 0xec, 0x41, 0x22, 0x24, 0xd2, 0xe2, 0xb4, 0x81, - 0x46, 0x3d, 0xc6, 0x18, 0x8b, 0x92, 0xae, 0xab, 0x52, 0x6d, 0xc6, 0x88, 0xf1, 0x84, 0x53, 0x50, - 0x82, 0x82, 0x94, 0x68, 0xc0, 0x08, 0x94, 0xba, 0xbc, 0xed, 0x44, 0xa8, 0x13, 0xd4, 0x34, 0x04, - 0xcd, 0x6d, 0x77, 0x3a, 0x63, 0x21, 0x37, 0xc0, 0xa8, 0x82, 0x58, 0xc8, 0xc2, 0x5c, 0x7a, 0x4f, - 0x2a, 0x47, 0x57, 0x90, 0x42, 0x52, 0x62, 0x5b, 0x75, 0xd7, 0xbb, 0x58, 0xc3, 0xce, 0x0b, 0x71, - 0xc4, 0xa7, 0x19, 0xd7, 0xa6, 0x75, 0xe5, 0xee, 0x6f, 0xa8, 0x5a, 0xa1, 0xd4, 0xdc, 0x3b, 0x73, - 0x6b, 0x36, 0x7c, 0x40, 0x8e, 0x48, 0x7b, 0xb7, 0x7f, 0x1c, 0x54, 0x6d, 0x1e, 0xd8, 0xf4, 0x70, - 0x67, 0xf1, 0x76, 0xe8, 0x3c, 0x7e, 0x3e, 0x75, 0xc8, 0xa8, 0x8c, 0xf7, 0x9f, 0x89, 0xbb, 0x5d, - 0x34, 0xf0, 0x1e, 0x88, 0x5b, 0xb3, 0x3e, 0xaf, 0x57, 0x4d, 0xfb, 0x3d, 0x66, 0x83, 0xfd, 0x23, - 0x61, 0x57, 0x68, 0x0d, 0x6e, 0x5f, 0x3e, 0xee, 0xb7, 0xfa, 0x5e, 0x8f, 0x4a, 0xbc, 0xe6, 0xac, - 0xc7, 0xba, 0x02, 0xa9, 0xa5, 0x74, 0x2b, 0xdf, 0x6b, 0x38, 0x5a, 0xac, 0x7c, 0xb2, 0x5c, 0xf9, - 0xe4, 0x7d, 0xe5, 0x93, 0xbb, 0xdc, 0x77, 0x96, 0xb9, 0xef, 0xbc, 0xe6, 0xbe, 0x73, 0x39, 0x88, - 0x85, 0x19, 0x67, 0x61, 0x10, 0x61, 0xf2, 0x27, 0xf5, 0xe6, 0x07, 0xd7, 0xcc, 0x15, 0xd7, 0x61, - 0xad, 0xf8, 0x84, 0xd3, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xce, 0x80, 0x66, 0x55, 0x6c, 0x02, - 0x00, 0x00, + 0x18, 0x86, 0x73, 0x82, 0x05, 0xe3, 0x64, 0xec, 0x20, 0xa5, 0x44, 0x29, 0x0e, 0xb5, 0xd0, 0x5c, + 0xaf, 0x2e, 0x9d, 0xbb, 0xb8, 0x6a, 0x47, 0x07, 0xe1, 0x4b, 0x3c, 0xd2, 0x83, 0xe6, 0xbe, 0x6b, + 0xee, 0x52, 0xec, 0xea, 0x2f, 0x10, 0xfc, 0x11, 0x3a, 0xea, 0xbf, 0xe8, 0x58, 0x70, 0x71, 0x12, + 0x69, 0x04, 0xff, 0x86, 0x34, 0x97, 0xc1, 0x2a, 0x06, 0x5c, 0xc2, 0xc7, 0x9b, 0xf7, 0x79, 0xef, + 0xfd, 0xee, 0xdc, 0xb6, 0xca, 0x26, 0x1a, 0xd2, 0x68, 0x0c, 0x42, 0x52, 0x9d, 0x40, 0x6a, 0x20, + 0x8a, 0x30, 0x93, 0x46, 0xd3, 0x19, 0xa3, 0xd3, 0x8c, 0xa7, 0xf3, 0x40, 0xa5, 0x68, 0xd0, 0x6b, + 0x7e, 0x73, 0x06, 0x1b, 0xce, 0x60, 0xc6, 0x1a, 0x7b, 0x90, 0x08, 0x89, 0xb4, 0xf8, 0x5a, 0xa0, + 0xd1, 0x89, 0x50, 0x27, 0xa8, 0x69, 0x08, 0x9a, 0xdb, 0x24, 0x3a, 0x63, 0x21, 0x37, 0xc0, 0xa8, + 0x82, 0x58, 0x48, 0x30, 0x02, 0x65, 0xe9, 0xad, 0xc7, 0x18, 0x63, 0x31, 0xd2, 0xf5, 0x54, 0xaa, + 0xcd, 0x18, 0x31, 0x9e, 0x70, 0x0a, 0x4a, 0x50, 0x90, 0x12, 0x4d, 0x81, 0xe8, 0xf2, 0xef, 0x49, + 0x65, 0x75, 0x05, 0x29, 0x24, 0xa5, 0xb5, 0x55, 0x77, 0xbd, 0x8b, 0x75, 0x81, 0xf3, 0x42, 0x1c, + 0xf1, 0x69, 0xc6, 0xb5, 0x69, 0x5d, 0xb9, 0xfb, 0x1b, 0xaa, 0x56, 0x28, 0x35, 0xf7, 0xce, 0xdc, + 0x9a, 0x85, 0x0f, 0xc8, 0x11, 0x69, 0xef, 0xf6, 0x8f, 0x83, 0xaa, 0xcd, 0x03, 0x4b, 0x0f, 0x77, + 0x16, 0x6f, 0x87, 0xce, 0xe3, 0xe7, 0x53, 0x87, 0x8c, 0x4a, 0xbc, 0xff, 0x4c, 0xdc, 0xed, 0xe2, + 0x00, 0xef, 0x81, 0xb8, 0x35, 0xeb, 0xf3, 0x7a, 0xd5, 0x69, 0xbf, 0x6b, 0x36, 0xd8, 0x3f, 0x08, + 0xbb, 0x42, 0x6b, 0x70, 0xfb, 0xf2, 0x71, 0xbf, 0xd5, 0xf7, 0x7a, 0x54, 0xe2, 0x35, 0x67, 0x3d, + 0xd6, 0x15, 0x48, 0x6d, 0x4a, 0xb7, 0xf2, 0xbe, 0x86, 0xa3, 0xc5, 0xca, 0x27, 0xcb, 0x95, 0x4f, + 0xde, 0x57, 0x3e, 0xb9, 0xcb, 0x7d, 0x67, 0x99, 0xfb, 0xce, 0x6b, 0xee, 0x3b, 0x97, 0x83, 0x58, + 0x98, 0x71, 0x16, 0x06, 0x11, 0x26, 0x7f, 0xa6, 0xde, 0xfc, 0xc8, 0x35, 0x73, 0xc5, 0x75, 0x58, + 0x2b, 0x1e, 0xe1, 0xf4, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x15, 0xc5, 0xa9, 0x68, 0x6c, 0x02, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/smartaccounts/types/tx.pb.go b/x/smartaccounts/types/tx.pb.go index 05f120e7..41b6e2f7 100644 --- a/x/smartaccounts/types/tx.pb.go +++ b/x/smartaccounts/types/tx.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -19,6 +15,9 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/smartaccounts/types/types.pb.go b/x/smartaccounts/types/types.pb.go new file mode 100644 index 00000000..f7948aae --- /dev/null +++ b/x/smartaccounts/types/types.pb.go @@ -0,0 +1,545 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: pulsarchain/smartaccounts/v1/types.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type SmartAccount struct { + SessionKeys []SessionKey `protobuf:"bytes,1,rep,name=session_keys,json=sessionKeys,proto3" json:"session_keys"` +} + +func (m *SmartAccount) Reset() { *m = SmartAccount{} } +func (m *SmartAccount) String() string { return proto.CompactTextString(m) } +func (*SmartAccount) ProtoMessage() {} +func (*SmartAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_5513da7f29cb5285, []int{0} +} +func (m *SmartAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SmartAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SmartAccount.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SmartAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_SmartAccount.Merge(m, src) +} +func (m *SmartAccount) XXX_Size() int { + return m.Size() +} +func (m *SmartAccount) XXX_DiscardUnknown() { + xxx_messageInfo_SmartAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_SmartAccount proto.InternalMessageInfo + +func (m *SmartAccount) GetSessionKeys() []SessionKey { + if m != nil { + return m.SessionKeys + } + return nil +} + +type SessionKey struct { + PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + ExpiresAtHeight uint64 `protobuf:"varint,2,opt,name=expires_at_height,json=expiresAtHeight,proto3" json:"expires_at_height,omitempty"` +} + +func (m *SessionKey) Reset() { *m = SessionKey{} } +func (m *SessionKey) String() string { return proto.CompactTextString(m) } +func (*SessionKey) ProtoMessage() {} +func (*SessionKey) Descriptor() ([]byte, []int) { + return fileDescriptor_5513da7f29cb5285, []int{1} +} +func (m *SessionKey) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SessionKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SessionKey.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SessionKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_SessionKey.Merge(m, src) +} +func (m *SessionKey) XXX_Size() int { + return m.Size() +} +func (m *SessionKey) XXX_DiscardUnknown() { + xxx_messageInfo_SessionKey.DiscardUnknown(m) +} + +var xxx_messageInfo_SessionKey proto.InternalMessageInfo + +func (m *SessionKey) GetPublicKey() []byte { + if m != nil { + return m.PublicKey + } + return nil +} + +func (m *SessionKey) GetExpiresAtHeight() uint64 { + if m != nil { + return m.ExpiresAtHeight + } + return 0 +} + +func init() { + proto.RegisterType((*SmartAccount)(nil), "pulsarchain.smartaccounts.v1.SmartAccount") + proto.RegisterType((*SessionKey)(nil), "pulsarchain.smartaccounts.v1.SessionKey") +} + +func init() { + proto.RegisterFile("pulsarchain/smartaccounts/v1/types.proto", fileDescriptor_5513da7f29cb5285) +} + +var fileDescriptor_5513da7f29cb5285 = []byte{ + // 290 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x28, 0x28, 0xcd, 0x29, + 0x4e, 0x2c, 0x4a, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x2f, 0xce, 0x4d, 0x2c, 0x2a, 0x49, 0x4c, 0x4e, + 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2b, + 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x41, 0x52, 0xa9, 0x87, 0xa2, 0x52, 0xaf, 0xcc, 0x50, 0x4a, + 0x30, 0x31, 0x37, 0x33, 0x2f, 0x5f, 0x1f, 0x4c, 0x42, 0x34, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, + 0x83, 0x99, 0xfa, 0x20, 0x16, 0x44, 0x54, 0x29, 0x91, 0x8b, 0x27, 0x18, 0xa4, 0xd9, 0x11, 0xa2, + 0x59, 0x28, 0x90, 0x8b, 0xa7, 0x38, 0xb5, 0xb8, 0x38, 0x33, 0x3f, 0x2f, 0x3e, 0x3b, 0xb5, 0xb2, + 0x58, 0x82, 0x51, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x43, 0x0f, 0x9f, 0x6d, 0x7a, 0xc1, 0x10, 0x1d, + 0xde, 0xa9, 0x95, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x71, 0x17, 0xc3, 0x45, 0x8a, 0x95, + 0xc2, 0xb9, 0xb8, 0x10, 0x0a, 0x84, 0x64, 0xb9, 0xb8, 0x0a, 0x4a, 0x93, 0x72, 0x32, 0x93, 0x41, + 0xe6, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x04, 0x71, 0x42, 0x44, 0x40, 0xd2, 0x5a, 0x5c, 0x82, + 0xa9, 0x15, 0x05, 0x99, 0x45, 0xa9, 0xc5, 0xf1, 0x89, 0x25, 0xf1, 0x19, 0xa9, 0x99, 0xe9, 0x19, + 0x25, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x2c, 0x41, 0xfc, 0x50, 0x09, 0xc7, 0x12, 0x0f, 0xb0, 0xb0, + 0x53, 0xd0, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, + 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x59, 0xa4, 0x67, 0x96, + 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xe7, 0xe5, 0xa7, 0xa4, 0x1a, 0x1a, 0x18, 0xea, + 0x66, 0xe6, 0xeb, 0x43, 0x3c, 0xa1, 0x0b, 0x09, 0xdd, 0x0a, 0xb4, 0xf0, 0x05, 0x07, 0x6e, 0x12, + 0x1b, 0x38, 0x58, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x2e, 0x1d, 0xb6, 0x5b, 0x89, 0x01, + 0x00, 0x00, +} + +func (m *SmartAccount) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SmartAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SmartAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SessionKeys) > 0 { + for iNdEx := len(m.SessionKeys) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SessionKeys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SessionKey) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SessionKey) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SessionKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ExpiresAtHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ExpiresAtHeight)) + i-- + dAtA[i] = 0x10 + } + if len(m.PublicKey) > 0 { + i -= len(m.PublicKey) + copy(dAtA[i:], m.PublicKey) + i = encodeVarintTypes(dAtA, i, uint64(len(m.PublicKey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *SmartAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SessionKeys) > 0 { + for _, e := range m.SessionKeys { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *SessionKey) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.PublicKey) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.ExpiresAtHeight != 0 { + n += 1 + sovTypes(uint64(m.ExpiresAtHeight)) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SmartAccount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SmartAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SmartAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionKeys", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SessionKeys = append(m.SessionKeys, SessionKey{}) + if err := m.SessionKeys[len(m.SessionKeys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SessionKey) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SessionKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SessionKey: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PublicKey = append(m.PublicKey[:0], dAtA[iNdEx:postIndex]...) + if m.PublicKey == nil { + m.PublicKey = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAtHeight", wireType) + } + m.ExpiresAtHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpiresAtHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/verification/sidecar/api/v1/verification_service.pb.go b/x/verification/sidecar/api/v1/verification_service.pb.go index cd63a6ac..0b70dc2a 100644 --- a/x/verification/sidecar/api/v1/verification_service.pb.go +++ b/x/verification/sidecar/api/v1/verification_service.pb.go @@ -6,15 +6,14 @@ package sidecarv1 import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/verification/types/genesis.pb.go b/x/verification/types/genesis.pb.go index e7d78f6f..f437c2d7 100644 --- a/x/verification/types/genesis.pb.go +++ b/x/verification/types/genesis.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/verification/types/module.pb.go b/x/verification/types/module.pb.go index c01414e7..205cdcd0 100644 --- a/x/verification/types/module.pb.go +++ b/x/verification/types/module.pb.go @@ -4,13 +4,12 @@ package types import ( + _ "cosmossdk.io/api/cosmos/app/v1alpha1" fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "cosmossdk.io/api/cosmos/app/v1alpha1" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/verification/types/params.pb.go b/x/verification/types/params.pb.go index d9a3ddee..bb06cd5d 100644 --- a/x/verification/types/params.pb.go +++ b/x/verification/types/params.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/verification/types/query.pb.go b/x/verification/types/query.pb.go index 0f37931f..f2546eb5 100644 --- a/x/verification/types/query.pb.go +++ b/x/verification/types/query.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -20,6 +16,9 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/verification/types/tx.pb.go b/x/verification/types/tx.pb.go index ef7771ce..69542a7b 100644 --- a/x/verification/types/tx.pb.go +++ b/x/verification/types/tx.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -19,6 +15,9 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/verification/types/types.pb.go b/x/verification/types/types.pb.go index 1a4a24a5..8b0f7721 100644 --- a/x/verification/types/types.pb.go +++ b/x/verification/types/types.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/verification/types/vote_extension.pb.go b/x/verification/types/vote_extension.pb.go index b273ff6d..fc3607e6 100644 --- a/x/verification/types/vote_extension.pb.go +++ b/x/verification/types/vote_extension.pb.go @@ -5,12 +5,11 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/votepersistence/types/genesis.pb.go b/x/votepersistence/types/genesis.pb.go index 9c48d742..e252c7ba 100644 --- a/x/votepersistence/types/genesis.pb.go +++ b/x/votepersistence/types/genesis.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/votepersistence/types/module.pb.go b/x/votepersistence/types/module.pb.go index 15faa0b1..319820ca 100644 --- a/x/votepersistence/types/module.pb.go +++ b/x/votepersistence/types/module.pb.go @@ -4,13 +4,12 @@ package types import ( + _ "cosmossdk.io/api/cosmos/app/v1alpha1" fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "cosmossdk.io/api/cosmos/app/v1alpha1" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/votepersistence/types/params.pb.go b/x/votepersistence/types/params.pb.go index db7a5855..3d572a3f 100644 --- a/x/votepersistence/types/params.pb.go +++ b/x/votepersistence/types/params.pb.go @@ -5,13 +5,12 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/votepersistence/types/query.pb.go b/x/votepersistence/types/query.pb.go index 4eb69233..75fd7684 100644 --- a/x/votepersistence/types/query.pb.go +++ b/x/votepersistence/types/query.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" @@ -19,6 +15,9 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/votepersistence/types/tx.pb.go b/x/votepersistence/types/tx.pb.go index c72264a0..31772b17 100644 --- a/x/votepersistence/types/tx.pb.go +++ b/x/votepersistence/types/tx.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" @@ -19,6 +15,9 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/votepersistence/types/vote_ext_body.pb.go b/x/votepersistence/types/vote_ext_body.pb.go index 3377e8e8..fed4b448 100644 --- a/x/votepersistence/types/vote_ext_body.pb.go +++ b/x/votepersistence/types/vote_ext_body.pb.go @@ -5,11 +5,10 @@ package types import ( fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. From 5747b023e810b8765052197a4f694cf2d6b1c7be Mon Sep 17 00:00:00 2001 From: Yusuf Date: Mon, 24 Aug 2026 17:21:24 +0300 Subject: [PATCH 03/51] feat(smartaccounts): introduce SmartAccounts map --- x/smartaccounts/keeper/keeper.go | 11 +++++++++++ x/smartaccounts/types/keys.go | 2 ++ 2 files changed, 13 insertions(+) diff --git a/x/smartaccounts/keeper/keeper.go b/x/smartaccounts/keeper/keeper.go index 5023dcfd..43d99ea8 100644 --- a/x/smartaccounts/keeper/keeper.go +++ b/x/smartaccounts/keeper/keeper.go @@ -11,6 +11,8 @@ import ( "github.com/node101-io/pulsar-chain/x/smartaccounts/types" ) +const SmartAccountsMapName = "smart_accounts_map" + type Keeper struct { storeService corestore.KVStoreService cdc codec.Codec @@ -19,6 +21,8 @@ type Keeper struct { // Typically, this should be the x/gov module account. authority []byte + SmartAccounts collections.Map[int64, types.SmartAccount] + Schema collections.Schema Params collections.Item[types.Params] } @@ -43,6 +47,13 @@ func NewKeeper( authority: authority, Params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[types.Params](cdc)), + + SmartAccounts: collections.NewMap( + sb, + types.ParamsKey, + SmartAccountsMapName, + collections.Int64Key, + codec.CollValue[types.SmartAccount](cdc)), } schema, err := sb.Build() diff --git a/x/smartaccounts/types/keys.go b/x/smartaccounts/types/keys.go index b7fb2ccf..a9274df4 100644 --- a/x/smartaccounts/types/keys.go +++ b/x/smartaccounts/types/keys.go @@ -17,3 +17,5 @@ const ( // ParamsKey is the prefix to retrieve all Params var ParamsKey = collections.NewPrefix("p_smartaccounts") + +var SmartAccountsKey = collections.NewPrefix("smart_accounts_key") From 519c9034e25bda0942791800ce4faf7cb9bc5d1e Mon Sep 17 00:00:00 2001 From: Yusuf Date: Mon, 24 Aug 2026 17:53:30 +0300 Subject: [PATCH 04/51] feat(smartaccounts): define AddPublicKey transaction --- docs/static/openapi.json | 2 +- proto/pulsarchain/smartaccounts/v1/tx.proto | 16 + .../pulsarchain/smartaccounts/v1/types.proto | 8 +- .../keeper/msg_server_add_public_key.go | 18 + x/smartaccounts/module/autocli.go | 6 + x/smartaccounts/types/codec.go | 4 + x/smartaccounts/types/tx.pb.go | 499 +++++++++++++++++- x/smartaccounts/types/types.pb.go | 223 +++++++- 8 files changed, 743 insertions(+), 33 deletions(-) create mode 100644 x/smartaccounts/keeper/msg_server_add_public_key.go diff --git a/docs/static/openapi.json b/docs/static/openapi.json index 5a7ea8c4..0a5a2ced 100644 --- a/docs/static/openapi.json +++ b/docs/static/openapi.json @@ -1 +1 @@ -{"id":"github.com/node101-io/pulsar-chain","consumes":["application/json"],"produces":["application/json"],"swagger":"2.0","info":{"description":"Chain github.com/node101-io/pulsar-chain REST API","title":"HTTP API Console","contact":{"name":"github.com/node101-io/pulsar-chain"},"version":"version not set"},"paths":{"/cosmos/auth/v1beta1/account_info/{address}":{"get":{"tags":["Query"],"summary":"AccountInfo queries account info which is common to all account types.","operationId":"NftQuery_AccountInfo","parameters":[{"type":"string","description":"address is the account address string.","name":"address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.QueryAccountInfoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/accounts":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"Accounts returns all the existing accounts.","operationId":"NftQuery_Accounts","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.QueryAccountsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/accounts/{address}":{"get":{"tags":["Query"],"summary":"Account returns account details based on address.","operationId":"NftQuery_Account","parameters":[{"type":"string","description":"address defines the address to query for.","name":"address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.QueryAccountResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/address_by_id/{id}":{"get":{"tags":["Query"],"summary":"AccountAddressByID returns account address based on account number.","operationId":"NftQuery_AccountAddressByID","parameters":[{"type":"string","format":"int64","description":"Deprecated, use account_id instead\n\nid is the account number of the address to be queried. This field\nshould have been an uint64 (like all account numbers), and will be\nupdated to uint64 in a future version of the auth query.","name":"id","in":"path","required":true},{"type":"string","format":"uint64","description":"account_id is the account number of the address to be queried.","name":"account_id","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/bech32":{"get":{"tags":["Query"],"summary":"Bech32Prefix queries bech32Prefix","operationId":"NftQuery_Bech32Prefix","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.Bech32PrefixResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/bech32/{address_bytes}":{"get":{"tags":["Query"],"summary":"AddressBytesToString converts Account Address bytes to string","operationId":"NftQuery_AddressBytesToString","parameters":[{"type":"string","format":"byte","name":"address_bytes","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.AddressBytesToStringResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/bech32/{address_string}":{"get":{"tags":["Query"],"summary":"AddressStringToBytes converts Address string to bytes","operationId":"NftQuery_AddressStringToBytes","parameters":[{"type":"string","name":"address_string","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.AddressStringToBytesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/module_accounts":{"get":{"tags":["Query"],"summary":"ModuleAccounts returns all the existing module accounts.","operationId":"NftQuery_ModuleAccounts","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.QueryModuleAccountsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/module_accounts/{name}":{"get":{"tags":["Query"],"summary":"ModuleAccountByName returns the module account info by module name","operationId":"NftQuery_ModuleAccountByName","parameters":[{"type":"string","name":"name","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/auth/v1beta1/params":{"get":{"tags":["Query"],"summary":"Params queries all parameters.","operationId":"NftQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.auth.v1beta1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/authz/v1beta1/grants":{"get":{"tags":["Query"],"summary":"Returns list of `Authorization`, granted to the grantee by the granter.","operationId":"NftQuery_Grants","parameters":[{"type":"string","name":"granter","in":"query"},{"type":"string","name":"grantee","in":"query"},{"type":"string","description":"Optional, msg_type_url, when set, will query only grants matching given msg type.","name":"msg_type_url","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.authz.v1beta1.QueryGrantsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/authz/v1beta1/grants/grantee/{grantee}":{"get":{"tags":["Query"],"summary":"GranteeGrants returns a list of `GrantAuthorization` by grantee.","operationId":"NftQuery_GranteeGrants","parameters":[{"type":"string","name":"grantee","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.authz.v1beta1.QueryGranteeGrantsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/authz/v1beta1/grants/granter/{granter}":{"get":{"tags":["Query"],"summary":"GranterGrants returns list of `GrantAuthorization`, granted by granter.","operationId":"NftQuery_GranterGrants","parameters":[{"type":"string","name":"granter","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.authz.v1beta1.QueryGranterGrantsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/balances/{address}":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"AllBalances queries the balance of all coins for a single account.","operationId":"NftQuery_AllBalances","parameters":[{"type":"string","description":"address is the address to query balances for.","name":"address","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"},{"type":"boolean","description":"resolve_denom is the flag to resolve the denom into a human-readable form from the metadata.","name":"resolve_denom","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryAllBalancesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/balances/{address}/by_denom":{"get":{"tags":["Query"],"summary":"Balance queries the balance of a single coin for a single account.","operationId":"NftQuery_Balance","parameters":[{"type":"string","description":"address is the address to query balances for.","name":"address","in":"path","required":true},{"type":"string","description":"denom is the coin denom to query balances for.","name":"denom","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryBalanceResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/denom_owners/{denom}":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"DenomOwners queries for all account addresses that own a particular token\ndenomination.","operationId":"NftQuery_DenomOwners","parameters":[{"pattern":".+","type":"string","description":"denom defines the coin denomination to query all account holders for.","name":"denom","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryDenomOwnersResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/denom_owners_by_query":{"get":{"tags":["Query"],"summary":"DenomOwnersByQuery queries for all account addresses that own a particular token\ndenomination.","operationId":"NftQuery_DenomOwnersByQuery","parameters":[{"type":"string","description":"denom defines the coin denomination to query all account holders for.","name":"denom","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/denoms_metadata":{"get":{"tags":["Query"],"summary":"DenomsMetadata queries the client metadata for all registered coin\ndenominations.","operationId":"NftQuery_DenomsMetadata","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryDenomsMetadataResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/denoms_metadata/{denom}":{"get":{"tags":["Query"],"summary":"DenomMetadata queries the client metadata of a given coin denomination.","operationId":"NftQuery_DenomMetadata","parameters":[{"pattern":".+","type":"string","description":"denom is the coin denom to query the metadata for.","name":"denom","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryDenomMetadataResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/denoms_metadata_by_query_string":{"get":{"tags":["Query"],"summary":"DenomMetadataByQueryString queries the client metadata of a given coin denomination.","operationId":"NftQuery_DenomMetadataByQueryString","parameters":[{"type":"string","description":"denom is the coin denom to query the metadata for.","name":"denom","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/params":{"get":{"tags":["Query"],"summary":"Params queries the parameters of x/bank module.","operationId":"NftQuery_ParamsMixin50","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/send_enabled":{"get":{"description":"This query only returns denominations that have specific SendEnabled settings.\nAny denomination that does not have a specific setting will use the default\nparams.default_send_enabled, and will not be returned by this query.","tags":["Query"],"summary":"SendEnabled queries for SendEnabled entries.","operationId":"NftQuery_SendEnabled","parameters":[{"type":"array","items":{"type":"string"},"collectionFormat":"multi","description":"denoms is the specific denoms you want look up. Leave empty to get all entries.","name":"denoms","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QuerySendEnabledResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/spendable_balances/{address}":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"SpendableBalances queries the spendable balance of all coins for a single\naccount.","operationId":"NftQuery_SpendableBalances","parameters":[{"type":"string","description":"address is the address to query spendable balances for.","name":"address","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QuerySpendableBalancesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/spendable_balances/{address}/by_denom":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"SpendableBalanceByDenom queries the spendable balance of a single denom for\na single account.","operationId":"NftQuery_SpendableBalanceByDenom","parameters":[{"type":"string","description":"address is the address to query balances for.","name":"address","in":"path","required":true},{"type":"string","description":"denom is the coin denom to query balances for.","name":"denom","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/supply":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"TotalSupply queries the total supply of all coins.","operationId":"NftQuery_TotalSupply","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QueryTotalSupplyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/bank/v1beta1/supply/by_denom":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"SupplyOf queries the supply of a single coin.","operationId":"NftQuery_SupplyOf","parameters":[{"type":"string","description":"denom is the coin denom to query balances for.","name":"denom","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.bank.v1beta1.QuerySupplyOfResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/node/v1beta1/config":{"get":{"tags":["Service"],"summary":"Config queries for the operator configuration.","operationId":"NftService_Config","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.node.v1beta1.ConfigResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/node/v1beta1/status":{"get":{"tags":["Service"],"summary":"Status queries for the node status.","operationId":"NftService_Status","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.node.v1beta1.StatusResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/reflection/v1beta1/app_descriptor/authn":{"get":{"tags":["ReflectionService"],"summary":"GetAuthnDescriptor returns information on how to authenticate transactions in the application\nNOTE: this RPC is still experimental and might be subject to breaking changes or removal in\nfuture releases of the cosmos-sdk.","operationId":"NftReflectionService_GetAuthnDescriptor","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/reflection/v1beta1/app_descriptor/chain":{"get":{"tags":["ReflectionService"],"summary":"GetChainDescriptor returns the description of the chain","operationId":"NftReflectionService_GetChainDescriptor","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/reflection/v1beta1/app_descriptor/codec":{"get":{"tags":["ReflectionService"],"summary":"GetCodecDescriptor returns the descriptor of the codec of the application","operationId":"NftReflectionService_GetCodecDescriptor","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/reflection/v1beta1/app_descriptor/configuration":{"get":{"tags":["ReflectionService"],"summary":"GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application","operationId":"NftReflectionService_GetConfigurationDescriptor","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/reflection/v1beta1/app_descriptor/query_services":{"get":{"tags":["ReflectionService"],"summary":"GetQueryServicesDescriptor returns the available gRPC queryable services of the application","operationId":"NftReflectionService_GetQueryServicesDescriptor","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/reflection/v1beta1/app_descriptor/tx_descriptor":{"get":{"tags":["ReflectionService"],"summary":"GetTxDescriptor returns information on the used transaction object and available msgs that can be used","operationId":"NftReflectionService_GetTxDescriptor","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/reflection/v1beta1/interfaces":{"get":{"tags":["ReflectionService"],"summary":"ListAllInterfaces lists all the interfaces registered in the interface\nregistry.","operationId":"NftReflectionService_ListAllInterfaces","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.reflection.v1beta1.ListAllInterfacesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/reflection/v1beta1/interfaces/{interface_name}/implementations":{"get":{"tags":["ReflectionService"],"summary":"ListImplementations list all the concrete types that implement a given\ninterface.","operationId":"NftReflectionService_ListImplementations","parameters":[{"type":"string","description":"interface_name defines the interface to query the implementations for.","name":"interface_name","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.reflection.v1beta1.ListImplementationsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/tendermint/v1beta1/abci_query":{"get":{"tags":["Service"],"summary":"ABCIQuery defines a query handler that supports ABCI queries directly to the\napplication, bypassing Tendermint completely. The ABCI query must contain\na valid and supported path, including app, custom, p2p, and store.","operationId":"NftService_ABCIQuery","parameters":[{"type":"string","format":"byte","name":"data","in":"query"},{"type":"string","name":"path","in":"query"},{"type":"string","format":"int64","name":"height","in":"query"},{"type":"boolean","name":"prove","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.ABCIQueryResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/tendermint/v1beta1/blocks/latest":{"get":{"tags":["Service"],"summary":"GetLatestBlock returns the latest block.","operationId":"NftService_GetLatestBlock","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.GetLatestBlockResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/tendermint/v1beta1/blocks/{height}":{"get":{"tags":["Service"],"summary":"GetBlockByHeight queries block for given height.","operationId":"NftService_GetBlockByHeight","parameters":[{"type":"string","format":"int64","name":"height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/tendermint/v1beta1/node_info":{"get":{"tags":["Service"],"summary":"GetNodeInfo queries the current node info.","operationId":"NftService_GetNodeInfo","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.GetNodeInfoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/tendermint/v1beta1/syncing":{"get":{"tags":["Service"],"summary":"GetSyncing queries node syncing.","operationId":"NftService_GetSyncing","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.GetSyncingResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/tendermint/v1beta1/validatorsets/latest":{"get":{"tags":["Service"],"summary":"GetLatestValidatorSet queries latest validator-set.","operationId":"NftService_GetLatestValidatorSet","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/base/tendermint/v1beta1/validatorsets/{height}":{"get":{"tags":["Service"],"summary":"GetValidatorSetByHeight queries validator-set at a given height.","operationId":"NftService_GetValidatorSetByHeight","parameters":[{"type":"string","format":"int64","name":"height","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/circuit/v1/accounts":{"get":{"tags":["Query"],"summary":"Account returns account permissions.","operationId":"NftQuery_AccountsMixin62","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.circuit.v1.AccountsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/circuit/v1/accounts/{address}":{"get":{"tags":["Query"],"summary":"Account returns account permissions.","operationId":"NftQuery_AccountMixin62","parameters":[{"type":"string","name":"address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.circuit.v1.AccountResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/circuit/v1/disable_list":{"get":{"tags":["Query"],"summary":"DisabledList returns a list of disabled message urls","operationId":"NftQuery_DisabledList","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.circuit.v1.DisabledListResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/consensus/v1/params":{"get":{"tags":["Query"],"summary":"Params queries the parameters of x/consensus module.","operationId":"NftQuery_ParamsMixin65","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.consensus.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/community_pool":{"get":{"description":"WARNING: This query will fail if an external community pool is used.","tags":["Query"],"summary":"CommunityPool queries the community pool coins.","operationId":"NftQuery_CommunityPool","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryCommunityPoolResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards":{"get":{"tags":["Query"],"summary":"DelegationTotalRewards queries the total rewards accrued by each\nvalidator.","operationId":"NftQuery_DelegationTotalRewards","parameters":[{"type":"string","description":"delegator_address defines the delegator address to query for.","name":"delegator_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}":{"get":{"tags":["Query"],"summary":"DelegationRewards queries the total rewards accrued by a delegation.","operationId":"NftQuery_DelegationRewards","parameters":[{"type":"string","description":"delegator_address defines the delegator address to query for.","name":"delegator_address","in":"path","required":true},{"type":"string","description":"validator_address defines the validator address to query for.","name":"validator_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryDelegationRewardsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators":{"get":{"tags":["Query"],"summary":"DelegatorValidators queries the validators of a delegator.","operationId":"NftQuery_DelegatorValidators","parameters":[{"type":"string","description":"delegator_address defines the delegator address to query for.","name":"delegator_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address":{"get":{"tags":["Query"],"summary":"DelegatorWithdrawAddress queries withdraw address of a delegator.","operationId":"NftQuery_DelegatorWithdrawAddress","parameters":[{"type":"string","description":"delegator_address defines the delegator address to query for.","name":"delegator_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/params":{"get":{"tags":["Query"],"summary":"Params queries params of the distribution module.","operationId":"NftQuery_ParamsMixin80","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/validators/{validator_address}":{"get":{"tags":["Query"],"summary":"ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator","operationId":"NftQuery_ValidatorDistributionInfo","parameters":[{"type":"string","description":"validator_address defines the validator address to query for.","name":"validator_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/validators/{validator_address}/commission":{"get":{"tags":["Query"],"summary":"ValidatorCommission queries accumulated commission for a validator.","operationId":"NftQuery_ValidatorCommission","parameters":[{"type":"string","description":"validator_address defines the validator address to query for.","name":"validator_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryValidatorCommissionResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards":{"get":{"tags":["Query"],"summary":"ValidatorOutstandingRewards queries rewards of a validator address.","operationId":"NftQuery_ValidatorOutstandingRewards","parameters":[{"type":"string","description":"validator_address defines the validator address to query for.","name":"validator_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/distribution/v1beta1/validators/{validator_address}/slashes":{"get":{"tags":["Query"],"summary":"ValidatorSlashes queries slash events of a validator.","operationId":"NftQuery_ValidatorSlashes","parameters":[{"type":"string","description":"validator_address defines the validator address to query for.","name":"validator_address","in":"path","required":true},{"type":"string","format":"uint64","description":"starting_height defines the optional starting height to query the slashes.","name":"starting_height","in":"query"},{"type":"string","format":"uint64","description":"starting_height defines the optional ending height to query the slashes.","name":"ending_height","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.distribution.v1beta1.QueryValidatorSlashesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/epochs/v1beta1/current_epoch":{"get":{"tags":["Query"],"summary":"CurrentEpoch provide current epoch of specified identifier","operationId":"NftQuery_CurrentEpoch","parameters":[{"type":"string","name":"identifier","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.epochs.v1beta1.QueryCurrentEpochResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/epochs/v1beta1/epochs":{"get":{"tags":["Query"],"summary":"EpochInfos provide running epochInfos","operationId":"NftQuery_EpochInfos","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.epochs.v1beta1.QueryEpochInfosResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/evidence/v1beta1/evidence":{"get":{"tags":["Query"],"summary":"AllEvidence queries all evidence.","operationId":"NftQuery_AllEvidence","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.evidence.v1beta1.QueryAllEvidenceResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/evidence/v1beta1/evidence/{hash}":{"get":{"tags":["Query"],"summary":"Evidence queries evidence based on evidence hash.","operationId":"NftQuery_Evidence","parameters":[{"type":"string","description":"hash defines the evidence hash of the requested evidence.","name":"hash","in":"path","required":true},{"type":"string","format":"byte","description":"evidence_hash defines the hash of the requested evidence.\nDeprecated: Use hash, a HEX encoded string, instead.","name":"evidence_hash","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.evidence.v1beta1.QueryEvidenceResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}":{"get":{"tags":["Query"],"summary":"Allowance returns granted allwance to the grantee by the granter.","operationId":"NftQuery_Allowance","parameters":[{"type":"string","description":"granter is the address of the user granting an allowance of their funds.","name":"granter","in":"path","required":true},{"type":"string","description":"grantee is the address of the user being granted an allowance of another user's funds.","name":"grantee","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.feegrant.v1beta1.QueryAllowanceResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/feegrant/v1beta1/allowances/{grantee}":{"get":{"tags":["Query"],"summary":"Allowances returns all the grants for the given grantee address.","operationId":"NftQuery_Allowances","parameters":[{"type":"string","name":"grantee","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.feegrant.v1beta1.QueryAllowancesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/feegrant/v1beta1/issued/{granter}":{"get":{"tags":["Query"],"summary":"AllowancesByGranter returns all the grants given by an address","operationId":"NftQuery_AllowancesByGranter","parameters":[{"type":"string","name":"granter","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/constitution":{"get":{"tags":["Query"],"summary":"Constitution queries the chain's constitution.","operationId":"NftQuery_Constitution","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryConstitutionResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/params/{params_type}":{"get":{"tags":["Query"],"summary":"Params queries all parameters of the gov module.","operationId":"NftQuery_ParamsMixin96","parameters":[{"type":"string","description":"params_type defines which parameters to query for, can be one of \"voting\",\n\"tallying\" or \"deposit\".","name":"params_type","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/proposals":{"get":{"tags":["Query"],"summary":"Proposals queries all proposals based on given status.","operationId":"NftQuery_Proposals","parameters":[{"enum":["PROPOSAL_STATUS_UNSPECIFIED","PROPOSAL_STATUS_DEPOSIT_PERIOD","PROPOSAL_STATUS_VOTING_PERIOD","PROPOSAL_STATUS_PASSED","PROPOSAL_STATUS_REJECTED","PROPOSAL_STATUS_FAILED"],"type":"string","default":"PROPOSAL_STATUS_UNSPECIFIED","description":"proposal_status defines the status of the proposals.\n\n - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status.\n - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit\nperiod.\n - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting\nperiod.\n - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has\npassed.\n - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has\nbeen rejected.\n - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has\nfailed.","name":"proposal_status","in":"query"},{"type":"string","description":"voter defines the voter address for the proposals.","name":"voter","in":"query"},{"type":"string","description":"depositor defines the deposit addresses from the proposals.","name":"depositor","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryProposalsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/proposals/{proposal_id}":{"get":{"tags":["Query"],"summary":"Proposal queries proposal details based on ProposalID.","operationId":"NftQuery_Proposal","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryProposalResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/proposals/{proposal_id}/deposits":{"get":{"tags":["Query"],"summary":"Deposits queries all deposits of a single proposal.","operationId":"NftQuery_Deposits","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryDepositsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/proposals/{proposal_id}/deposits/{depositor}":{"get":{"tags":["Query"],"summary":"Deposit queries single deposit information based on proposalID, depositAddr.","operationId":"NftQuery_Deposit","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true},{"type":"string","description":"depositor defines the deposit addresses from the proposals.","name":"depositor","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryDepositResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/proposals/{proposal_id}/tally":{"get":{"tags":["Query"],"summary":"TallyResult queries the tally of a proposal vote.","operationId":"NftQuery_TallyResult","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryTallyResultResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/proposals/{proposal_id}/votes":{"get":{"tags":["Query"],"summary":"Votes queries votes of a given proposal.","operationId":"NftQuery_Votes","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryVotesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1/proposals/{proposal_id}/votes/{voter}":{"get":{"tags":["Query"],"summary":"Vote queries voted information based on proposalID, voterAddr.","operationId":"NftQuery_Vote","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true},{"type":"string","description":"voter defines the voter address for the proposals.","name":"voter","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1.QueryVoteResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1beta1/params/{params_type}":{"get":{"tags":["Query"],"summary":"Params queries all parameters of the gov module.","operationId":"NftQuery_ParamsMixin100","parameters":[{"type":"string","description":"params_type defines which parameters to query for, can be one of \"voting\",\n\"tallying\" or \"deposit\".","name":"params_type","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1beta1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1beta1/proposals":{"get":{"tags":["Query"],"summary":"Proposals queries all proposals based on given status.","operationId":"NftQuery_ProposalsMixin100","parameters":[{"enum":["PROPOSAL_STATUS_UNSPECIFIED","PROPOSAL_STATUS_DEPOSIT_PERIOD","PROPOSAL_STATUS_VOTING_PERIOD","PROPOSAL_STATUS_PASSED","PROPOSAL_STATUS_REJECTED","PROPOSAL_STATUS_FAILED"],"type":"string","default":"PROPOSAL_STATUS_UNSPECIFIED","description":"proposal_status defines the status of the proposals.\n\n - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status.\n - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit\nperiod.\n - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting\nperiod.\n - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has\npassed.\n - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has\nbeen rejected.\n - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has\nfailed.","name":"proposal_status","in":"query"},{"type":"string","description":"voter defines the voter address for the proposals.","name":"voter","in":"query"},{"type":"string","description":"depositor defines the deposit addresses from the proposals.","name":"depositor","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1beta1.QueryProposalsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1beta1/proposals/{proposal_id}":{"get":{"tags":["Query"],"summary":"Proposal queries proposal details based on ProposalID.","operationId":"NftQuery_ProposalMixin100","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1beta1.QueryProposalResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits":{"get":{"tags":["Query"],"summary":"Deposits queries all deposits of a single proposal.","operationId":"NftQuery_DepositsMixin100","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1beta1.QueryDepositsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}":{"get":{"tags":["Query"],"summary":"Deposit queries single deposit information based on proposalID, depositor address.","operationId":"NftQuery_DepositMixin100","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true},{"type":"string","description":"depositor defines the deposit addresses from the proposals.","name":"depositor","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1beta1.QueryDepositResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1beta1/proposals/{proposal_id}/tally":{"get":{"tags":["Query"],"summary":"TallyResult queries the tally of a proposal vote.","operationId":"NftQuery_TallyResultMixin100","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1beta1.QueryTallyResultResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1beta1/proposals/{proposal_id}/votes":{"get":{"tags":["Query"],"summary":"Votes queries votes of a given proposal.","operationId":"NftQuery_VotesMixin100","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1beta1.QueryVotesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}":{"get":{"tags":["Query"],"summary":"Vote queries voted information based on proposalID, voterAddr.","operationId":"NftQuery_VoteMixin100","parameters":[{"type":"string","format":"uint64","description":"proposal_id defines the unique id of the proposal.","name":"proposal_id","in":"path","required":true},{"type":"string","description":"voter defines the voter address for the proposals.","name":"voter","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.gov.v1beta1.QueryVoteResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/group_info/{group_id}":{"get":{"tags":["Query"],"summary":"GroupInfo queries group info based on group id.","operationId":"NftQuery_GroupInfo","parameters":[{"type":"string","format":"uint64","description":"group_id is the unique ID of the group.","name":"group_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryGroupInfoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/group_members/{group_id}":{"get":{"tags":["Query"],"summary":"GroupMembers queries members of a group by group id.","operationId":"NftQuery_GroupMembers","parameters":[{"type":"string","format":"uint64","description":"group_id is the unique ID of the group.","name":"group_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryGroupMembersResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/group_policies_by_admin/{admin}":{"get":{"tags":["Query"],"summary":"GroupPoliciesByAdmin queries group policies by admin address.","operationId":"NftQuery_GroupPoliciesByAdmin","parameters":[{"type":"string","description":"admin is the admin address of the group policy.","name":"admin","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryGroupPoliciesByAdminResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/group_policies_by_group/{group_id}":{"get":{"tags":["Query"],"summary":"GroupPoliciesByGroup queries group policies by group id.","operationId":"NftQuery_GroupPoliciesByGroup","parameters":[{"type":"string","format":"uint64","description":"group_id is the unique ID of the group policy's group.","name":"group_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryGroupPoliciesByGroupResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/group_policy_info/{address}":{"get":{"tags":["Query"],"summary":"GroupPolicyInfo queries group policy info based on account address of group policy.","operationId":"NftQuery_GroupPolicyInfo","parameters":[{"type":"string","description":"address is the account address of the group policy.","name":"address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryGroupPolicyInfoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/groups":{"get":{"tags":["Query"],"summary":"Groups queries all groups in state.","operationId":"NftQuery_Groups","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryGroupsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/groups_by_admin/{admin}":{"get":{"tags":["Query"],"summary":"GroupsByAdmin queries groups by admin address.","operationId":"NftQuery_GroupsByAdmin","parameters":[{"type":"string","description":"admin is the account address of a group's admin.","name":"admin","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryGroupsByAdminResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/groups_by_member/{address}":{"get":{"tags":["Query"],"summary":"GroupsByMember queries groups by member address.","operationId":"NftQuery_GroupsByMember","parameters":[{"type":"string","description":"address is the group member address.","name":"address","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryGroupsByMemberResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/proposal/{proposal_id}":{"get":{"tags":["Query"],"summary":"Proposal queries a proposal based on proposal id.","operationId":"NftQuery_ProposalMixin104","parameters":[{"type":"string","format":"uint64","description":"proposal_id is the unique ID of a proposal.","name":"proposal_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryProposalResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/proposals/{proposal_id}/tally":{"get":{"tags":["Query"],"summary":"TallyResult returns the tally result of a proposal. If the proposal is\nstill in voting period, then this query computes the current tally state,\nwhich might not be final. On the other hand, if the proposal is final,\nthen it simply returns the `final_tally_result` state stored in the\nproposal itself.","operationId":"NftQuery_TallyResultMixin104","parameters":[{"type":"string","format":"uint64","description":"proposal_id is the unique id of a proposal.","name":"proposal_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryTallyResultResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/proposals_by_group_policy/{address}":{"get":{"tags":["Query"],"summary":"ProposalsByGroupPolicy queries proposals based on account address of group policy.","operationId":"NftQuery_ProposalsByGroupPolicy","parameters":[{"type":"string","description":"address is the account address of the group policy related to proposals.","name":"address","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryProposalsByGroupPolicyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/vote_by_proposal_voter/{proposal_id}/{voter}":{"get":{"tags":["Query"],"summary":"VoteByProposalVoter queries a vote by proposal id and voter.","operationId":"NftQuery_VoteByProposalVoter","parameters":[{"type":"string","format":"uint64","description":"proposal_id is the unique ID of a proposal.","name":"proposal_id","in":"path","required":true},{"type":"string","description":"voter is a proposal voter account address.","name":"voter","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryVoteByProposalVoterResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/votes_by_proposal/{proposal_id}":{"get":{"tags":["Query"],"summary":"VotesByProposal queries a vote by proposal id.","operationId":"NftQuery_VotesByProposal","parameters":[{"type":"string","format":"uint64","description":"proposal_id is the unique ID of a proposal.","name":"proposal_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryVotesByProposalResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/group/v1/votes_by_voter/{voter}":{"get":{"tags":["Query"],"summary":"VotesByVoter queries a vote by voter.","operationId":"NftQuery_VotesByVoter","parameters":[{"type":"string","description":"voter is a proposal voter account address.","name":"voter","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.group.v1.QueryVotesByVoterResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/mint/v1beta1/annual_provisions":{"get":{"tags":["Query"],"summary":"AnnualProvisions current minting annual provisions value.","operationId":"NftQuery_AnnualProvisions","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.mint.v1beta1.QueryAnnualProvisionsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/mint/v1beta1/inflation":{"get":{"tags":["Query"],"summary":"Inflation returns the current minting inflation value.","operationId":"NftQuery_Inflation","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.mint.v1beta1.QueryInflationResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/mint/v1beta1/params":{"get":{"tags":["Query"],"summary":"Params returns the total set of minting parameters.","operationId":"NftQuery_ParamsMixin109","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.mint.v1beta1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/nft/v1beta1/balance/{owner}/{class_id}":{"get":{"tags":["Query"],"summary":"Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721","operationId":"NftQuery_BalanceMixin115","parameters":[{"type":"string","description":"owner is the owner address of the nft","name":"owner","in":"path","required":true},{"type":"string","description":"class_id associated with the nft","name":"class_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.nft.v1beta1.QueryBalanceResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/nft/v1beta1/classes":{"get":{"tags":["Query"],"summary":"Classes queries all NFT classes","operationId":"NftQuery_Classes","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.nft.v1beta1.QueryClassesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/nft/v1beta1/classes/{class_id}":{"get":{"tags":["Query"],"summary":"Class queries an NFT class based on its id","operationId":"NftQuery_Class","parameters":[{"type":"string","description":"class_id associated with the nft","name":"class_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.nft.v1beta1.QueryClassResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/nft/v1beta1/nfts":{"get":{"tags":["Query"],"summary":"NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in\nERC721Enumerable","operationId":"NftQuery_NFTs","parameters":[{"type":"string","description":"class_id associated with the nft","name":"class_id","in":"query"},{"type":"string","description":"owner is the owner address of the nft","name":"owner","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.nft.v1beta1.QueryNFTsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/nft/v1beta1/nfts/{class_id}/{id}":{"get":{"tags":["Query"],"summary":"NFT queries an NFT based on its class and id.","operationId":"NftQuery_NFT","parameters":[{"type":"string","description":"class_id associated with the nft","name":"class_id","in":"path","required":true},{"type":"string","description":"id is a unique identifier of the NFT","name":"id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.nft.v1beta1.QueryNFTResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/nft/v1beta1/owner/{class_id}/{id}":{"get":{"tags":["Query"],"summary":"Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721","operationId":"NftQuery_Owner","parameters":[{"type":"string","description":"class_id associated with the nft","name":"class_id","in":"path","required":true},{"type":"string","description":"id is a unique identifier of the NFT","name":"id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.nft.v1beta1.QueryOwnerResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/nft/v1beta1/supply/{class_id}":{"get":{"tags":["Query"],"summary":"Supply queries the number of NFTs from the given class, same as totalSupply of ERC721.","operationId":"NftQuery_Supply","parameters":[{"type":"string","description":"class_id associated with the nft","name":"class_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.nft.v1beta1.QuerySupplyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/params/v1beta1/params":{"get":{"tags":["Query"],"summary":"Params queries a specific parameter of a module, given its subspace and\nkey.","operationId":"NftQuery_ParamsMixin118","parameters":[{"type":"string","description":"subspace defines the module to query the parameter for.","name":"subspace","in":"query"},{"type":"string","description":"key defines the key of the parameter in the subspace.","name":"key","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.params.v1beta1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/params/v1beta1/subspaces":{"get":{"tags":["Query"],"summary":"Subspaces queries for all registered subspaces and all keys for a subspace.","operationId":"NftQuery_Subspaces","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.params.v1beta1.QuerySubspacesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/protocolpool/v1/community_pool":{"get":{"tags":["Query"],"summary":"CommunityPool queries the community pool coins.","operationId":"NftQuery_CommunityPoolMixin120","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.protocolpool.v1.QueryCommunityPoolResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/protocolpool/v1/continuous_funds":{"get":{"tags":["Query"],"summary":"ContinuousFunds queries all continuous funds in the store.","operationId":"NftQuery_ContinuousFunds","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.protocolpool.v1.QueryContinuousFundsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/protocolpool/v1/continuous_funds/{recipient}":{"get":{"tags":["Query"],"summary":"ContinuousFund queries a continuous fund by the recipient is is associated with.","operationId":"NftQuery_ContinuousFund","parameters":[{"type":"string","description":"recipient is the recipient address to query unclaimed budget amount for.","name":"recipient","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.protocolpool.v1.QueryContinuousFundResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/protocolpool/v1/params":{"get":{"tags":["Query"],"summary":"Params returns the total set of x/protocolpool parameters.","operationId":"NftQuery_ParamsMixin120","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.protocolpool.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/slashing/v1beta1/params":{"get":{"tags":["Query"],"summary":"Params queries the parameters of slashing module","operationId":"NftQuery_ParamsMixin125","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.slashing.v1beta1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/slashing/v1beta1/signing_infos":{"get":{"tags":["Query"],"summary":"SigningInfos queries signing info of all validators","operationId":"NftQuery_SigningInfos","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.slashing.v1beta1.QuerySigningInfosResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/slashing/v1beta1/signing_infos/{cons_address}":{"get":{"tags":["Query"],"summary":"SigningInfo queries the signing info of given cons address","operationId":"NftQuery_SigningInfo","parameters":[{"type":"string","description":"cons_address is the address to query signing info of","name":"cons_address","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.slashing.v1beta1.QuerySigningInfoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/delegations/{delegator_addr}":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"DelegatorDelegations queries all delegations of a given delegator address.","operationId":"NftQuery_DelegatorDelegations","parameters":[{"type":"string","description":"delegator_addr defines the delegator address to query for.","name":"delegator_addr","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"Redelegations queries redelegations of given address.","operationId":"NftQuery_Redelegations","parameters":[{"type":"string","description":"delegator_addr defines the delegator address to query for.","name":"delegator_addr","in":"path","required":true},{"type":"string","description":"src_validator_addr defines the validator address to redelegate from.","name":"src_validator_addr","in":"query"},{"type":"string","description":"dst_validator_addr defines the validator address to redelegate to.","name":"dst_validator_addr","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryRedelegationsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"DelegatorUnbondingDelegations queries all unbonding delegations of a given\ndelegator address.","operationId":"NftQuery_DelegatorUnbondingDelegations","parameters":[{"type":"string","description":"delegator_addr defines the delegator address to query for.","name":"delegator_addr","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"DelegatorValidators queries all validators info for given delegator\naddress.","operationId":"NftQuery_DelegatorValidatorsMixin130","parameters":[{"type":"string","description":"delegator_addr defines the delegator address to query for.","name":"delegator_addr","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}":{"get":{"tags":["Query"],"summary":"DelegatorValidator queries validator info for given delegator validator\npair.","operationId":"NftQuery_DelegatorValidator","parameters":[{"type":"string","description":"delegator_addr defines the delegator address to query for.","name":"delegator_addr","in":"path","required":true},{"type":"string","description":"validator_addr defines the validator address to query for.","name":"validator_addr","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/historical_info/{height}":{"get":{"tags":["Query"],"summary":"HistoricalInfo queries the historical info for given height.","operationId":"NftQuery_HistoricalInfo","parameters":[{"type":"string","format":"int64","description":"height defines at which height to query the historical info.","name":"height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryHistoricalInfoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the staking parameters.","operationId":"NftQuery_ParamsMixin130","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/pool":{"get":{"tags":["Query"],"summary":"Pool queries the pool info.","operationId":"NftQuery_Pool","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryPoolResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/validators":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"Validators queries all validators that match the given status.","operationId":"NftQuery_Validators","parameters":[{"type":"string","description":"status enables to query for validators matching a given status.","name":"status","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryValidatorsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/validators/{validator_addr}":{"get":{"tags":["Query"],"summary":"Validator queries validator info for given validator address.","operationId":"NftQuery_Validator","parameters":[{"type":"string","description":"validator_addr defines the validator address to query for.","name":"validator_addr","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryValidatorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/validators/{validator_addr}/delegations":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"ValidatorDelegations queries delegate info for given validator.","operationId":"NftQuery_ValidatorDelegations","parameters":[{"type":"string","description":"validator_addr defines the validator address to query for.","name":"validator_addr","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}":{"get":{"tags":["Query"],"summary":"Delegation queries delegate info for given validator delegator pair.","operationId":"NftQuery_Delegation","parameters":[{"type":"string","description":"validator_addr defines the validator address to query for.","name":"validator_addr","in":"path","required":true},{"type":"string","description":"delegator_addr defines the delegator address to query for.","name":"delegator_addr","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryDelegationResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation":{"get":{"tags":["Query"],"summary":"UnbondingDelegation queries unbonding info for given validator delegator\npair.","operationId":"NftQuery_UnbondingDelegation","parameters":[{"type":"string","description":"validator_addr defines the validator address to query for.","name":"validator_addr","in":"path","required":true},{"type":"string","description":"delegator_addr defines the delegator address to query for.","name":"delegator_addr","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations":{"get":{"description":"When called from another module, this query might consume a high amount of\ngas if the pagination field is incorrectly set.","tags":["Query"],"summary":"ValidatorUnbondingDelegations queries unbonding delegations of a validator.","operationId":"NftQuery_ValidatorUnbondingDelegations","parameters":[{"type":"string","description":"validator_addr defines the validator address to query for.","name":"validator_addr","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/tx/v1beta1/decode":{"post":{"tags":["Service"],"summary":"TxDecode decodes the transaction.","operationId":"NftService_TxDecode","parameters":[{"description":"TxDecodeRequest is the request type for the Service.TxDecode\nRPC method.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.TxDecodeRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.TxDecodeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/tx/v1beta1/decode/amino":{"post":{"tags":["Service"],"summary":"TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON.","operationId":"NftService_TxDecodeAmino","parameters":[{"description":"TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino\nRPC method.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.TxDecodeAminoRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.TxDecodeAminoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/tx/v1beta1/encode":{"post":{"tags":["Service"],"summary":"TxEncode encodes the transaction.","operationId":"NftService_TxEncode","parameters":[{"description":"TxEncodeRequest is the request type for the Service.TxEncode\nRPC method.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.TxEncodeRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.TxEncodeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/tx/v1beta1/encode/amino":{"post":{"tags":["Service"],"summary":"TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes.","operationId":"NftService_TxEncodeAmino","parameters":[{"description":"TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino\nRPC method.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.TxEncodeAminoRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.TxEncodeAminoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/tx/v1beta1/simulate":{"post":{"tags":["Service"],"summary":"Simulate simulates executing a transaction for estimating gas usage.","operationId":"NftService_Simulate","parameters":[{"description":"SimulateRequest is the request type for the Service.Simulate\nRPC method.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.SimulateRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.SimulateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/tx/v1beta1/txs":{"get":{"tags":["Service"],"summary":"GetTxsEvent fetches txs by event.","operationId":"NftService_GetTxsEvent","parameters":[{"type":"array","items":{"type":"string"},"collectionFormat":"multi","description":"events is the list of transaction event type.\nDeprecated post v0.47.x: use query instead, which should contain a valid\nevents query.","name":"events","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"},{"enum":["ORDER_BY_UNSPECIFIED","ORDER_BY_ASC","ORDER_BY_DESC"],"type":"string","default":"ORDER_BY_UNSPECIFIED","description":" - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults\nto ASC in this case.\n - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order\n - ORDER_BY_DESC: ORDER_BY_DESC defines descending order","name":"order_by","in":"query"},{"type":"string","format":"uint64","description":"page is the page number to query, starts at 1. If not provided, will\ndefault to first page.","name":"page","in":"query"},{"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.","name":"limit","in":"query"},{"type":"string","description":"query defines the transaction event query that is proxied to Tendermint's\nTxSearch RPC method. The query must be valid.","name":"query","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.GetTxsEventResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}},"post":{"tags":["Service"],"summary":"BroadcastTx broadcast transaction.","operationId":"NftService_BroadcastTx","parameters":[{"description":"BroadcastTxRequest is the request type for the Service.BroadcastTxRequest\nRPC method.","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.BroadcastTxRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.BroadcastTxResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/tx/v1beta1/txs/block/{height}":{"get":{"tags":["Service"],"summary":"GetBlockWithTxs fetches a block with decoded txs.","operationId":"NftService_GetBlockWithTxs","parameters":[{"type":"string","format":"int64","description":"height is the height of the block to query.","name":"height","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.GetBlockWithTxsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/tx/v1beta1/txs/{hash}":{"get":{"tags":["Service"],"summary":"GetTx fetches a tx by hash.","operationId":"NftService_GetTx","parameters":[{"type":"string","description":"hash is the tx hash to query, encoded as a hex string.","name":"hash","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.tx.v1beta1.GetTxResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/upgrade/v1beta1/applied_plan/{name}":{"get":{"tags":["Query"],"summary":"AppliedPlan queries a previously applied upgrade plan by its name.","operationId":"NftQuery_AppliedPlan","parameters":[{"type":"string","description":"name is the name of the applied plan to query for.","name":"name","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.upgrade.v1beta1.QueryAppliedPlanResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/upgrade/v1beta1/authority":{"get":{"tags":["Query"],"summary":"Returns the account with authority to conduct upgrades","operationId":"NftQuery_Authority","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.upgrade.v1beta1.QueryAuthorityResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/upgrade/v1beta1/current_plan":{"get":{"tags":["Query"],"summary":"CurrentPlan queries the current upgrade plan.","operationId":"NftQuery_CurrentPlan","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.upgrade.v1beta1.QueryCurrentPlanResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/upgrade/v1beta1/module_versions":{"get":{"tags":["Query"],"summary":"ModuleVersions queries the list of module versions from state.","operationId":"NftQuery_ModuleVersions","parameters":[{"type":"string","description":"module_name is a field to query a specific module\nconsensus version from state. Leaving this empty will\nfetch the full list of module versions from state","name":"module_name","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.upgrade.v1beta1.QueryModuleVersionsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}":{"get":{"tags":["Query"],"summary":"UpgradedConsensusState queries the consensus state that will serve\nas a trusted kernel for the next version of this chain. It will only be\nstored at the last height of this chain.\nUpgradedConsensusState RPC not supported with legacy querier\nThis rpc is deprecated now that IBC has its own replacement\n(https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54)","operationId":"NftQuery_UpgradedConsensusState","parameters":[{"type":"string","format":"int64","description":"last height of the current chain must be sent in request\nas this is the height under which next consensus state is stored","name":"last_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/interchain_accounts/controller/v1/owners/{owner}/connections/{connection_id}":{"get":{"tags":["Query"],"summary":"InterchainAccount returns the interchain account address for a given owner address on a given connection","operationId":"ControllerQuery_InterchainAccount","parameters":[{"type":"string","name":"owner","in":"path","required":true},{"type":"string","name":"connection_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/interchain_accounts/controller/v1/params":{"get":{"tags":["Query"],"summary":"Params queries all parameters of the ICA controller submodule.","operationId":"ControllerQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/interchain_accounts/host/v1/params":{"get":{"tags":["Query"],"summary":"Params queries all parameters of the ICA host submodule.","operationId":"ControllerQuery_ParamsMixin161","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.interchain_accounts.host.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/transfer/v1/channels/{channel_id}/ports/{port_id}/escrow_address":{"get":{"tags":["Query"],"summary":"EscrowAddress returns the escrow address for a particular port and channel id.","operationId":"ControllerQuery_EscrowAddress","parameters":[{"type":"string","description":"unique channel identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"unique port identifier","name":"port_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.transfer.v1.QueryEscrowAddressResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/transfer/v1/denom_hashes/{trace}":{"get":{"tags":["Query"],"summary":"DenomHash queries a denomination hash information.","operationId":"ControllerQuery_DenomHash","parameters":[{"pattern":".+","type":"string","description":"The denomination trace ([port_id]/[channel_id])+/[denom]","name":"trace","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.transfer.v1.QueryDenomHashResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/transfer/v1/denoms":{"get":{"tags":["Query"],"summary":"Denoms queries all denominations","operationId":"ControllerQuery_Denoms","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.transfer.v1.QueryDenomsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/transfer/v1/denoms/{hash}":{"get":{"tags":["Query"],"summary":"Denom queries a denomination","operationId":"ControllerQuery_Denom","parameters":[{"pattern":".+","type":"string","description":"hash (in hex format) or denom (full denom with ibc prefix) of the on chain denomination.","name":"hash","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.transfer.v1.QueryDenomResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/transfer/v1/params":{"get":{"tags":["Query"],"summary":"Params queries all parameters of the ibc-transfer module.","operationId":"ControllerQuery_ParamsMixin170","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.transfer.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/apps/transfer/v1/total_escrow/{denom}":{"get":{"tags":["Query"],"summary":"TotalEscrowForDenom returns the total amount of tokens in escrow based on the denom.","operationId":"ControllerQuery_TotalEscrowForDenom","parameters":[{"pattern":".+","type":"string","name":"denom","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels":{"get":{"tags":["Query"],"summary":"Channels queries all the IBC channels of a chain.","operationId":"ControllerQuery_Channels","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryChannelsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}":{"get":{"tags":["Query"],"summary":"Channel queries an IBC Channel.","operationId":"ControllerQuery_Channel","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryChannelResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/client_state":{"get":{"tags":["Query"],"summary":"ChannelClientState queries for the client state for the channel associated\nwith the provided channel identifiers.","operationId":"ControllerQuery_ChannelClientState","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryChannelClientStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height}":{"get":{"tags":["Query"],"summary":"ChannelConsensusState queries for the consensus state for the channel\nassociated with the provided channel identifiers.","operationId":"ControllerQuery_ChannelConsensusState","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true},{"type":"string","format":"uint64","description":"revision number of the consensus state","name":"revision_number","in":"path","required":true},{"type":"string","format":"uint64","description":"revision height of the consensus state","name":"revision_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryChannelConsensusStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence":{"get":{"tags":["Query"],"summary":"NextSequenceReceive returns the next receive sequence for a given channel.","operationId":"ControllerQuery_NextSequenceReceive","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryNextSequenceReceiveResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence_send":{"get":{"tags":["Query"],"summary":"NextSequenceSend returns the next send sequence for a given channel.","operationId":"ControllerQuery_NextSequenceSend","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryNextSequenceSendResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements":{"get":{"tags":["Query"],"summary":"PacketAcknowledgements returns all the packet acknowledgements associated\nwith a channel.","operationId":"ControllerQuery_PacketAcknowledgements","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"},{"type":"array","items":{"type":"string","format":"uint64"},"collectionFormat":"multi","description":"list of packet sequences","name":"packet_commitment_sequences","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryPacketAcknowledgementsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}":{"get":{"tags":["Query"],"summary":"PacketAcknowledgement queries a stored packet acknowledgement hash.","operationId":"ControllerQuery_PacketAcknowledgement","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true},{"type":"string","format":"uint64","description":"packet sequence","name":"sequence","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryPacketAcknowledgementResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments":{"get":{"tags":["Query"],"summary":"PacketCommitments returns all the packet commitments hashes associated\nwith a channel.","operationId":"ControllerQuery_PacketCommitments","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryPacketCommitmentsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks":{"get":{"tags":["Query"],"summary":"UnreceivedAcks returns all the unreceived IBC acknowledgements associated\nwith a channel and sequences.","operationId":"ControllerQuery_UnreceivedAcks","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true},{"minItems":1,"type":"array","items":{"type":"string","format":"uint64"},"collectionFormat":"csv","description":"list of acknowledgement sequences","name":"packet_ack_sequences","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryUnreceivedAcksResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets":{"get":{"tags":["Query"],"summary":"UnreceivedPackets returns all the unreceived IBC packets associated with a\nchannel and sequences.","operationId":"ControllerQuery_UnreceivedPackets","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true},{"minItems":1,"type":"array","items":{"type":"string","format":"uint64"},"collectionFormat":"csv","description":"list of packet sequences","name":"packet_commitment_sequences","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryUnreceivedPacketsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}":{"get":{"tags":["Query"],"summary":"PacketCommitment queries a stored packet commitment hash.","operationId":"ControllerQuery_PacketCommitment","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true},{"type":"string","format":"uint64","description":"packet sequence","name":"sequence","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryPacketCommitmentResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}":{"get":{"tags":["Query"],"summary":"PacketReceipt queries if a given packet sequence has been received on the\nqueried chain","operationId":"ControllerQuery_PacketReceipt","parameters":[{"type":"string","description":"channel unique identifier","name":"channel_id","in":"path","required":true},{"type":"string","description":"port unique identifier","name":"port_id","in":"path","required":true},{"type":"string","format":"uint64","description":"packet sequence","name":"sequence","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryPacketReceiptResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v1/connections/{connection}/channels":{"get":{"tags":["Query"],"summary":"ConnectionChannels queries all the channels associated with a connection\nend.","operationId":"ControllerQuery_ConnectionChannels","parameters":[{"type":"string","description":"connection unique identifier","name":"connection","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v1.QueryConnectionChannelsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v2/clients/{client_id}/next_sequence_send":{"get":{"tags":["Query"],"summary":"NextSequenceSend returns the next send sequence for a given channel.","operationId":"ControllerQuery_NextSequenceSendMixin180","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v2.QueryNextSequenceSendResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v2/clients/{client_id}/packet_acknowledgements":{"get":{"tags":["Query"],"summary":"PacketAcknowledgements returns all packet acknowledgements associated with a channel.","operationId":"ControllerQuery_PacketAcknowledgementsMixin180","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"},{"type":"array","items":{"type":"string","format":"uint64"},"collectionFormat":"multi","description":"list of packet sequences","name":"packet_commitment_sequences","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v2.QueryPacketAcknowledgementsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v2/clients/{client_id}/packet_acks/{sequence}":{"get":{"tags":["Query"],"summary":"PacketAcknowledgement queries a stored acknowledgement commitment hash.","operationId":"ControllerQuery_PacketAcknowledgementMixin180","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true},{"type":"string","format":"uint64","description":"packet sequence","name":"sequence","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v2.QueryPacketAcknowledgementResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v2/clients/{client_id}/packet_commitments":{"get":{"tags":["Query"],"summary":"PacketCommitments queries a stored packet commitment hash.","operationId":"ControllerQuery_PacketCommitmentsMixin180","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v2.QueryPacketCommitmentsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v2/clients/{client_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks":{"get":{"tags":["Query"],"summary":"UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a channel and sequences.","operationId":"ControllerQuery_UnreceivedAcksMixin180","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true},{"minItems":1,"type":"array","items":{"type":"string","format":"uint64"},"collectionFormat":"csv","description":"list of acknowledgement sequences","name":"packet_ack_sequences","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v2.QueryUnreceivedAcksResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v2/clients/{client_id}/packet_commitments/{sequences}/unreceived_packets":{"get":{"tags":["Query"],"summary":"UnreceivedPackets returns all the unreceived IBC packets associated with a channel and sequences.","operationId":"ControllerQuery_UnreceivedPacketsMixin180","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true},{"minItems":1,"type":"array","items":{"type":"string","format":"uint64"},"collectionFormat":"csv","description":"list of packet sequences","name":"sequences","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v2.QueryUnreceivedPacketsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v2/clients/{client_id}/packet_commitments/{sequence}":{"get":{"tags":["Query"],"summary":"PacketCommitment queries a stored packet commitment hash.","operationId":"ControllerQuery_PacketCommitmentMixin180","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true},{"type":"string","format":"uint64","description":"packet sequence","name":"sequence","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v2.QueryPacketCommitmentResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/channel/v2/clients/{client_id}/packet_receipts/{sequence}":{"get":{"tags":["Query"],"summary":"PacketReceipt queries a stored packet receipt.","operationId":"ControllerQuery_PacketReceiptMixin180","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true},{"type":"string","format":"uint64","description":"packet sequence","name":"sequence","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.channel.v2.QueryPacketReceiptResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/client_creator/{client_id}":{"get":{"tags":["Query"],"summary":"ClientCreator queries the creator of a given client.","operationId":"ControllerQuery_ClientCreator","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryClientCreatorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/client_states":{"get":{"tags":["Query"],"summary":"ClientStates queries all the IBC light clients of a chain.","operationId":"ControllerQuery_ClientStates","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryClientStatesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/client_states/{client_id}":{"get":{"tags":["Query"],"summary":"ClientState queries an IBC light client.","operationId":"ControllerQuery_ClientState","parameters":[{"type":"string","description":"client state unique identifier","name":"client_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryClientStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/client_status/{client_id}":{"get":{"tags":["Query"],"summary":"Status queries the status of an IBC client.","operationId":"ControllerQuery_ClientStatus","parameters":[{"type":"string","description":"client unique identifier","name":"client_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryClientStatusResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/consensus_states/{client_id}":{"get":{"tags":["Query"],"summary":"ConsensusStates queries all the consensus state associated with a given\nclient.","operationId":"ControllerQuery_ConsensusStates","parameters":[{"type":"string","description":"client identifier","name":"client_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryConsensusStatesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/consensus_states/{client_id}/heights":{"get":{"tags":["Query"],"summary":"ConsensusStateHeights queries the height of every consensus states associated with a given client.","operationId":"ControllerQuery_ConsensusStateHeights","parameters":[{"type":"string","description":"client identifier","name":"client_id","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryConsensusStateHeightsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}":{"get":{"tags":["Query"],"summary":"ConsensusState queries a consensus state associated with a client state at\na given height.","operationId":"ControllerQuery_ConsensusState","parameters":[{"type":"string","description":"client identifier","name":"client_id","in":"path","required":true},{"type":"string","format":"uint64","description":"consensus state revision number","name":"revision_number","in":"path","required":true},{"type":"string","format":"uint64","description":"consensus state revision height","name":"revision_height","in":"path","required":true},{"type":"boolean","description":"latest_height overrides the height field and queries the latest stored\nConsensusState","name":"latest_height","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryConsensusStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/params":{"get":{"tags":["Query"],"summary":"ClientParams queries all parameters of the ibc client submodule.","operationId":"ControllerQuery_ClientParams","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryClientParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/upgraded_client_states":{"get":{"tags":["Query"],"summary":"UpgradedClientState queries an Upgraded IBC light client.","operationId":"ControllerQuery_UpgradedClientState","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryUpgradedClientStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/upgraded_consensus_states":{"get":{"tags":["Query"],"summary":"UpgradedConsensusState queries an Upgraded IBC consensus state.","operationId":"ControllerQuery_UpgradedConsensusState","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryUpgradedConsensusStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v1/verify_membership":{"post":{"tags":["Query"],"summary":"VerifyMembership queries an IBC light client for proof verification of a value at a given key path.","operationId":"ControllerQuery_VerifyMembership","parameters":[{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryVerifyMembershipRequest"}}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v1.QueryVerifyMembershipResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v2/config/{client_id}":{"get":{"tags":["Query"],"summary":"Config queries the IBC client v2 configuration for a given client.","operationId":"ControllerQuery_Config","parameters":[{"type":"string","description":"client state unique identifier","name":"client_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v2.QueryConfigResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/client/v2/counterparty_info/{client_id}":{"get":{"tags":["Query"],"summary":"CounterpartyInfo queries an IBC light counter party info.","operationId":"ControllerQuery_CounterpartyInfo","parameters":[{"type":"string","description":"client state unique identifier","name":"client_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.client.v2.QueryCounterpartyInfoResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/connection/v1/client_connections/{client_id}":{"get":{"tags":["Query"],"summary":"ClientConnections queries the connection paths associated with a client\nstate.","operationId":"ControllerQuery_ClientConnections","parameters":[{"type":"string","description":"client identifier associated with a connection","name":"client_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.connection.v1.QueryClientConnectionsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/connection/v1/connections":{"get":{"tags":["Query"],"summary":"Connections queries all the IBC connections of a chain.","operationId":"ControllerQuery_Connections","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.connection.v1.QueryConnectionsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/connection/v1/connections/{connection_id}":{"get":{"tags":["Query"],"summary":"Connection queries an IBC connection end.","operationId":"ControllerQuery_Connection","parameters":[{"type":"string","description":"connection unique identifier","name":"connection_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.connection.v1.QueryConnectionResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/connection/v1/connections/{connection_id}/client_state":{"get":{"tags":["Query"],"summary":"ConnectionClientState queries the client state associated with the\nconnection.","operationId":"ControllerQuery_ConnectionClientState","parameters":[{"type":"string","description":"connection identifier","name":"connection_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.connection.v1.QueryConnectionClientStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/connection/v1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height}":{"get":{"tags":["Query"],"summary":"ConnectionConsensusState queries the consensus state associated with the\nconnection.","operationId":"ControllerQuery_ConnectionConsensusState","parameters":[{"type":"string","description":"connection identifier","name":"connection_id","in":"path","required":true},{"type":"string","format":"uint64","name":"revision_number","in":"path","required":true},{"type":"string","format":"uint64","name":"revision_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.connection.v1.QueryConnectionConsensusStateResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/core/connection/v1/params":{"get":{"tags":["Query"],"summary":"ConnectionParams queries all parameters of the ibc connection submodule.","operationId":"ControllerQuery_ConnectionParams","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.core.connection.v1.QueryConnectionParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/lightclients/wasm/v1/checksums":{"get":{"tags":["Query"],"summary":"Get all Wasm checksums","operationId":"ControllerQuery_Checksums","parameters":[{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.\n\nSince: cosmos-sdk 0.43","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.lightclients.wasm.v1.QueryChecksumsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/ibc/lightclients/wasm/v1/checksums/{checksum}/code":{"get":{"tags":["Query"],"summary":"Get Wasm code for given checksum","operationId":"ControllerQuery_Code","parameters":[{"type":"string","description":"checksum is a hex encoded string of the code stored.","name":"checksum","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/ibc.lightclients.wasm.v1.QueryCodeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/abci/v1/validator_set_with_powers/{block_height}":{"get":{"tags":["Query"],"operationId":"GithubComnode101IopulsarChainQuery_GetValidatorSetWithPowers","parameters":[{"type":"string","format":"int64","name":"block_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.abci.QueryGetValidatorSetWithPowersResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/abci/v1/vote_ext_body_by_height/{vote_extension_height}":{"get":{"tags":["Query"],"summary":"VoteExtBodyByHeight queries the vote extension body for a vote-extension\nconsensus height.","operationId":"GithubComnode101IopulsarChainQuery_VoteExtBodyByHeight","parameters":[{"type":"string","format":"int64","description":"vote_extension_height is the consensus height N where the vote extension is\nproduced. The returned body signs the transition from state N-2 to state N-1.","name":"vote_extension_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.abci.QueryVoteExtBodyByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/actions_reduced_root":{"get":{"tags":["Query"],"summary":"ActionsReducedRoot Queries a list of ActionsReducedRoot items.","operationId":"GithubComnode101IopulsarChainQuery_ActionsReducedRoot","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryActionsReducedRootResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/latest_action_hashes":{"get":{"tags":["Query"],"summary":"LatestActionHashes Queries a list of LatestActionHashes items.","operationId":"GithubComnode101IopulsarChainQuery_LatestActionHashes","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryLatestActionHashesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_user_cosmos_public_key/{user_mina_public_key}":{"get":{"tags":["Query"],"summary":"GetUserCosmosPublicKey Queries a list of GetUserCosmosPublicKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserCosmosPublicKey","parameters":[{"type":"string","format":"byte","name":"user_mina_public_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserCosmosPublicKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_user_mina_public_key/{user_cosmos_public_key}":{"get":{"tags":["Query"],"summary":"GetUserMinaPublicKey Queries a list of GetUserMinaPublicKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserMinaPublicKey","parameters":[{"type":"string","format":"byte","name":"user_cosmos_public_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserMinaPublicKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_cosmos_pub_key/{validator_mina_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorCosmosPubKey Queries a list of GetValidatorCosmosPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorCosmosPubKey","parameters":[{"type":"string","format":"byte","name":"validator_mina_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_mina_pub_key/{validator_cosmos_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorMinaPubKey Queries a list of GetValidatorMinaPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorMinaPubKey","parameters":[{"type":"string","format":"byte","name":"validator_cosmos_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_set_with_mina_keys":{"get":{"tags":["Query"],"summary":"GetValidatorSetWithMinaKeys returns the supplied validator set with each validator's registered Mina public key.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorSetWithMinaKeys","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorSetWithMinaKeysResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/key_signing_challenge":{"get":{"tags":["Query"],"summary":"GetKeySigningChallenge returns the state-bound field a Mina wallet must sign.","operationId":"GithubComnode101IopulsarChainQuery_GetKeySigningChallenge","parameters":[{"enum":["KEY_SIGNING_OPERATION_UNSPECIFIED","KEY_SIGNING_OPERATION_REGISTER","KEY_SIGNING_OPERATION_UPDATE"],"type":"string","default":"KEY_SIGNING_OPERATION_UNSPECIFIED","description":" - KEY_SIGNING_OPERATION_UNSPECIFIED: KEY_SIGNING_OPERATION_UNSPECIFIED is invalid for signing requests.\n - KEY_SIGNING_OPERATION_REGISTER: KEY_SIGNING_OPERATION_REGISTER creates the first stable-key association.\n - KEY_SIGNING_OPERATION_UPDATE: KEY_SIGNING_OPERATION_UPDATE replaces an existing Mina key.","name":"operation","in":"query"},{"enum":["ACTOR_TYPE_UNSPECIFIED","ACTOR_TYPE_USER","ACTOR_TYPE_VALIDATOR"],"type":"string","default":"ACTOR_TYPE_UNSPECIFIED","description":" - ACTOR_TYPE_UNSPECIFIED: ACTOR_TYPE_UNSPECIFIED is invalid for key-registry operations.\n - ACTOR_TYPE_USER: ACTOR_TYPE_USER identifies a user account key association.\n - ACTOR_TYPE_VALIDATOR: ACTOR_TYPE_VALIDATOR identifies a validator consensus key association.","name":"actor_type","in":"query"},{"type":"string","format":"byte","name":"cosmos_public_key","in":"query"},{"type":"string","format":"byte","name":"new_mina_public_key","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetKeySigningChallengeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin17","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/smartaccounts/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin22","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.smartaccounts.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/commitments/{validator}":{"get":{"tags":["Query"],"summary":"CommitmentsByValidator lists retained commitments for a validator.","operationId":"GithubComnode101IopulsarChainQuery_CommitmentsByValidator","parameters":[{"type":"string","name":"validator","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryCommitmentsByValidatorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/commitments/{validator}/{commitment_height}":{"get":{"tags":["Query"],"summary":"Commitment returns one retained validator commitment.","operationId":"GithubComnode101IopulsarChainQuery_Commitment","parameters":[{"type":"string","name":"validator","in":"path","required":true},{"type":"string","format":"uint64","name":"commitment_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryCommitmentResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/params":{"get":{"tags":["Query"],"summary":"Params returns module parameters.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin26","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/height/{submission_height}":{"get":{"tags":["Query"],"summary":"ProofsByHeight lists proofs submitted at a height.","operationId":"GithubComnode101IopulsarChainQuery_ProofsByHeight","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofsByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/verification-id/{verification_id}":{"get":{"tags":["Query"],"summary":"ProofByVerificationId resolves the permanent verification request registry.","operationId":"GithubComnode101IopulsarChainQuery_ProofByVerificationId","parameters":[{"type":"string","format":"byte","name":"verification_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"Proof returns a pending or finalized proof by key.","operationId":"GithubComnode101IopulsarChainQuery_Proof","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/results/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"FinalProofResult returns an immutable finalized result.","operationId":"GithubComnode101IopulsarChainQuery_FinalProofResult","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryFinalProofResultResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/tallies/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"ProofTally returns the active tally for a pending proof.","operationId":"GithubComnode101IopulsarChainQuery_ProofTally","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofTallyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/votes/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"VerificationVotes lists effective votes for a proof.","operationId":"GithubComnode101IopulsarChainQuery_VerificationVotes","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryVerificationVotesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/votes/{submission_height}/{index_in_block}/{validator}":{"get":{"tags":["Query"],"summary":"Vote returns one validator's effective vote for a proof.","operationId":"GithubComnode101IopulsarChainQuery_Vote","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true},{"type":"string","name":"validator","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryVoteResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/votepersistence/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin32","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/votepersistence/v1/vote_extensions":{"get":{"tags":["Query"],"summary":"VoteExtensions queries the currently persisted vote extensions.","operationId":"GithubComnode101IopulsarChainQuery_VoteExtensions","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.QueryVoteExtensionsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}}},"definitions":{"cosmos.auth.v1beta1.AddressBytesToStringResponse":{"description":"AddressBytesToStringResponse is the response type for AddressString rpc method.","type":"object","properties":{"address_string":{"type":"string"}}},"cosmos.auth.v1beta1.AddressStringToBytesResponse":{"description":"AddressStringToBytesResponse is the response type for AddressBytes rpc method.","type":"object","properties":{"address_bytes":{"type":"string","format":"byte"}}},"cosmos.auth.v1beta1.BaseAccount":{"description":"BaseAccount defines a base account type. It contains all the necessary fields\nfor basic account functionality. Any custom account type should extend this\ntype for additional functionality (e.g. vesting).","type":"object","properties":{"account_number":{"type":"string","format":"uint64"},"address":{"type":"string"},"pub_key":{"$ref":"#/definitions/google.protobuf.Any"},"sequence":{"type":"string","format":"uint64"}}},"cosmos.auth.v1beta1.Bech32PrefixResponse":{"description":"Bech32PrefixResponse is the response type for Bech32Prefix rpc method.","type":"object","properties":{"bech32_prefix":{"type":"string"}}},"cosmos.auth.v1beta1.Params":{"description":"Params defines the parameters for the auth module.","type":"object","properties":{"max_memo_characters":{"type":"string","format":"uint64"},"sig_verify_cost_ed25519":{"type":"string","format":"uint64"},"sig_verify_cost_secp256k1":{"type":"string","format":"uint64"},"tx_sig_limit":{"type":"string","format":"uint64"},"tx_size_cost_per_byte":{"type":"string","format":"uint64"}}},"cosmos.auth.v1beta1.QueryAccountAddressByIDResponse":{"type":"object","title":"QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method","properties":{"account_address":{"type":"string"}}},"cosmos.auth.v1beta1.QueryAccountInfoResponse":{"description":"QueryAccountInfoResponse is the Query/AccountInfo response type.","type":"object","properties":{"info":{"description":"info is the account info which is represented by BaseAccount.","$ref":"#/definitions/cosmos.auth.v1beta1.BaseAccount"}}},"cosmos.auth.v1beta1.QueryAccountResponse":{"description":"QueryAccountResponse is the response type for the Query/Account RPC method.","type":"object","properties":{"account":{"description":"account defines the account of the corresponding address.","$ref":"#/definitions/google.protobuf.Any"}}},"cosmos.auth.v1beta1.QueryAccountsResponse":{"description":"QueryAccountsResponse is the response type for the Query/Accounts RPC method.","type":"object","properties":{"accounts":{"type":"array","title":"accounts are the existing accounts","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.auth.v1beta1.QueryModuleAccountByNameResponse":{"description":"QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method.","type":"object","properties":{"account":{"$ref":"#/definitions/google.protobuf.Any"}}},"cosmos.auth.v1beta1.QueryModuleAccountsResponse":{"description":"QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method.","type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}}}},"cosmos.auth.v1beta1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params defines the parameters of the module.","$ref":"#/definitions/cosmos.auth.v1beta1.Params"}}},"cosmos.authz.v1beta1.Grant":{"description":"Grant gives permissions to execute\nthe provide method with expiration time.","type":"object","properties":{"authorization":{"$ref":"#/definitions/google.protobuf.Any"},"expiration":{"type":"string","format":"date-time","title":"time when the grant will expire and will be pruned. If null, then the grant\ndoesn't have a time expiration (other conditions in `authorization`\nmay apply to invalidate the grant)"}}},"cosmos.authz.v1beta1.GrantAuthorization":{"type":"object","title":"GrantAuthorization extends a grant with both the addresses of the grantee and granter.\nIt is used in genesis.proto and query.proto","properties":{"authorization":{"$ref":"#/definitions/google.protobuf.Any"},"expiration":{"type":"string","format":"date-time"},"grantee":{"type":"string"},"granter":{"type":"string"}}},"cosmos.authz.v1beta1.QueryGranteeGrantsResponse":{"description":"QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method.","type":"object","properties":{"grants":{"description":"grants is a list of grants granted to the grantee.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.authz.v1beta1.GrantAuthorization"}},"pagination":{"description":"pagination defines an pagination for the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.authz.v1beta1.QueryGranterGrantsResponse":{"description":"QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method.","type":"object","properties":{"grants":{"description":"grants is a list of grants granted by the granter.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.authz.v1beta1.GrantAuthorization"}},"pagination":{"description":"pagination defines an pagination for the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.authz.v1beta1.QueryGrantsResponse":{"description":"QueryGrantsResponse is the response type for the Query/Authorizations RPC method.","type":"object","properties":{"grants":{"description":"authorizations is a list of grants granted for grantee by granter.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.authz.v1beta1.Grant"}},"pagination":{"description":"pagination defines an pagination for the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.bank.v1beta1.DenomOwner":{"description":"DenomOwner defines structure representing an account that owns or holds a\nparticular denominated token. It contains the account address and account\nbalance of the denominated token.","type":"object","properties":{"address":{"description":"address defines the address that owns a particular denomination.","type":"string"},"balance":{"description":"balance is the balance of the denominated coin for an account.","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}},"cosmos.bank.v1beta1.DenomUnit":{"description":"DenomUnit represents a struct that describes a given\ndenomination unit of the basic token.","type":"object","properties":{"aliases":{"type":"array","title":"aliases is a list of string aliases for the given denom","items":{"type":"string"}},"denom":{"description":"denom represents the string name of the given denom unit (e.g uatom).","type":"string"},"exponent":{"description":"exponent represents power of 10 exponent that one must\nraise the base_denom to in order to equal the given DenomUnit's denom\n1 denom = 10^exponent base_denom\n(e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with\nexponent = 6, thus: 1 atom = 10^6 uatom).","type":"integer","format":"int64"}}},"cosmos.bank.v1beta1.Metadata":{"description":"Metadata represents a struct that describes\na basic token.","type":"object","properties":{"base":{"description":"base represents the base denom (should be the DenomUnit with exponent = 0).","type":"string"},"denom_units":{"type":"array","title":"denom_units represents the list of DenomUnit's for a given coin","items":{"type":"object","$ref":"#/definitions/cosmos.bank.v1beta1.DenomUnit"}},"description":{"type":"string"},"display":{"description":"display indicates the suggested denom that should be\ndisplayed in clients.","type":"string"},"name":{"type":"string","title":"name defines the name of the token (eg: Cosmos Atom)"},"symbol":{"description":"symbol is the token symbol usually shown on exchanges (eg: ATOM). This can\nbe the same as the display.","type":"string"},"uri":{"description":"URI to a document (on or off-chain) that contains additional information. Optional.","type":"string"},"uri_hash":{"description":"URIHash is a sha256 hash of a document pointed by URI. It's used to verify that\nthe document didn't change. Optional.","type":"string"}}},"cosmos.bank.v1beta1.Params":{"description":"Params defines the parameters for the bank module.","type":"object","properties":{"default_send_enabled":{"type":"boolean"},"send_enabled":{"description":"Deprecated: Use of SendEnabled in params is deprecated.\nFor genesis, use the newly added send_enabled field in the genesis object.\nStorage, lookup, and manipulation of this information is now in the keeper.\n\nAs of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.bank.v1beta1.SendEnabled"}}}},"cosmos.bank.v1beta1.QueryAllBalancesResponse":{"description":"QueryAllBalancesResponse is the response type for the Query/AllBalances RPC\nmethod.","type":"object","properties":{"balances":{"description":"balances is the balances of all the coins.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.bank.v1beta1.QueryBalanceResponse":{"description":"QueryBalanceResponse is the response type for the Query/Balance RPC method.","type":"object","properties":{"balance":{"description":"balance is the balance of the coin.","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}},"cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse":{"description":"QueryDenomMetadataByQueryStringResponse is the response type for the Query/DenomMetadata RPC\nmethod. Identical with QueryDenomMetadataResponse but receives denom as query string in request.","type":"object","properties":{"metadata":{"description":"metadata describes and provides all the client information for the requested token.","$ref":"#/definitions/cosmos.bank.v1beta1.Metadata"}}},"cosmos.bank.v1beta1.QueryDenomMetadataResponse":{"description":"QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC\nmethod.","type":"object","properties":{"metadata":{"description":"metadata describes and provides all the client information for the requested token.","$ref":"#/definitions/cosmos.bank.v1beta1.Metadata"}}},"cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse":{"description":"QueryDenomOwnersByQueryResponse defines the RPC response of a DenomOwnersByQuery RPC query.","type":"object","properties":{"denom_owners":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.bank.v1beta1.DenomOwner"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.bank.v1beta1.QueryDenomOwnersResponse":{"description":"QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query.","type":"object","properties":{"denom_owners":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.bank.v1beta1.DenomOwner"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.bank.v1beta1.QueryDenomsMetadataResponse":{"description":"QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC\nmethod.","type":"object","properties":{"metadatas":{"description":"metadata provides the client information for all the registered tokens.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.bank.v1beta1.Metadata"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.bank.v1beta1.QueryParamsResponse":{"description":"QueryParamsResponse defines the response type for querying x/bank parameters.","type":"object","properties":{"params":{"description":"params provides the parameters of the bank module.","$ref":"#/definitions/cosmos.bank.v1beta1.Params"}}},"cosmos.bank.v1beta1.QuerySendEnabledResponse":{"description":"QuerySendEnabledResponse defines the RPC response of a SendEnable query.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response. This field is only\npopulated if the denoms field in the request is empty.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"send_enabled":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.bank.v1beta1.SendEnabled"}}}},"cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse":{"description":"QuerySpendableBalanceByDenomResponse defines the gRPC response structure for\nquerying an account's spendable balance for a specific denom.","type":"object","properties":{"balance":{"description":"balance is the balance of the coin.","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}},"cosmos.bank.v1beta1.QuerySpendableBalancesResponse":{"description":"QuerySpendableBalancesResponse defines the gRPC response structure for querying\nan account's spendable balances.","type":"object","properties":{"balances":{"description":"balances is the spendable balances of all the coins.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.bank.v1beta1.QuerySupplyOfResponse":{"description":"QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method.","type":"object","properties":{"amount":{"description":"amount is the supply of the coin.","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}},"cosmos.bank.v1beta1.QueryTotalSupplyResponse":{"type":"object","title":"QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC\nmethod","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"supply":{"type":"array","title":"supply is the supply of the coins","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}}},"cosmos.bank.v1beta1.SendEnabled":{"description":"SendEnabled maps coin denom to a send_enabled status (whether a denom is\nsendable).","type":"object","properties":{"denom":{"type":"string"},"enabled":{"type":"boolean"}}},"cosmos.base.abci.v1beta1.ABCIMessageLog":{"description":"ABCIMessageLog defines a structure containing an indexed tx ABCI message log.","type":"object","properties":{"events":{"description":"Events contains a slice of Event objects that were emitted during some\nexecution.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.abci.v1beta1.StringEvent"}},"log":{"type":"string"},"msg_index":{"type":"integer","format":"int64"}}},"cosmos.base.abci.v1beta1.Attribute":{"description":"Attribute defines an attribute wrapper where the key and value are\nstrings instead of raw bytes.","type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}},"cosmos.base.abci.v1beta1.GasInfo":{"description":"GasInfo defines tx execution gas context.","type":"object","properties":{"gas_used":{"description":"GasUsed is the amount of gas actually consumed.","type":"string","format":"uint64"},"gas_wanted":{"description":"GasWanted is the maximum units of work we allow this tx to perform.","type":"string","format":"uint64"}}},"cosmos.base.abci.v1beta1.Result":{"description":"Result is the union of ResponseFormat and ResponseCheckTx.","type":"object","properties":{"data":{"description":"Data is any data returned from message or handler execution. It MUST be\nlength prefixed in order to separate data from multiple message executions.\nDeprecated. This field is still populated, but prefer msg_response instead\nbecause it also contains the Msg response typeURL.","type":"string","format":"byte"},"events":{"description":"Events contains a slice of Event objects that were emitted during message\nor handler execution.","type":"array","items":{"type":"object","$ref":"#/definitions/tendermint.abci.Event"}},"log":{"description":"Log contains the log information from message or handler execution.","type":"string"},"msg_responses":{"description":"msg_responses contains the Msg handler responses type packed in Anys.","type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}}}},"cosmos.base.abci.v1beta1.StringEvent":{"description":"StringEvent defines en Event object wrapper where all the attributes\ncontain key/value pairs that are strings instead of raw bytes.","type":"object","properties":{"attributes":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.abci.v1beta1.Attribute"}},"type":{"type":"string"}}},"cosmos.base.abci.v1beta1.TxResponse":{"description":"TxResponse defines a structure containing relevant tx data and metadata. The\ntags are stringified and the log is JSON decoded.","type":"object","properties":{"code":{"description":"Response code.","type":"integer","format":"int64"},"codespace":{"type":"string","title":"Namespace for the Code"},"data":{"description":"Result bytes, if any.","type":"string"},"events":{"description":"Events defines all the events emitted by processing a transaction. Note,\nthese events include those emitted by processing all the messages and those\nemitted from the ante. Whereas Logs contains the events, with\nadditional metadata, emitted only by processing the messages.","type":"array","items":{"type":"object","$ref":"#/definitions/tendermint.abci.Event"}},"gas_used":{"description":"Amount of gas consumed by transaction.","type":"string","format":"int64"},"gas_wanted":{"description":"Amount of gas requested for transaction.","type":"string","format":"int64"},"height":{"type":"string","format":"int64","title":"The block height"},"info":{"description":"Additional information. May be non-deterministic.","type":"string"},"logs":{"description":"The output of the application's logger (typed). May be non-deterministic.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.abci.v1beta1.ABCIMessageLog"}},"raw_log":{"description":"The output of the application's logger (raw string). May be\nnon-deterministic.","type":"string"},"timestamp":{"description":"Time of the previous block. For heights \u003e 1, it's the weighted median of\nthe timestamps of the valid votes in the block.LastCommit. For height == 1,\nit's genesis time.","type":"string"},"tx":{"description":"The request transaction bytes.","$ref":"#/definitions/google.protobuf.Any"},"txhash":{"description":"The transaction hash.","type":"string"}}},"cosmos.base.node.v1beta1.ConfigResponse":{"description":"ConfigResponse defines the response structure for the Config gRPC query.","type":"object","properties":{"halt_height":{"type":"string","format":"uint64"},"minimum_gas_price":{"type":"string"},"pruning_interval":{"type":"string"},"pruning_keep_recent":{"type":"string"}}},"cosmos.base.node.v1beta1.StatusResponse":{"description":"StateResponse defines the response structure for the status of a node.","type":"object","properties":{"app_hash":{"type":"string","format":"byte","title":"app hash of the current block"},"earliest_store_height":{"type":"string","format":"uint64","title":"earliest block height available in the store"},"height":{"type":"string","format":"uint64","title":"current block height"},"timestamp":{"type":"string","format":"date-time","title":"block height timestamp"},"validator_hash":{"type":"string","format":"byte","title":"validator hash provided by the consensus header"}}},"cosmos.base.query.v1beta1.PageRequest":{"description":"message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }","type":"object","title":"PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:","properties":{"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.","type":"boolean"},"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.","type":"string","format":"byte"},"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.","type":"string","format":"uint64"},"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.","type":"string","format":"uint64"},"reverse":{"description":"reverse is set to true if results are to be returned in the descending order.","type":"boolean"}}},"cosmos.base.query.v1beta1.PageResponse":{"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 }","type":"object","properties":{"next_key":{"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.","type":"string","format":"byte"},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}},"cosmos.base.reflection.v1beta1.ListAllInterfacesResponse":{"description":"ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC.","type":"object","properties":{"interface_names":{"description":"interface_names is an array of all the registered interfaces.","type":"array","items":{"type":"string"}}}},"cosmos.base.reflection.v1beta1.ListImplementationsResponse":{"description":"ListImplementationsResponse is the response type of the ListImplementations\nRPC.","type":"object","properties":{"implementation_message_names":{"type":"array","items":{"type":"string"}}}},"cosmos.base.reflection.v2alpha1.AuthnDescriptor":{"type":"object","title":"AuthnDescriptor provides information on how to sign transactions without relying\non the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures","properties":{"sign_modes":{"type":"array","title":"sign_modes defines the supported signature algorithm","items":{"type":"object","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.SigningModeDescriptor"}}}},"cosmos.base.reflection.v2alpha1.ChainDescriptor":{"type":"object","title":"ChainDescriptor describes chain information of the application","properties":{"id":{"type":"string","title":"id is the chain id"}}},"cosmos.base.reflection.v2alpha1.CodecDescriptor":{"type":"object","title":"CodecDescriptor describes the registered interfaces and provides metadata information on the types","properties":{"interfaces":{"type":"array","title":"interfaces is a list of the registerted interfaces descriptors","items":{"type":"object","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.InterfaceDescriptor"}}}},"cosmos.base.reflection.v2alpha1.ConfigurationDescriptor":{"type":"object","title":"ConfigurationDescriptor contains metadata information on the sdk.Config","properties":{"bech32_account_address_prefix":{"type":"string","title":"bech32_account_address_prefix is the account address prefix"}}},"cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse":{"type":"object","title":"GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC","properties":{"authn":{"title":"authn describes how to authenticate to the application when sending transactions","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.AuthnDescriptor"}}},"cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse":{"type":"object","title":"GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC","properties":{"chain":{"title":"chain describes application chain information","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.ChainDescriptor"}}},"cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse":{"type":"object","title":"GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC","properties":{"codec":{"title":"codec describes the application codec such as registered interfaces and implementations","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.CodecDescriptor"}}},"cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse":{"type":"object","title":"GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC","properties":{"config":{"title":"config describes the application's sdk.Config","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.ConfigurationDescriptor"}}},"cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse":{"type":"object","title":"GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC","properties":{"queries":{"title":"queries provides information on the available queryable services","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.QueryServicesDescriptor"}}},"cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse":{"type":"object","title":"GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC","properties":{"tx":{"title":"tx provides information on msgs that can be forwarded to the application\nalongside the accepted transaction protobuf type","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.TxDescriptor"}}},"cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor":{"type":"object","title":"InterfaceAcceptingMessageDescriptor describes a protobuf message which contains\nan interface represented as a google.protobuf.Any","properties":{"field_descriptor_names":{"type":"array","title":"field_descriptor_names is a list of the protobuf name (not fullname) of the field\nwhich contains the interface as google.protobuf.Any (the interface is the same, but\nit can be in multiple fields of the same proto message)","items":{"type":"string"}},"fullname":{"type":"string","title":"fullname is the protobuf fullname of the type containing the interface"}}},"cosmos.base.reflection.v2alpha1.InterfaceDescriptor":{"type":"object","title":"InterfaceDescriptor describes the implementation of an interface","properties":{"fullname":{"type":"string","title":"fullname is the name of the interface"},"interface_accepting_messages":{"type":"array","title":"interface_accepting_messages contains information regarding the proto messages which contain the interface as\ngoogle.protobuf.Any field","items":{"type":"object","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor"}},"interface_implementers":{"type":"array","title":"interface_implementers is a list of the descriptors of the interface implementers","items":{"type":"object","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor"}}}},"cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor":{"type":"object","title":"InterfaceImplementerDescriptor describes an interface implementer","properties":{"fullname":{"type":"string","title":"fullname is the protobuf queryable name of the interface implementer"},"type_url":{"type":"string","title":"type_url defines the type URL used when marshalling the type as any\nthis is required so we can provide type safe google.protobuf.Any marshalling and\nunmarshalling, making sure that we don't accept just 'any' type\nin our interface fields"}}},"cosmos.base.reflection.v2alpha1.MsgDescriptor":{"type":"object","title":"MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction","properties":{"msg_type_url":{"description":"msg_type_url contains the TypeURL of a sdk.Msg.","type":"string"}}},"cosmos.base.reflection.v2alpha1.QueryMethodDescriptor":{"type":"object","title":"QueryMethodDescriptor describes a queryable method of a query service\nno other info is provided beside method name and tendermint queryable path\nbecause it would be redundant with the grpc reflection service","properties":{"full_query_path":{"type":"string","title":"full_query_path is the path that can be used to query\nthis method via tendermint abci.Query"},"name":{"type":"string","title":"name is the protobuf name (not fullname) of the method"}}},"cosmos.base.reflection.v2alpha1.QueryServiceDescriptor":{"type":"object","title":"QueryServiceDescriptor describes a cosmos-sdk queryable service","properties":{"fullname":{"type":"string","title":"fullname is the protobuf fullname of the service descriptor"},"is_module":{"type":"boolean","title":"is_module describes if this service is actually exposed by an application's module"},"methods":{"type":"array","title":"methods provides a list of query service methods","items":{"type":"object","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.QueryMethodDescriptor"}}}},"cosmos.base.reflection.v2alpha1.QueryServicesDescriptor":{"type":"object","title":"QueryServicesDescriptor contains the list of cosmos-sdk queriable services","properties":{"query_services":{"type":"array","title":"query_services is a list of cosmos-sdk QueryServiceDescriptor","items":{"type":"object","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.QueryServiceDescriptor"}}}},"cosmos.base.reflection.v2alpha1.SigningModeDescriptor":{"type":"object","title":"SigningModeDescriptor provides information on a signing flow of the application\nNOTE(fdymylja): here we could go as far as providing an entire flow on how\nto sign a message given a SigningModeDescriptor, but it's better to think about\nthis another time","properties":{"authn_info_provider_method_fullname":{"type":"string","title":"authn_info_provider_method_fullname defines the fullname of the method to call to get\nthe metadata required to authenticate using the provided sign_modes"},"name":{"type":"string","title":"name defines the unique name of the signing mode"},"number":{"type":"integer","format":"int32","title":"number is the unique int32 identifier for the sign_mode enum"}}},"cosmos.base.reflection.v2alpha1.TxDescriptor":{"type":"object","title":"TxDescriptor describes the accepted transaction type","properties":{"fullname":{"description":"fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type)\nit is not meant to support polymorphism of transaction types, it is supposed to be used by\nreflection clients to understand if they can handle a specific transaction type in an application.","type":"string"},"msgs":{"type":"array","title":"msgs lists the accepted application messages (sdk.Msg)","items":{"type":"object","$ref":"#/definitions/cosmos.base.reflection.v2alpha1.MsgDescriptor"}}}},"cosmos.base.tendermint.v1beta1.ABCIQueryResponse":{"description":"ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query.\n\nNote: This type is a duplicate of the ResponseQuery proto type defined in\nTendermint.","type":"object","properties":{"code":{"type":"integer","format":"int64"},"codespace":{"type":"string"},"height":{"type":"string","format":"int64"},"index":{"type":"string","format":"int64"},"info":{"type":"string","title":"nondeterministic"},"key":{"type":"string","format":"byte"},"log":{"type":"string","title":"nondeterministic"},"proof_ops":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.ProofOps"},"value":{"type":"string","format":"byte"}}},"cosmos.base.tendermint.v1beta1.Block":{"description":"Block is tendermint type Block, with the Header proposer address\nfield converted to bech32 string.","type":"object","properties":{"data":{"$ref":"#/definitions/tendermint.types.Data"},"evidence":{"$ref":"#/definitions/tendermint.types.EvidenceList"},"header":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.Header"},"last_commit":{"$ref":"#/definitions/tendermint.types.Commit"}}},"cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse":{"description":"GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method.","type":"object","properties":{"block":{"title":"Deprecated: please use `sdk_block` instead","$ref":"#/definitions/tendermint.types.Block"},"block_id":{"$ref":"#/definitions/tendermint.types.BlockID"},"sdk_block":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.Block"}}},"cosmos.base.tendermint.v1beta1.GetLatestBlockResponse":{"description":"GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method.","type":"object","properties":{"block":{"title":"Deprecated: please use `sdk_block` instead","$ref":"#/definitions/tendermint.types.Block"},"block_id":{"$ref":"#/definitions/tendermint.types.BlockID"},"sdk_block":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.Block"}}},"cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse":{"description":"GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method.","type":"object","properties":{"block_height":{"type":"string","format":"int64"},"pagination":{"description":"pagination defines an pagination for the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.tendermint.v1beta1.Validator"}}}},"cosmos.base.tendermint.v1beta1.GetNodeInfoResponse":{"description":"GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method.","type":"object","properties":{"application_version":{"$ref":"#/definitions/cosmos.base.tendermint.v1beta1.VersionInfo"},"default_node_info":{"$ref":"#/definitions/tendermint.p2p.DefaultNodeInfo"}}},"cosmos.base.tendermint.v1beta1.GetSyncingResponse":{"description":"GetSyncingResponse is the response type for the Query/GetSyncing RPC method.","type":"object","properties":{"syncing":{"type":"boolean"}}},"cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse":{"description":"GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method.","type":"object","properties":{"block_height":{"type":"string","format":"int64"},"pagination":{"description":"pagination defines an pagination for the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.tendermint.v1beta1.Validator"}}}},"cosmos.base.tendermint.v1beta1.Header":{"description":"Header defines the structure of a Tendermint block header.","type":"object","properties":{"app_hash":{"type":"string","format":"byte","title":"state after txs from the previous block"},"chain_id":{"type":"string"},"consensus_hash":{"type":"string","format":"byte","title":"consensus params for current block"},"data_hash":{"type":"string","format":"byte","title":"transactions"},"evidence_hash":{"description":"evidence included in the block","type":"string","format":"byte","title":"consensus info"},"height":{"type":"string","format":"int64"},"last_block_id":{"title":"prev block info","$ref":"#/definitions/tendermint.types.BlockID"},"last_commit_hash":{"description":"commit from validators from the last block","type":"string","format":"byte","title":"hashes of block data"},"last_results_hash":{"type":"string","format":"byte","title":"root hash of all results from the txs from the previous block"},"next_validators_hash":{"type":"string","format":"byte","title":"validators for the next block"},"proposer_address":{"description":"proposer_address is the original block proposer address, formatted as a Bech32 string.\nIn Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string\nfor better UX.\n\noriginal proposer of the block","type":"string"},"time":{"type":"string","format":"date-time"},"validators_hash":{"description":"validators for the current block","type":"string","format":"byte","title":"hashes from the app output from the prev block"},"version":{"title":"basic block info","$ref":"#/definitions/tendermint.version.Consensus"}}},"cosmos.base.tendermint.v1beta1.Module":{"type":"object","title":"Module is the type for VersionInfo","properties":{"path":{"type":"string","title":"module path"},"sum":{"type":"string","title":"checksum"},"version":{"type":"string","title":"module version"}}},"cosmos.base.tendermint.v1beta1.ProofOp":{"description":"ProofOp defines an operation used for calculating Merkle root. The data could\nbe arbitrary format, providing necessary data for example neighbouring node\nhash.\n\nNote: This type is a duplicate of the ProofOp proto type defined in Tendermint.","type":"object","properties":{"data":{"type":"string","format":"byte"},"key":{"type":"string","format":"byte"},"type":{"type":"string"}}},"cosmos.base.tendermint.v1beta1.ProofOps":{"description":"ProofOps is Merkle proof defined by the list of ProofOps.\n\nNote: This type is a duplicate of the ProofOps proto type defined in Tendermint.","type":"object","properties":{"ops":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.tendermint.v1beta1.ProofOp"}}}},"cosmos.base.tendermint.v1beta1.Validator":{"description":"Validator is the type for the validator-set.","type":"object","properties":{"address":{"type":"string"},"proposer_priority":{"type":"string","format":"int64"},"pub_key":{"$ref":"#/definitions/google.protobuf.Any"},"voting_power":{"type":"string","format":"int64"}}},"cosmos.base.tendermint.v1beta1.VersionInfo":{"description":"VersionInfo is the type for the GetNodeInfoResponse message.","type":"object","properties":{"app_name":{"type":"string"},"build_deps":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.tendermint.v1beta1.Module"}},"build_tags":{"type":"string"},"cosmos_sdk_version":{"type":"string"},"git_commit":{"type":"string"},"go_version":{"type":"string"},"name":{"type":"string"},"version":{"type":"string"}}},"cosmos.base.v1beta1.Coin":{"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.","type":"object","properties":{"amount":{"type":"string"},"denom":{"type":"string"}}},"cosmos.base.v1beta1.DecCoin":{"description":"DecCoin defines a token with a denomination and a decimal amount.\n\nNOTE: The amount field is an Dec which implements the custom method\nsignatures required by gogoproto.","type":"object","properties":{"amount":{"type":"string"},"denom":{"type":"string"}}},"cosmos.circuit.v1.AccountResponse":{"description":"AccountResponse is the response type for the Query/Account RPC method.","type":"object","properties":{"permission":{"$ref":"#/definitions/cosmos.circuit.v1.Permissions"}}},"cosmos.circuit.v1.AccountsResponse":{"description":"AccountsResponse is the response type for the Query/Accounts RPC method.","type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.circuit.v1.GenesisAccountPermissions"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.circuit.v1.DisabledListResponse":{"description":"DisabledListResponse is the response type for the Query/DisabledList RPC method.","type":"object","properties":{"disabled_list":{"type":"array","items":{"type":"string"}}}},"cosmos.circuit.v1.GenesisAccountPermissions":{"type":"object","title":"GenesisAccountPermissions is the account permissions for the circuit breaker in genesis","properties":{"address":{"type":"string"},"permissions":{"$ref":"#/definitions/cosmos.circuit.v1.Permissions"}}},"cosmos.circuit.v1.Permissions":{"description":"Permissions are the permissions that an account has to trip\nor reset the circuit breaker.","type":"object","properties":{"level":{"description":"level is the level of permissions granted to this account.","$ref":"#/definitions/cosmos.circuit.v1.Permissions.Level"},"limit_type_urls":{"description":"limit_type_urls is used with LEVEL_SOME_MSGS to limit the lists of Msg type\nURLs that the account can trip. It is an error to use limit_type_urls with\na level other than LEVEL_SOME_MSGS.","type":"array","items":{"type":"string"}}}},"cosmos.circuit.v1.Permissions.Level":{"description":"Level is the permission level.\n\n - LEVEL_NONE_UNSPECIFIED: LEVEL_NONE_UNSPECIFIED indicates that the account will have no circuit\nbreaker permissions.\n - LEVEL_SOME_MSGS: LEVEL_SOME_MSGS indicates that the account will have permission to\ntrip or reset the circuit breaker for some Msg type URLs. If this level\nis chosen, a non-empty list of Msg type URLs must be provided in\nlimit_type_urls.\n - LEVEL_ALL_MSGS: LEVEL_ALL_MSGS indicates that the account can trip or reset the circuit\nbreaker for Msg's of all type URLs.\n - LEVEL_SUPER_ADMIN: LEVEL_SUPER_ADMIN indicates that the account can take all circuit breaker\nactions and can grant permissions to other accounts.","type":"string","default":"LEVEL_NONE_UNSPECIFIED","enum":["LEVEL_NONE_UNSPECIFIED","LEVEL_SOME_MSGS","LEVEL_ALL_MSGS","LEVEL_SUPER_ADMIN"]},"cosmos.consensus.v1.QueryParamsResponse":{"description":"QueryParamsResponse defines the response type for querying x/consensus parameters.","type":"object","properties":{"params":{"description":"params are the tendermint consensus params stored in the consensus module.\nPlease note that `params.version` is not populated in this response, it is\ntracked separately in the x/upgrade module.","$ref":"#/definitions/tendermint.types.ConsensusParams"}}},"cosmos.crypto.multisig.v1beta1.CompactBitArray":{"description":"CompactBitArray is an implementation of a space efficient bit array.\nThis is used to ensure that the encoded data takes up a minimal amount of\nspace after proto encoding.\nThis is not thread safe, and is not intended for concurrent usage.","type":"object","properties":{"elems":{"type":"string","format":"byte"},"extra_bits_stored":{"type":"integer","format":"int64"}}},"cosmos.distribution.v1beta1.DelegationDelegatorReward":{"description":"DelegationDelegatorReward represents the properties\nof a delegator's delegation reward.","type":"object","properties":{"reward":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.DecCoin"}},"validator_address":{"type":"string"}}},"cosmos.distribution.v1beta1.Params":{"description":"Params defines the set of params for the distribution module.","type":"object","properties":{"base_proposer_reward":{"description":"Deprecated: The base_proposer_reward field is deprecated and is no longer used\nin the x/distribution module's reward mechanism.","type":"string"},"bonus_proposer_reward":{"description":"Deprecated: The bonus_proposer_reward field is deprecated and is no longer used\nin the x/distribution module's reward mechanism.","type":"string"},"community_tax":{"type":"string"},"withdraw_addr_enabled":{"type":"boolean"}}},"cosmos.distribution.v1beta1.QueryCommunityPoolResponse":{"description":"QueryCommunityPoolResponse is the response type for the Query/CommunityPool\nRPC method.","type":"object","properties":{"pool":{"description":"pool defines community pool's coins.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.DecCoin"}}}},"cosmos.distribution.v1beta1.QueryDelegationRewardsResponse":{"description":"QueryDelegationRewardsResponse is the response type for the\nQuery/DelegationRewards RPC method.","type":"object","properties":{"rewards":{"description":"rewards defines the rewards accrued by a delegation.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.DecCoin"}}}},"cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse":{"description":"QueryDelegationTotalRewardsResponse is the response type for the\nQuery/DelegationTotalRewards RPC method.","type":"object","properties":{"rewards":{"description":"rewards defines all the rewards accrued by a delegator.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.distribution.v1beta1.DelegationDelegatorReward"}},"total":{"description":"total defines the sum of all the rewards.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.DecCoin"}}}},"cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse":{"description":"QueryDelegatorValidatorsResponse is the response type for the\nQuery/DelegatorValidators RPC method.","type":"object","properties":{"validators":{"description":"validators defines the validators a delegator is delegating for.","type":"array","items":{"type":"string"}}}},"cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse":{"description":"QueryDelegatorWithdrawAddressResponse is the response type for the\nQuery/DelegatorWithdrawAddress RPC method.","type":"object","properties":{"withdraw_address":{"description":"withdraw_address defines the delegator address to query for.","type":"string"}}},"cosmos.distribution.v1beta1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params defines the parameters of the module.","$ref":"#/definitions/cosmos.distribution.v1beta1.Params"}}},"cosmos.distribution.v1beta1.QueryValidatorCommissionResponse":{"type":"object","title":"QueryValidatorCommissionResponse is the response type for the\nQuery/ValidatorCommission RPC method","properties":{"commission":{"description":"commission defines the commission the validator received.","$ref":"#/definitions/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission"}}},"cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse":{"description":"QueryValidatorDistributionInfoResponse is the response type for the Query/ValidatorDistributionInfo RPC method.","type":"object","properties":{"commission":{"description":"commission defines the commission the validator received.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.DecCoin"}},"operator_address":{"description":"operator_address defines the validator operator address.","type":"string"},"self_bond_rewards":{"description":"self_bond_rewards defines the self delegations rewards.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.DecCoin"}}}},"cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse":{"description":"QueryValidatorOutstandingRewardsResponse is the response type for the\nQuery/ValidatorOutstandingRewards RPC method.","type":"object","properties":{"rewards":{"$ref":"#/definitions/cosmos.distribution.v1beta1.ValidatorOutstandingRewards"}}},"cosmos.distribution.v1beta1.QueryValidatorSlashesResponse":{"description":"QueryValidatorSlashesResponse is the response type for the\nQuery/ValidatorSlashes RPC method.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"slashes":{"description":"slashes defines the slashes the validator received.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.distribution.v1beta1.ValidatorSlashEvent"}}}},"cosmos.distribution.v1beta1.ValidatorAccumulatedCommission":{"description":"ValidatorAccumulatedCommission represents accumulated commission\nfor a validator kept as a running counter, can be withdrawn at any time.","type":"object","properties":{"commission":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.DecCoin"}}}},"cosmos.distribution.v1beta1.ValidatorOutstandingRewards":{"description":"ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards\nfor a validator inexpensive to track, allows simple sanity checks.","type":"object","properties":{"rewards":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.DecCoin"}}}},"cosmos.distribution.v1beta1.ValidatorSlashEvent":{"description":"ValidatorSlashEvent represents a validator slash event.\nHeight is implicit within the store key.\nThis is needed to calculate appropriate amount of staking tokens\nfor delegations which are withdrawn after a slash has occurred.","type":"object","properties":{"fraction":{"type":"string"},"validator_period":{"type":"string","format":"uint64"}}},"cosmos.epochs.v1beta1.EpochInfo":{"description":"EpochInfo is a struct that describes the data going into\na timer defined by the x/epochs module.","type":"object","properties":{"current_epoch":{"description":"current_epoch is the current epoch number, or in other words,\nhow many times has the timer 'ticked'.\nThe first tick (current_epoch=1) is defined as\nthe first block whose blocktime is greater than the EpochInfo start_time.","type":"string","format":"int64"},"current_epoch_start_height":{"type":"string","format":"int64","title":"current_epoch_start_height is the block height at which the current epoch\nstarted. (The block height at which the timer last ticked)"},"current_epoch_start_time":{"description":"current_epoch_start_time describes the start time of the current timer\ninterval. The interval is (current_epoch_start_time,\ncurrent_epoch_start_time + duration] When the timer ticks, this is set to\ncurrent_epoch_start_time = last_epoch_start_time + duration only one timer\ntick for a given identifier can occur per block.\n\nNOTE! The current_epoch_start_time may diverge significantly from the\nwall-clock time the epoch began at. Wall-clock time of epoch start may be\n\u003e\u003e current_epoch_start_time. Suppose current_epoch_start_time = 10,\nduration = 5. Suppose the chain goes offline at t=14, and comes back online\nat t=30, and produces blocks at every successive time. (t=31, 32, etc.)\n* The t=30 block will start the epoch for (10, 15]\n* The t=31 block will start the epoch for (15, 20]\n* The t=32 block will start the epoch for (20, 25]\n* The t=33 block will start the epoch for (25, 30]\n* The t=34 block will start the epoch for (30, 35]\n* The **t=36** block will start the epoch for (35, 40]","type":"string","format":"date-time"},"duration":{"description":"duration is the time in between epoch ticks.\nIn order for intended behavior to be met, duration should\nbe greater than the chains expected block time.\nDuration must be non-zero.","type":"string"},"epoch_counting_started":{"description":"epoch_counting_started is a boolean, that indicates whether this\nepoch timer has began yet.","type":"boolean"},"identifier":{"description":"identifier is a unique reference to this particular timer.","type":"string"},"start_time":{"description":"start_time is the time at which the timer first ever ticks.\nIf start_time is in the future, the epoch will not begin until the start\ntime.","type":"string","format":"date-time"}}},"cosmos.epochs.v1beta1.QueryCurrentEpochResponse":{"description":"QueryCurrentEpochResponse defines the gRPC response structure for\nquerying an epoch by its identifier.","type":"object","properties":{"current_epoch":{"type":"string","format":"int64"}}},"cosmos.epochs.v1beta1.QueryEpochInfosResponse":{"description":"QueryEpochInfosRequest defines the gRPC response structure for\nquerying all epoch info.","type":"object","properties":{"epochs":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.epochs.v1beta1.EpochInfo"}}}},"cosmos.evidence.v1beta1.QueryAllEvidenceResponse":{"description":"QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC\nmethod.","type":"object","properties":{"evidence":{"description":"evidence returns all evidences.","type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.evidence.v1beta1.QueryEvidenceResponse":{"description":"QueryEvidenceResponse is the response type for the Query/Evidence RPC method.","type":"object","properties":{"evidence":{"description":"evidence returns the requested evidence.","$ref":"#/definitions/google.protobuf.Any"}}},"cosmos.feegrant.v1beta1.Grant":{"type":"object","title":"Grant is stored in the KVStore to record a grant with full context","properties":{"allowance":{"description":"allowance can be any of basic, periodic, allowed fee allowance.","$ref":"#/definitions/google.protobuf.Any"},"grantee":{"description":"grantee is the address of the user being granted an allowance of another user's funds.","type":"string"},"granter":{"description":"granter is the address of the user granting an allowance of their funds.","type":"string"}}},"cosmos.feegrant.v1beta1.QueryAllowanceResponse":{"description":"QueryAllowanceResponse is the response type for the Query/Allowance RPC method.","type":"object","properties":{"allowance":{"description":"allowance is a allowance granted for grantee by granter.","$ref":"#/definitions/cosmos.feegrant.v1beta1.Grant"}}},"cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse":{"description":"QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method.","type":"object","properties":{"allowances":{"description":"allowances that have been issued by the granter.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.feegrant.v1beta1.Grant"}},"pagination":{"description":"pagination defines an pagination for the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.feegrant.v1beta1.QueryAllowancesResponse":{"description":"QueryAllowancesResponse is the response type for the Query/Allowances RPC method.","type":"object","properties":{"allowances":{"description":"allowances are allowance's granted for grantee by granter.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.feegrant.v1beta1.Grant"}},"pagination":{"description":"pagination defines an pagination for the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.gov.v1.Deposit":{"description":"Deposit defines an amount deposited by an account address to an active\nproposal.","type":"object","properties":{"amount":{"description":"amount to be deposited by depositor.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"depositor":{"description":"depositor defines the deposit addresses from the proposals.","type":"string"},"proposal_id":{"description":"proposal_id defines the unique id of the proposal.","type":"string","format":"uint64"}}},"cosmos.gov.v1.DepositParams":{"description":"DepositParams defines the params for deposits on governance proposals.","type":"object","properties":{"max_deposit_period":{"description":"Maximum period for Atom holders to deposit on a proposal. Initial value: 2\nmonths.","type":"string"},"min_deposit":{"description":"Minimum deposit for a proposal to enter voting period.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}}},"cosmos.gov.v1.Params":{"description":"Params defines the parameters for the x/gov module.","type":"object","properties":{"burn_proposal_deposit_prevote":{"type":"boolean","title":"burn deposits if the proposal does not enter voting period"},"burn_vote_quorum":{"type":"boolean","title":"burn deposits if a proposal does not meet quorum"},"burn_vote_veto":{"type":"boolean","title":"burn deposits if quorum with vote type no_veto is met"},"expedited_min_deposit":{"description":"Minimum expedited deposit for a proposal to enter voting period.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"expedited_threshold":{"description":"Minimum proportion of Yes votes for proposal to pass. Default value: 0.67.","type":"string"},"expedited_voting_period":{"description":"Duration of the voting period of an expedited proposal.","type":"string"},"max_deposit_period":{"description":"Maximum period for Atom holders to deposit on a proposal. Initial value: 2\nmonths.","type":"string"},"min_deposit":{"description":"Minimum deposit for a proposal to enter voting period.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"min_deposit_ratio":{"description":"The ratio representing the proportion of the deposit value minimum that must be met when making a deposit.\nDefault value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be\nrequired.","type":"string"},"min_initial_deposit_ratio":{"description":"The ratio representing the proportion of the deposit value that must be paid at proposal submission.","type":"string"},"proposal_cancel_dest":{"description":"The address which will receive (proposal_cancel_ratio * deposit) proposal deposits.\nIf empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned.","type":"string"},"proposal_cancel_ratio":{"description":"The cancel ratio which will not be returned back to the depositors when a proposal is cancelled.","type":"string"},"quorum":{"description":"Minimum percentage of total stake needed to vote for a result to be\n considered valid.","type":"string"},"threshold":{"description":"Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.","type":"string"},"veto_threshold":{"description":"Minimum value of Veto votes to Total votes ratio for proposal to be\n vetoed. Default value: 1/3.","type":"string"},"voting_period":{"description":"Duration of the voting period.","type":"string"}}},"cosmos.gov.v1.Proposal":{"description":"Proposal defines the core field members of a governance proposal.","type":"object","properties":{"deposit_end_time":{"description":"deposit_end_time is the end time for deposition.","type":"string","format":"date-time"},"expedited":{"type":"boolean","title":"expedited defines if the proposal is expedited"},"failed_reason":{"type":"string","title":"failed_reason defines the reason why the proposal failed"},"final_tally_result":{"description":"final_tally_result is the final tally result of the proposal. When\nquerying a proposal via gRPC, this field is not populated until the\nproposal's voting period has ended.","$ref":"#/definitions/cosmos.gov.v1.TallyResult"},"id":{"description":"id defines the unique id of the proposal.","type":"string","format":"uint64"},"messages":{"description":"messages are the arbitrary messages to be executed if the proposal passes.","type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"metadata":{"type":"string","title":"metadata is any arbitrary metadata attached to the proposal.\nthe recommended format of the metadata is to be found here:\nhttps://docs.cosmos.network/v0.47/modules/gov#proposal-3"},"proposer":{"type":"string","title":"proposer is the address of the proposal sumbitter"},"status":{"description":"status defines the proposal status.","$ref":"#/definitions/cosmos.gov.v1.ProposalStatus"},"submit_time":{"description":"submit_time is the time of proposal submission.","type":"string","format":"date-time"},"summary":{"type":"string","title":"summary is a short summary of the proposal"},"title":{"type":"string","title":"title is the title of the proposal"},"total_deposit":{"description":"total_deposit is the total deposit on the proposal.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"voting_end_time":{"description":"voting_end_time is the end time of voting on a proposal.","type":"string","format":"date-time"},"voting_start_time":{"description":"voting_start_time is the starting time to vote on a proposal.","type":"string","format":"date-time"}}},"cosmos.gov.v1.ProposalStatus":{"description":"ProposalStatus enumerates the valid statuses of a proposal.\n\n - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status.\n - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit\nperiod.\n - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting\nperiod.\n - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has\npassed.\n - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has\nbeen rejected.\n - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has\nfailed.","type":"string","default":"PROPOSAL_STATUS_UNSPECIFIED","enum":["PROPOSAL_STATUS_UNSPECIFIED","PROPOSAL_STATUS_DEPOSIT_PERIOD","PROPOSAL_STATUS_VOTING_PERIOD","PROPOSAL_STATUS_PASSED","PROPOSAL_STATUS_REJECTED","PROPOSAL_STATUS_FAILED"]},"cosmos.gov.v1.QueryConstitutionResponse":{"type":"object","title":"QueryConstitutionResponse is the response type for the Query/Constitution RPC method","properties":{"constitution":{"type":"string"}}},"cosmos.gov.v1.QueryDepositResponse":{"description":"QueryDepositResponse is the response type for the Query/Deposit RPC method.","type":"object","properties":{"deposit":{"description":"deposit defines the requested deposit.","$ref":"#/definitions/cosmos.gov.v1.Deposit"}}},"cosmos.gov.v1.QueryDepositsResponse":{"description":"QueryDepositsResponse is the response type for the Query/Deposits RPC method.","type":"object","properties":{"deposits":{"description":"deposits defines the requested deposits.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.gov.v1.Deposit"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.gov.v1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"deposit_params":{"description":"Deprecated: Prefer to use `params` instead.\ndeposit_params defines the parameters related to deposit.","$ref":"#/definitions/cosmos.gov.v1.DepositParams"},"params":{"description":"params defines all the paramaters of x/gov module.","$ref":"#/definitions/cosmos.gov.v1.Params"},"tally_params":{"description":"Deprecated: Prefer to use `params` instead.\ntally_params defines the parameters related to tally.","$ref":"#/definitions/cosmos.gov.v1.TallyParams"},"voting_params":{"description":"Deprecated: Prefer to use `params` instead.\nvoting_params defines the parameters related to voting.","$ref":"#/definitions/cosmos.gov.v1.VotingParams"}}},"cosmos.gov.v1.QueryProposalResponse":{"description":"QueryProposalResponse is the response type for the Query/Proposal RPC method.","type":"object","properties":{"proposal":{"description":"proposal is the requested governance proposal.","$ref":"#/definitions/cosmos.gov.v1.Proposal"}}},"cosmos.gov.v1.QueryProposalsResponse":{"description":"QueryProposalsResponse is the response type for the Query/Proposals RPC\nmethod.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"proposals":{"description":"proposals defines all the requested governance proposals.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.gov.v1.Proposal"}}}},"cosmos.gov.v1.QueryTallyResultResponse":{"description":"QueryTallyResultResponse is the response type for the Query/Tally RPC method.","type":"object","properties":{"tally":{"description":"tally defines the requested tally.","$ref":"#/definitions/cosmos.gov.v1.TallyResult"}}},"cosmos.gov.v1.QueryVoteResponse":{"description":"QueryVoteResponse is the response type for the Query/Vote RPC method.","type":"object","properties":{"vote":{"description":"vote defines the queried vote.","$ref":"#/definitions/cosmos.gov.v1.Vote"}}},"cosmos.gov.v1.QueryVotesResponse":{"description":"QueryVotesResponse is the response type for the Query/Votes RPC method.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"votes":{"description":"votes defines the queried votes.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.gov.v1.Vote"}}}},"cosmos.gov.v1.TallyParams":{"description":"TallyParams defines the params for tallying votes on governance proposals.","type":"object","properties":{"quorum":{"description":"Minimum percentage of total stake needed to vote for a result to be\nconsidered valid.","type":"string"},"threshold":{"description":"Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.","type":"string"},"veto_threshold":{"description":"Minimum value of Veto votes to Total votes ratio for proposal to be\nvetoed. Default value: 1/3.","type":"string"}}},"cosmos.gov.v1.TallyResult":{"description":"TallyResult defines a standard tally for a governance proposal.","type":"object","properties":{"abstain_count":{"description":"abstain_count is the number of abstain votes on a proposal.","type":"string"},"no_count":{"description":"no_count is the number of no votes on a proposal.","type":"string"},"no_with_veto_count":{"description":"no_with_veto_count is the number of no with veto votes on a proposal.","type":"string"},"yes_count":{"description":"yes_count is the number of yes votes on a proposal.","type":"string"}}},"cosmos.gov.v1.Vote":{"description":"Vote defines a vote on a governance proposal.\nA Vote consists of a proposal ID, the voter, and the vote option.","type":"object","properties":{"metadata":{"type":"string","title":"metadata is any arbitrary metadata attached to the vote.\nthe recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5"},"options":{"description":"options is the weighted vote options.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.gov.v1.WeightedVoteOption"}},"proposal_id":{"description":"proposal_id defines the unique id of the proposal.","type":"string","format":"uint64"},"voter":{"description":"voter is the voter address of the proposal.","type":"string"}}},"cosmos.gov.v1.VoteOption":{"description":"VoteOption enumerates the valid vote options for a given governance proposal.\n\n - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option.\n - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option.\n - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option.\n - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option.\n - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option.","type":"string","default":"VOTE_OPTION_UNSPECIFIED","enum":["VOTE_OPTION_UNSPECIFIED","VOTE_OPTION_YES","VOTE_OPTION_ABSTAIN","VOTE_OPTION_NO","VOTE_OPTION_NO_WITH_VETO"]},"cosmos.gov.v1.VotingParams":{"description":"VotingParams defines the params for voting on governance proposals.","type":"object","properties":{"voting_period":{"description":"Duration of the voting period.","type":"string"}}},"cosmos.gov.v1.WeightedVoteOption":{"description":"WeightedVoteOption defines a unit of vote for vote split.","type":"object","properties":{"option":{"description":"option defines the valid vote options, it must not contain duplicate vote options.","$ref":"#/definitions/cosmos.gov.v1.VoteOption"},"weight":{"description":"weight is the vote weight associated with the vote option.","type":"string"}}},"cosmos.gov.v1beta1.Deposit":{"description":"Deposit defines an amount deposited by an account address to an active\nproposal.","type":"object","properties":{"amount":{"description":"amount to be deposited by depositor.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"depositor":{"description":"depositor defines the deposit addresses from the proposals.","type":"string"},"proposal_id":{"description":"proposal_id defines the unique id of the proposal.","type":"string","format":"uint64"}}},"cosmos.gov.v1beta1.DepositParams":{"description":"DepositParams defines the params for deposits on governance proposals.","type":"object","properties":{"max_deposit_period":{"description":"Maximum period for Atom holders to deposit on a proposal. Initial value: 2\nmonths.","type":"string"},"min_deposit":{"description":"Minimum deposit for a proposal to enter voting period.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}}},"cosmos.gov.v1beta1.Proposal":{"description":"Proposal defines the core field members of a governance proposal.","type":"object","properties":{"content":{"description":"content is the proposal's content.","$ref":"#/definitions/google.protobuf.Any"},"deposit_end_time":{"description":"deposit_end_time is the end time for deposition.","type":"string","format":"date-time"},"final_tally_result":{"description":"final_tally_result is the final tally result of the proposal. When\nquerying a proposal via gRPC, this field is not populated until the\nproposal's voting period has ended.","$ref":"#/definitions/cosmos.gov.v1beta1.TallyResult"},"proposal_id":{"description":"proposal_id defines the unique id of the proposal.","type":"string","format":"uint64"},"status":{"description":"status defines the proposal status.","$ref":"#/definitions/cosmos.gov.v1beta1.ProposalStatus"},"submit_time":{"description":"submit_time is the time of proposal submission.","type":"string","format":"date-time"},"total_deposit":{"description":"total_deposit is the total deposit on the proposal.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"voting_end_time":{"description":"voting_end_time is the end time of voting on a proposal.","type":"string","format":"date-time"},"voting_start_time":{"description":"voting_start_time is the starting time to vote on a proposal.","type":"string","format":"date-time"}}},"cosmos.gov.v1beta1.ProposalStatus":{"description":"ProposalStatus enumerates the valid statuses of a proposal.\n\n - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status.\n - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit\nperiod.\n - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting\nperiod.\n - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has\npassed.\n - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has\nbeen rejected.\n - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has\nfailed.","type":"string","default":"PROPOSAL_STATUS_UNSPECIFIED","enum":["PROPOSAL_STATUS_UNSPECIFIED","PROPOSAL_STATUS_DEPOSIT_PERIOD","PROPOSAL_STATUS_VOTING_PERIOD","PROPOSAL_STATUS_PASSED","PROPOSAL_STATUS_REJECTED","PROPOSAL_STATUS_FAILED"]},"cosmos.gov.v1beta1.QueryDepositResponse":{"description":"QueryDepositResponse is the response type for the Query/Deposit RPC method.","type":"object","properties":{"deposit":{"description":"deposit defines the requested deposit.","$ref":"#/definitions/cosmos.gov.v1beta1.Deposit"}}},"cosmos.gov.v1beta1.QueryDepositsResponse":{"description":"QueryDepositsResponse is the response type for the Query/Deposits RPC method.","type":"object","properties":{"deposits":{"description":"deposits defines the requested deposits.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.gov.v1beta1.Deposit"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.gov.v1beta1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"deposit_params":{"description":"deposit_params defines the parameters related to deposit.","$ref":"#/definitions/cosmos.gov.v1beta1.DepositParams"},"tally_params":{"description":"tally_params defines the parameters related to tally.","$ref":"#/definitions/cosmos.gov.v1beta1.TallyParams"},"voting_params":{"description":"voting_params defines the parameters related to voting.","$ref":"#/definitions/cosmos.gov.v1beta1.VotingParams"}}},"cosmos.gov.v1beta1.QueryProposalResponse":{"description":"QueryProposalResponse is the response type for the Query/Proposal RPC method.","type":"object","properties":{"proposal":{"$ref":"#/definitions/cosmos.gov.v1beta1.Proposal"}}},"cosmos.gov.v1beta1.QueryProposalsResponse":{"description":"QueryProposalsResponse is the response type for the Query/Proposals RPC\nmethod.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"proposals":{"description":"proposals defines all the requested governance proposals.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.gov.v1beta1.Proposal"}}}},"cosmos.gov.v1beta1.QueryTallyResultResponse":{"description":"QueryTallyResultResponse is the response type for the Query/Tally RPC method.","type":"object","properties":{"tally":{"description":"tally defines the requested tally.","$ref":"#/definitions/cosmos.gov.v1beta1.TallyResult"}}},"cosmos.gov.v1beta1.QueryVoteResponse":{"description":"QueryVoteResponse is the response type for the Query/Vote RPC method.","type":"object","properties":{"vote":{"description":"vote defines the queried vote.","$ref":"#/definitions/cosmos.gov.v1beta1.Vote"}}},"cosmos.gov.v1beta1.QueryVotesResponse":{"description":"QueryVotesResponse is the response type for the Query/Votes RPC method.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"votes":{"description":"votes defines the queried votes.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.gov.v1beta1.Vote"}}}},"cosmos.gov.v1beta1.TallyParams":{"description":"TallyParams defines the params for tallying votes on governance proposals.","type":"object","properties":{"quorum":{"description":"Minimum percentage of total stake needed to vote for a result to be\nconsidered valid.","type":"string","format":"byte"},"threshold":{"description":"Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.","type":"string","format":"byte"},"veto_threshold":{"description":"Minimum value of Veto votes to Total votes ratio for proposal to be\nvetoed. Default value: 1/3.","type":"string","format":"byte"}}},"cosmos.gov.v1beta1.TallyResult":{"description":"TallyResult defines a standard tally for a governance proposal.","type":"object","properties":{"abstain":{"description":"abstain is the number of abstain votes on a proposal.","type":"string"},"no":{"description":"no is the number of no votes on a proposal.","type":"string"},"no_with_veto":{"description":"no_with_veto is the number of no with veto votes on a proposal.","type":"string"},"yes":{"description":"yes is the number of yes votes on a proposal.","type":"string"}}},"cosmos.gov.v1beta1.Vote":{"description":"Vote defines a vote on a governance proposal.\nA Vote consists of a proposal ID, the voter, and the vote option.","type":"object","properties":{"option":{"description":"Deprecated: Prefer to use `options` instead. This field is set in queries\nif and only if `len(options) == 1` and that option has weight 1. In all\nother cases, this field will default to VOTE_OPTION_UNSPECIFIED.","$ref":"#/definitions/cosmos.gov.v1beta1.VoteOption"},"options":{"description":"options is the weighted vote options.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.gov.v1beta1.WeightedVoteOption"}},"proposal_id":{"description":"proposal_id defines the unique id of the proposal.","type":"string","format":"uint64"},"voter":{"description":"voter is the voter address of the proposal.","type":"string"}}},"cosmos.gov.v1beta1.VoteOption":{"description":"VoteOption enumerates the valid vote options for a given governance proposal.\n\n - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option.\n - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option.\n - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option.\n - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option.\n - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option.","type":"string","default":"VOTE_OPTION_UNSPECIFIED","enum":["VOTE_OPTION_UNSPECIFIED","VOTE_OPTION_YES","VOTE_OPTION_ABSTAIN","VOTE_OPTION_NO","VOTE_OPTION_NO_WITH_VETO"]},"cosmos.gov.v1beta1.VotingParams":{"description":"VotingParams defines the params for voting on governance proposals.","type":"object","properties":{"voting_period":{"description":"Duration of the voting period.","type":"string"}}},"cosmos.gov.v1beta1.WeightedVoteOption":{"description":"WeightedVoteOption defines a unit of vote for vote split.","type":"object","properties":{"option":{"description":"option defines the valid vote options, it must not contain duplicate vote options.","$ref":"#/definitions/cosmos.gov.v1beta1.VoteOption"},"weight":{"description":"weight is the vote weight associated with the vote option.","type":"string"}}},"cosmos.group.v1.GroupInfo":{"description":"GroupInfo represents the high-level on-chain information for a group.","type":"object","properties":{"admin":{"description":"admin is the account address of the group's admin.","type":"string"},"created_at":{"description":"created_at is a timestamp specifying when a group was created.","type":"string","format":"date-time"},"id":{"description":"id is the unique ID of the group.","type":"string","format":"uint64"},"metadata":{"type":"string","title":"metadata is any arbitrary metadata to attached to the group.\nthe recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#group-1"},"total_weight":{"description":"total_weight is the sum of the group members' weights.","type":"string"},"version":{"type":"string","format":"uint64","title":"version is used to track changes to a group's membership structure that\nwould break existing proposals. Whenever any members weight is changed,\nor any member is added or removed this version is incremented and will\ncause proposals based on older versions of this group to fail"}}},"cosmos.group.v1.GroupMember":{"description":"GroupMember represents the relationship between a group and a member.","type":"object","properties":{"group_id":{"description":"group_id is the unique ID of the group.","type":"string","format":"uint64"},"member":{"description":"member is the member data.","$ref":"#/definitions/cosmos.group.v1.Member"}}},"cosmos.group.v1.GroupPolicyInfo":{"description":"GroupPolicyInfo represents the high-level on-chain information for a group policy.","type":"object","properties":{"address":{"description":"address is the account address of group policy.","type":"string"},"admin":{"description":"admin is the account address of the group admin.","type":"string"},"created_at":{"description":"created_at is a timestamp specifying when a group policy was created.","type":"string","format":"date-time"},"decision_policy":{"description":"decision_policy specifies the group policy's decision policy.","$ref":"#/definitions/google.protobuf.Any"},"group_id":{"description":"group_id is the unique ID of the group.","type":"string","format":"uint64"},"metadata":{"type":"string","title":"metadata is any arbitrary metadata attached to the group policy.\nthe recommended format of the metadata is to be found here:\nhttps://docs.cosmos.network/v0.47/modules/group#decision-policy-1"},"version":{"description":"version is used to track changes to a group's GroupPolicyInfo structure that\nwould create a different result on a running proposal.","type":"string","format":"uint64"}}},"cosmos.group.v1.Member":{"description":"Member represents a group member with an account address,\nnon-zero weight, metadata and added_at timestamp.","type":"object","properties":{"added_at":{"description":"added_at is a timestamp specifying when a member was added.","type":"string","format":"date-time"},"address":{"description":"address is the member's account address.","type":"string"},"metadata":{"description":"metadata is any arbitrary metadata attached to the member.","type":"string"},"weight":{"description":"weight is the member's voting weight that should be greater than 0.","type":"string"}}},"cosmos.group.v1.Proposal":{"description":"Proposal defines a group proposal. Any member of a group can submit a proposal\nfor a group policy to decide upon.\nA proposal consists of a set of `sdk.Msg`s that will be executed if the proposal\npasses as well as some optional metadata associated with the proposal.","type":"object","properties":{"executor_result":{"description":"executor_result is the final result of the proposal execution. Initial value is NotRun.","$ref":"#/definitions/cosmos.group.v1.ProposalExecutorResult"},"final_tally_result":{"description":"final_tally_result contains the sums of all weighted votes for this\nproposal for each vote option. It is empty at submission, and only\npopulated after tallying, at voting period end or at proposal execution,\nwhichever happens first.","$ref":"#/definitions/cosmos.group.v1.TallyResult"},"group_policy_address":{"description":"group_policy_address is the account address of group policy.","type":"string"},"group_policy_version":{"description":"group_policy_version tracks the version of the group policy at proposal submission.\nWhen a decision policy is changed, existing proposals from previous policy\nversions will become invalid with the `ABORTED` status.\nThis field is here for informational purposes only.","type":"string","format":"uint64"},"group_version":{"description":"group_version tracks the version of the group at proposal submission.\nThis field is here for informational purposes only.","type":"string","format":"uint64"},"id":{"description":"id is the unique id of the proposal.","type":"string","format":"uint64"},"messages":{"description":"messages is a list of `sdk.Msg`s that will be executed if the proposal passes.","type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"metadata":{"type":"string","title":"metadata is any arbitrary metadata attached to the proposal.\nthe recommended format of the metadata is to be found here:\nhttps://docs.cosmos.network/v0.47/modules/group#proposal-4"},"proposers":{"description":"proposers are the account addresses of the proposers.","type":"array","items":{"type":"string"}},"status":{"description":"status represents the high level position in the life cycle of the proposal. Initial value is Submitted.","$ref":"#/definitions/cosmos.group.v1.ProposalStatus"},"submit_time":{"description":"submit_time is a timestamp specifying when a proposal was submitted.","type":"string","format":"date-time"},"summary":{"type":"string","title":"summary is a short summary of the proposal"},"title":{"type":"string","title":"title is the title of the proposal"},"voting_period_end":{"description":"voting_period_end is the timestamp before which voting must be done.\nUnless a successful MsgExec is called before (to execute a proposal whose\ntally is successful before the voting period ends), tallying will be done\nat this point, and the `final_tally_result`and `status` fields will be\naccordingly updated.","type":"string","format":"date-time"}}},"cosmos.group.v1.ProposalExecutorResult":{"description":"ProposalExecutorResult defines types of proposal executor results.\n\n - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED: An empty value is not allowed.\n - PROPOSAL_EXECUTOR_RESULT_NOT_RUN: We have not yet run the executor.\n - PROPOSAL_EXECUTOR_RESULT_SUCCESS: The executor was successful and proposed action updated state.\n - PROPOSAL_EXECUTOR_RESULT_FAILURE: The executor returned an error and proposed action didn't update state.","type":"string","default":"PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED","enum":["PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED","PROPOSAL_EXECUTOR_RESULT_NOT_RUN","PROPOSAL_EXECUTOR_RESULT_SUCCESS","PROPOSAL_EXECUTOR_RESULT_FAILURE"]},"cosmos.group.v1.ProposalStatus":{"description":"ProposalStatus defines proposal statuses.\n\n - PROPOSAL_STATUS_UNSPECIFIED: An empty value is invalid and not allowed.\n - PROPOSAL_STATUS_SUBMITTED: Initial status of a proposal when submitted.\n - PROPOSAL_STATUS_ACCEPTED: Final status of a proposal when the final tally is done and the outcome\npasses the group policy's decision policy.\n - PROPOSAL_STATUS_REJECTED: Final status of a proposal when the final tally is done and the outcome\nis rejected by the group policy's decision policy.\n - PROPOSAL_STATUS_ABORTED: Final status of a proposal when the group policy is modified before the\nfinal tally.\n - PROPOSAL_STATUS_WITHDRAWN: A proposal can be withdrawn before the voting start time by the owner.\nWhen this happens the final status is Withdrawn.","type":"string","default":"PROPOSAL_STATUS_UNSPECIFIED","enum":["PROPOSAL_STATUS_UNSPECIFIED","PROPOSAL_STATUS_SUBMITTED","PROPOSAL_STATUS_ACCEPTED","PROPOSAL_STATUS_REJECTED","PROPOSAL_STATUS_ABORTED","PROPOSAL_STATUS_WITHDRAWN"]},"cosmos.group.v1.QueryGroupInfoResponse":{"description":"QueryGroupInfoResponse is the Query/GroupInfo response type.","type":"object","properties":{"info":{"description":"info is the GroupInfo of the group.","$ref":"#/definitions/cosmos.group.v1.GroupInfo"}}},"cosmos.group.v1.QueryGroupMembersResponse":{"description":"QueryGroupMembersResponse is the Query/GroupMembersResponse response type.","type":"object","properties":{"members":{"description":"members are the members of the group with given group_id.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.GroupMember"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.group.v1.QueryGroupPoliciesByAdminResponse":{"description":"QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type.","type":"object","properties":{"group_policies":{"description":"group_policies are the group policies info with provided admin.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.GroupPolicyInfo"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.group.v1.QueryGroupPoliciesByGroupResponse":{"description":"QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type.","type":"object","properties":{"group_policies":{"description":"group_policies are the group policies info associated with the provided group.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.GroupPolicyInfo"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.group.v1.QueryGroupPolicyInfoResponse":{"description":"QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type.","type":"object","properties":{"info":{"description":"info is the GroupPolicyInfo of the group policy.","$ref":"#/definitions/cosmos.group.v1.GroupPolicyInfo"}}},"cosmos.group.v1.QueryGroupsByAdminResponse":{"description":"QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type.","type":"object","properties":{"groups":{"description":"groups are the groups info with the provided admin.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.GroupInfo"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.group.v1.QueryGroupsByMemberResponse":{"description":"QueryGroupsByMemberResponse is the Query/GroupsByMember response type.","type":"object","properties":{"groups":{"description":"groups are the groups info with the provided group member.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.GroupInfo"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.group.v1.QueryGroupsResponse":{"description":"QueryGroupsResponse is the Query/Groups response type.","type":"object","properties":{"groups":{"description":"`groups` is all the groups present in state.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.GroupInfo"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.group.v1.QueryProposalResponse":{"description":"QueryProposalResponse is the Query/Proposal response type.","type":"object","properties":{"proposal":{"description":"proposal is the proposal info.","$ref":"#/definitions/cosmos.group.v1.Proposal"}}},"cosmos.group.v1.QueryProposalsByGroupPolicyResponse":{"description":"QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"proposals":{"description":"proposals are the proposals with given group policy.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.Proposal"}}}},"cosmos.group.v1.QueryTallyResultResponse":{"description":"QueryTallyResultResponse is the Query/TallyResult response type.","type":"object","properties":{"tally":{"description":"tally defines the requested tally.","$ref":"#/definitions/cosmos.group.v1.TallyResult"}}},"cosmos.group.v1.QueryVoteByProposalVoterResponse":{"description":"QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type.","type":"object","properties":{"vote":{"description":"vote is the vote with given proposal_id and voter.","$ref":"#/definitions/cosmos.group.v1.Vote"}}},"cosmos.group.v1.QueryVotesByProposalResponse":{"description":"QueryVotesByProposalResponse is the Query/VotesByProposal response type.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"votes":{"description":"votes are the list of votes for given proposal_id.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.Vote"}}}},"cosmos.group.v1.QueryVotesByVoterResponse":{"description":"QueryVotesByVoterResponse is the Query/VotesByVoter response type.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"votes":{"description":"votes are the list of votes by given voter.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.group.v1.Vote"}}}},"cosmos.group.v1.TallyResult":{"description":"TallyResult represents the sum of weighted votes for each vote option.","type":"object","properties":{"abstain_count":{"description":"abstain_count is the weighted sum of abstainers.","type":"string"},"no_count":{"description":"no_count is the weighted sum of no votes.","type":"string"},"no_with_veto_count":{"description":"no_with_veto_count is the weighted sum of veto.","type":"string"},"yes_count":{"description":"yes_count is the weighted sum of yes votes.","type":"string"}}},"cosmos.group.v1.Vote":{"type":"object","title":"Vote represents a vote for a proposal.string metadata","properties":{"metadata":{"type":"string","title":"metadata is any arbitrary metadata attached to the vote.\nthe recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#vote-2"},"option":{"description":"option is the voter's choice on the proposal.","$ref":"#/definitions/cosmos.group.v1.VoteOption"},"proposal_id":{"description":"proposal is the unique ID of the proposal.","type":"string","format":"uint64"},"submit_time":{"description":"submit_time is the timestamp when the vote was submitted.","type":"string","format":"date-time"},"voter":{"description":"voter is the account address of the voter.","type":"string"}}},"cosmos.group.v1.VoteOption":{"description":"VoteOption enumerates the valid vote options for a given proposal.\n\n - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will\nreturn an error.\n - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option.\n - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option.\n - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option.\n - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option.","type":"string","default":"VOTE_OPTION_UNSPECIFIED","enum":["VOTE_OPTION_UNSPECIFIED","VOTE_OPTION_YES","VOTE_OPTION_ABSTAIN","VOTE_OPTION_NO","VOTE_OPTION_NO_WITH_VETO"]},"cosmos.mint.v1beta1.Params":{"description":"Params defines the parameters for the x/mint module.","type":"object","properties":{"blocks_per_year":{"type":"string","format":"uint64","title":"expected blocks per year"},"goal_bonded":{"type":"string","title":"goal of percent bonded atoms"},"inflation_max":{"type":"string","title":"maximum inflation rate"},"inflation_min":{"type":"string","title":"minimum inflation rate"},"inflation_rate_change":{"type":"string","title":"maximum annual change in inflation rate"},"mint_denom":{"type":"string","title":"type of coin to mint"}}},"cosmos.mint.v1beta1.QueryAnnualProvisionsResponse":{"description":"QueryAnnualProvisionsResponse is the response type for the\nQuery/AnnualProvisions RPC method.","type":"object","properties":{"annual_provisions":{"description":"annual_provisions is the current minting annual provisions value.","type":"string","format":"byte"}}},"cosmos.mint.v1beta1.QueryInflationResponse":{"description":"QueryInflationResponse is the response type for the Query/Inflation RPC\nmethod.","type":"object","properties":{"inflation":{"description":"inflation is the current minting inflation value.","type":"string","format":"byte"}}},"cosmos.mint.v1beta1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params defines the parameters of the module.","$ref":"#/definitions/cosmos.mint.v1beta1.Params"}}},"cosmos.nft.v1beta1.Class":{"description":"Class defines the class of the nft type.","type":"object","properties":{"data":{"title":"data is the app specific metadata of the NFT class. Optional","$ref":"#/definitions/google.protobuf.Any"},"description":{"type":"string","title":"description is a brief description of nft classification. Optional"},"id":{"type":"string","title":"id defines the unique identifier of the NFT classification, similar to the contract address of ERC721"},"name":{"type":"string","title":"name defines the human-readable name of the NFT classification. Optional"},"symbol":{"type":"string","title":"symbol is an abbreviated name for nft classification. Optional"},"uri":{"type":"string","title":"uri for the class metadata stored off chain. It can define schema for Class and NFT `Data` attributes. Optional"},"uri_hash":{"type":"string","title":"uri_hash is a hash of the document pointed by uri. Optional"}}},"cosmos.nft.v1beta1.NFT":{"description":"NFT defines the NFT.","type":"object","properties":{"class_id":{"type":"string","title":"class_id associated with the NFT, similar to the contract address of ERC721"},"data":{"title":"data is an app specific data of the NFT. Optional","$ref":"#/definitions/google.protobuf.Any"},"id":{"type":"string","title":"id is a unique identifier of the NFT"},"uri":{"type":"string","title":"uri for the NFT metadata stored off chain"},"uri_hash":{"type":"string","title":"uri_hash is a hash of the document pointed by uri"}}},"cosmos.nft.v1beta1.QueryBalanceResponse":{"type":"object","title":"QueryBalanceResponse is the response type for the Query/Balance RPC method","properties":{"amount":{"type":"string","format":"uint64","title":"amount is the number of all NFTs of a given class owned by the owner"}}},"cosmos.nft.v1beta1.QueryClassResponse":{"type":"object","title":"QueryClassResponse is the response type for the Query/Class RPC method","properties":{"class":{"description":"class defines the class of the nft type.","$ref":"#/definitions/cosmos.nft.v1beta1.Class"}}},"cosmos.nft.v1beta1.QueryClassesResponse":{"type":"object","title":"QueryClassesResponse is the response type for the Query/Classes RPC method","properties":{"classes":{"description":"class defines the class of the nft type.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.nft.v1beta1.Class"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.nft.v1beta1.QueryNFTResponse":{"type":"object","title":"QueryNFTResponse is the response type for the Query/NFT RPC method","properties":{"nft":{"title":"owner is the owner address of the nft","$ref":"#/definitions/cosmos.nft.v1beta1.NFT"}}},"cosmos.nft.v1beta1.QueryNFTsResponse":{"type":"object","title":"QueryNFTsResponse is the response type for the Query/NFTs RPC methods","properties":{"nfts":{"type":"array","title":"NFT defines the NFT","items":{"type":"object","$ref":"#/definitions/cosmos.nft.v1beta1.NFT"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.nft.v1beta1.QueryOwnerResponse":{"type":"object","title":"QueryOwnerResponse is the response type for the Query/Owner RPC method","properties":{"owner":{"type":"string","title":"owner is the owner address of the nft"}}},"cosmos.nft.v1beta1.QuerySupplyResponse":{"type":"object","title":"QuerySupplyResponse is the response type for the Query/Supply RPC method","properties":{"amount":{"type":"string","format":"uint64","title":"amount is the number of all NFTs from the given class"}}},"cosmos.params.v1beta1.ParamChange":{"description":"ParamChange defines an individual parameter change, for use in\nParameterChangeProposal.","type":"object","properties":{"key":{"type":"string"},"subspace":{"type":"string"},"value":{"type":"string"}}},"cosmos.params.v1beta1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"param":{"description":"param defines the queried parameter.","$ref":"#/definitions/cosmos.params.v1beta1.ParamChange"}}},"cosmos.params.v1beta1.QuerySubspacesResponse":{"description":"QuerySubspacesResponse defines the response types for querying for all\nregistered subspaces and all keys for a subspace.","type":"object","properties":{"subspaces":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.params.v1beta1.Subspace"}}}},"cosmos.params.v1beta1.Subspace":{"description":"Subspace defines a parameter subspace name and all the keys that exist for\nthe subspace.","type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}},"subspace":{"type":"string"}}},"cosmos.protocolpool.v1.ContinuousFund":{"description":"ContinuousFund defines the fields of continuous fund proposal.","type":"object","properties":{"expiry":{"description":"Optional, if expiry is set, removes the state object when expired.","type":"string","format":"date-time"},"percentage":{"description":"Percentage is the percentage of funds to be allocated from Community pool.","type":"string"},"recipient":{"description":"Recipient is the address string of the account receiving funds.","type":"string"}}},"cosmos.protocolpool.v1.Params":{"description":"Params defines the parameters for the protocolpool module.","type":"object","properties":{"distribution_frequency":{"description":"DistributionFrequency is the frequency (in terms of blocks) that funds are distributed out from the\nx/protocolpool module.","type":"string","format":"uint64"},"enabled_distribution_denoms":{"description":"EnabledDistributionDenoms lists the denoms that are allowed to be distributed.\nThis is to avoid spending time distributing undesired tokens to continuous funds and budgets.","type":"array","items":{"type":"string"}}}},"cosmos.protocolpool.v1.QueryCommunityPoolResponse":{"description":"QueryCommunityPoolResponse is the response type for the Query/CommunityPool\nRPC method.","type":"object","properties":{"pool":{"description":"pool defines community pool's coins.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}}},"cosmos.protocolpool.v1.QueryContinuousFundResponse":{"description":"QueryUnclaimedBudgetResponse is the response type for the Query/ContinuousFund\nRPC method.","type":"object","properties":{"continuous_fund":{"description":"ContinuousFunds is the given continuous fund returned in the query.","$ref":"#/definitions/cosmos.protocolpool.v1.ContinuousFund"}}},"cosmos.protocolpool.v1.QueryContinuousFundsResponse":{"description":"QueryUnclaimedBudgetResponse is the response type for the Query/ContinuousFunds\nRPC method.","type":"object","properties":{"continuous_funds":{"description":"ContinuousFunds defines all continuous funds in state.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.protocolpool.v1.ContinuousFund"}}}},"cosmos.protocolpool.v1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"params":{"$ref":"#/definitions/cosmos.protocolpool.v1.Params"}}},"cosmos.slashing.v1beta1.Params":{"description":"Params represents the parameters used for by the slashing module.","type":"object","properties":{"downtime_jail_duration":{"type":"string"},"min_signed_per_window":{"type":"string","format":"byte"},"signed_blocks_window":{"type":"string","format":"int64"},"slash_fraction_double_sign":{"type":"string","format":"byte"},"slash_fraction_downtime":{"type":"string","format":"byte"}}},"cosmos.slashing.v1beta1.QueryParamsResponse":{"type":"object","title":"QueryParamsResponse is the response type for the Query/Params RPC method","properties":{"params":{"$ref":"#/definitions/cosmos.slashing.v1beta1.Params"}}},"cosmos.slashing.v1beta1.QuerySigningInfoResponse":{"type":"object","title":"QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC\nmethod","properties":{"val_signing_info":{"title":"val_signing_info is the signing info of requested val cons address","$ref":"#/definitions/cosmos.slashing.v1beta1.ValidatorSigningInfo"}}},"cosmos.slashing.v1beta1.QuerySigningInfosResponse":{"type":"object","title":"QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC\nmethod","properties":{"info":{"type":"array","title":"info is the signing info of all validators","items":{"type":"object","$ref":"#/definitions/cosmos.slashing.v1beta1.ValidatorSigningInfo"}},"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.slashing.v1beta1.ValidatorSigningInfo":{"description":"ValidatorSigningInfo defines a validator's signing info for monitoring their\nliveness activity.","type":"object","properties":{"address":{"type":"string"},"index_offset":{"description":"Index which is incremented every time a validator is bonded in a block and\n_may_ have signed a pre-commit or not. This in conjunction with the\nsigned_blocks_window param determines the index in the missed block bitmap.","type":"string","format":"int64"},"jailed_until":{"description":"Timestamp until which the validator is jailed due to liveness downtime.","type":"string","format":"date-time"},"missed_blocks_counter":{"description":"A counter of missed (unsigned) blocks. It is used to avoid unnecessary\nreads in the missed block bitmap.","type":"string","format":"int64"},"start_height":{"type":"string","format":"int64","title":"Height at which validator was first a candidate OR was un-jailed"},"tombstoned":{"description":"Whether or not a validator has been tombstoned (killed out of validator\nset). It is set once the validator commits an equivocation or for any other\nconfigured misbehavior.","type":"boolean"}}},"cosmos.staking.v1beta1.BondStatus":{"description":"BondStatus is the status of a validator.\n\n - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status.\n - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded.\n - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding.\n - BOND_STATUS_BONDED: BONDED defines a validator that is bonded.","type":"string","default":"BOND_STATUS_UNSPECIFIED","enum":["BOND_STATUS_UNSPECIFIED","BOND_STATUS_UNBONDED","BOND_STATUS_UNBONDING","BOND_STATUS_BONDED"]},"cosmos.staking.v1beta1.Commission":{"description":"Commission defines commission parameters for a given validator.","type":"object","properties":{"commission_rates":{"description":"commission_rates defines the initial commission rates to be used for creating a validator.","$ref":"#/definitions/cosmos.staking.v1beta1.CommissionRates"},"update_time":{"description":"update_time is the last time the commission rate was changed.","type":"string","format":"date-time"}}},"cosmos.staking.v1beta1.CommissionRates":{"description":"CommissionRates defines the initial commission rates to be used for creating\na validator.","type":"object","properties":{"max_change_rate":{"description":"max_change_rate defines the maximum daily increase of the validator commission, as a fraction.","type":"string"},"max_rate":{"description":"max_rate defines the maximum commission rate which validator can ever charge, as a fraction.","type":"string"},"rate":{"description":"rate is the commission rate charged to delegators, as a fraction.","type":"string"}}},"cosmos.staking.v1beta1.Delegation":{"description":"Delegation represents the bond with tokens held by an account. It is\nowned by one delegator, and is associated with the voting power of one\nvalidator.","type":"object","properties":{"delegator_address":{"description":"delegator_address is the encoded address of the delegator.","type":"string"},"shares":{"description":"shares define the delegation shares received.","type":"string"},"validator_address":{"description":"validator_address is the encoded address of the validator.","type":"string"}}},"cosmos.staking.v1beta1.DelegationResponse":{"description":"DelegationResponse is equivalent to Delegation except that it contains a\nbalance in addition to shares which is more suitable for client responses.","type":"object","properties":{"balance":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"},"delegation":{"$ref":"#/definitions/cosmos.staking.v1beta1.Delegation"}}},"cosmos.staking.v1beta1.Description":{"description":"Description defines a validator description.","type":"object","properties":{"details":{"description":"details define other optional details.","type":"string"},"identity":{"description":"identity defines an optional identity signature (ex. UPort or Keybase).","type":"string"},"moniker":{"description":"moniker defines a human-readable name for the validator.","type":"string"},"security_contact":{"description":"security_contact defines an optional email for security contact.","type":"string"},"website":{"description":"website defines an optional website link.","type":"string"}}},"cosmos.staking.v1beta1.HistoricalInfo":{"description":"HistoricalInfo contains header and validator information for a given block.\nIt is stored as part of staking module's state, which persists the `n` most\nrecent HistoricalInfo\n(`n` is set by the staking module's `historical_entries` parameter).","type":"object","properties":{"header":{"$ref":"#/definitions/tendermint.types.Header"},"valset":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.Validator"}}}},"cosmos.staking.v1beta1.Params":{"description":"Params defines the parameters for the x/staking module.","type":"object","properties":{"bond_denom":{"description":"bond_denom defines the bondable coin denomination.","type":"string"},"historical_entries":{"description":"historical_entries is the number of historical entries to persist.","type":"integer","format":"int64"},"max_entries":{"description":"max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio).","type":"integer","format":"int64"},"max_validators":{"description":"max_validators is the maximum number of validators.","type":"integer","format":"int64"},"min_commission_rate":{"type":"string","title":"min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators"},"unbonding_time":{"description":"unbonding_time is the time duration of unbonding.","type":"string"}}},"cosmos.staking.v1beta1.Pool":{"description":"Pool is used for tracking bonded and not-bonded token supply of the bond\ndenomination.","type":"object","properties":{"bonded_tokens":{"type":"string"},"not_bonded_tokens":{"type":"string"}}},"cosmos.staking.v1beta1.QueryDelegationResponse":{"description":"QueryDelegationResponse is response type for the Query/Delegation RPC method.","type":"object","properties":{"delegation_response":{"description":"delegation_responses defines the delegation info of a delegation.","$ref":"#/definitions/cosmos.staking.v1beta1.DelegationResponse"}}},"cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse":{"description":"QueryDelegatorDelegationsResponse is response type for the\nQuery/DelegatorDelegations RPC method.","type":"object","properties":{"delegation_responses":{"description":"delegation_responses defines all the delegations' info of a delegator.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.DelegationResponse"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse":{"description":"QueryUnbondingDelegatorDelegationsResponse is response type for the\nQuery/UnbondingDelegatorDelegations RPC method.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"unbonding_responses":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.UnbondingDelegation"}}}},"cosmos.staking.v1beta1.QueryDelegatorValidatorResponse":{"description":"QueryDelegatorValidatorResponse response type for the\nQuery/DelegatorValidator RPC method.","type":"object","properties":{"validator":{"description":"validator defines the validator info.","$ref":"#/definitions/cosmos.staking.v1beta1.Validator"}}},"cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse":{"description":"QueryDelegatorValidatorsResponse is response type for the\nQuery/DelegatorValidators RPC method.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"validators":{"description":"validators defines the validators' info of a delegator.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.Validator"}}}},"cosmos.staking.v1beta1.QueryHistoricalInfoResponse":{"description":"QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC\nmethod.","type":"object","properties":{"hist":{"description":"hist defines the historical info at the given height.","$ref":"#/definitions/cosmos.staking.v1beta1.HistoricalInfo"}}},"cosmos.staking.v1beta1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/cosmos.staking.v1beta1.Params"}}},"cosmos.staking.v1beta1.QueryPoolResponse":{"description":"QueryPoolResponse is response type for the Query/Pool RPC method.","type":"object","properties":{"pool":{"description":"pool defines the pool info.","$ref":"#/definitions/cosmos.staking.v1beta1.Pool"}}},"cosmos.staking.v1beta1.QueryRedelegationsResponse":{"description":"QueryRedelegationsResponse is response type for the Query/Redelegations RPC\nmethod.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"redelegation_responses":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.RedelegationResponse"}}}},"cosmos.staking.v1beta1.QueryUnbondingDelegationResponse":{"description":"QueryDelegationResponse is response type for the Query/UnbondingDelegation\nRPC method.","type":"object","properties":{"unbond":{"description":"unbond defines the unbonding information of a delegation.","$ref":"#/definitions/cosmos.staking.v1beta1.UnbondingDelegation"}}},"cosmos.staking.v1beta1.QueryValidatorDelegationsResponse":{"type":"object","title":"QueryValidatorDelegationsResponse is response type for the\nQuery/ValidatorDelegations RPC method","properties":{"delegation_responses":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.DelegationResponse"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"cosmos.staking.v1beta1.QueryValidatorResponse":{"type":"object","title":"QueryValidatorResponse is response type for the Query/Validator RPC method","properties":{"validator":{"description":"validator defines the validator info.","$ref":"#/definitions/cosmos.staking.v1beta1.Validator"}}},"cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse":{"description":"QueryValidatorUnbondingDelegationsResponse is response type for the\nQuery/ValidatorUnbondingDelegations RPC method.","type":"object","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"unbonding_responses":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.UnbondingDelegation"}}}},"cosmos.staking.v1beta1.QueryValidatorsResponse":{"type":"object","title":"QueryValidatorsResponse is response type for the Query/Validators RPC method","properties":{"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"validators":{"description":"validators contains all the queried validators.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.Validator"}}}},"cosmos.staking.v1beta1.Redelegation":{"description":"Redelegation contains the list of a particular delegator's redelegating bonds\nfrom a particular source validator to a particular destination validator.","type":"object","properties":{"delegator_address":{"description":"delegator_address is the bech32-encoded address of the delegator.","type":"string"},"entries":{"description":"entries are the redelegation entries.\n\nredelegation entries","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.RedelegationEntry"}},"validator_dst_address":{"description":"validator_dst_address is the validator redelegation destination operator address.","type":"string"},"validator_src_address":{"description":"validator_src_address is the validator redelegation source operator address.","type":"string"}}},"cosmos.staking.v1beta1.RedelegationEntry":{"description":"RedelegationEntry defines a redelegation object with relevant metadata.","type":"object","properties":{"completion_time":{"description":"completion_time defines the unix time for redelegation completion.","type":"string","format":"date-time"},"creation_height":{"description":"creation_height defines the height which the redelegation took place.","type":"string","format":"int64"},"initial_balance":{"description":"initial_balance defines the initial balance when redelegation started.","type":"string"},"shares_dst":{"description":"shares_dst is the amount of destination-validator shares created by redelegation.","type":"string"},"unbonding_id":{"type":"string","format":"uint64","title":"Incrementing id that uniquely identifies this entry"},"unbonding_on_hold_ref_count":{"type":"string","format":"int64","title":"Strictly positive if this entry's unbonding has been stopped by external modules"}}},"cosmos.staking.v1beta1.RedelegationEntryResponse":{"description":"RedelegationEntryResponse is equivalent to a RedelegationEntry except that it\ncontains a balance in addition to shares which is more suitable for client\nresponses.","type":"object","properties":{"balance":{"type":"string"},"redelegation_entry":{"$ref":"#/definitions/cosmos.staking.v1beta1.RedelegationEntry"}}},"cosmos.staking.v1beta1.RedelegationResponse":{"description":"RedelegationResponse is equivalent to a Redelegation except that its entries\ncontain a balance in addition to shares which is more suitable for client\nresponses.","type":"object","properties":{"entries":{"type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.RedelegationEntryResponse"}},"redelegation":{"$ref":"#/definitions/cosmos.staking.v1beta1.Redelegation"}}},"cosmos.staking.v1beta1.UnbondingDelegation":{"description":"UnbondingDelegation stores all of a single delegator's unbonding bonds\nfor a single validator in an time-ordered list.","type":"object","properties":{"delegator_address":{"description":"delegator_address is the encoded address of the delegator.","type":"string"},"entries":{"description":"entries are the unbonding delegation entries.\n\nunbonding delegation entries","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.staking.v1beta1.UnbondingDelegationEntry"}},"validator_address":{"description":"validator_address is the encoded address of the validator.","type":"string"}}},"cosmos.staking.v1beta1.UnbondingDelegationEntry":{"description":"UnbondingDelegationEntry defines an unbonding object with relevant metadata.","type":"object","properties":{"balance":{"description":"balance defines the tokens to receive at completion.","type":"string"},"completion_time":{"description":"completion_time is the unix time for unbonding completion.","type":"string","format":"date-time"},"creation_height":{"description":"creation_height is the height which the unbonding took place.","type":"string","format":"int64"},"initial_balance":{"description":"initial_balance defines the tokens initially scheduled to receive at completion.","type":"string"},"unbonding_id":{"type":"string","format":"uint64","title":"Incrementing id that uniquely identifies this entry"},"unbonding_on_hold_ref_count":{"type":"string","format":"int64","title":"Strictly positive if this entry's unbonding has been stopped by external modules"}}},"cosmos.staking.v1beta1.Validator":{"description":"Validator defines a validator, together with the total amount of the\nValidator's bond shares and their exchange rate to coins. Slashing results in\na decrease in the exchange rate, allowing correct calculation of future\nundelegations without iterating over delegators. When coins are delegated to\nthis validator, the validator is credited with a delegation whose number of\nbond shares is based on the amount of coins delegated divided by the current\nexchange rate. Voting power can be calculated as total bonded shares\nmultiplied by exchange rate.","type":"object","properties":{"commission":{"description":"commission defines the commission parameters.","$ref":"#/definitions/cosmos.staking.v1beta1.Commission"},"consensus_pubkey":{"description":"consensus_pubkey is the consensus public key of the validator, as a Protobuf Any.","$ref":"#/definitions/google.protobuf.Any"},"delegator_shares":{"description":"delegator_shares defines total shares issued to a validator's delegators.","type":"string"},"description":{"description":"description defines the description terms for the validator.","$ref":"#/definitions/cosmos.staking.v1beta1.Description"},"jailed":{"description":"jailed defined whether the validator has been jailed from bonded status or not.","type":"boolean"},"min_self_delegation":{"description":"min_self_delegation is the validator's self declared minimum self delegation.","type":"string"},"operator_address":{"description":"operator_address defines the address of the validator's operator; bech encoded in JSON.","type":"string"},"status":{"description":"status is the validator status (bonded/unbonding/unbonded).","$ref":"#/definitions/cosmos.staking.v1beta1.BondStatus"},"tokens":{"description":"tokens define the delegated tokens (incl. self-delegation).","type":"string"},"unbonding_height":{"description":"unbonding_height defines, if unbonding, the height at which this validator has begun unbonding.","type":"string","format":"int64"},"unbonding_ids":{"type":"array","title":"list of unbonding ids, each uniquely identifing an unbonding of this validator","items":{"type":"string","format":"uint64"}},"unbonding_on_hold_ref_count":{"type":"string","format":"int64","title":"strictly positive if this validator's unbonding has been stopped by external modules"},"unbonding_time":{"description":"unbonding_time defines, if unbonding, the min time for the validator to complete unbonding.","type":"string","format":"date-time"}}},"cosmos.tx.signing.v1beta1.SignMode":{"description":"SignMode represents a signing mode with its own security guarantees.\n\nThis enum should be considered a registry of all known sign modes\nin the Cosmos ecosystem. Apps are not expected to support all known\nsign modes. Apps that would like to support custom sign modes are\nencouraged to open a small PR against this file to add a new case\nto this SignMode enum describing their sign mode so that different\napps have a consistent version of this enum.\n\n - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be\nrejected.\n - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is\nverified with raw bytes from Tx.\n - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some\nhuman-readable textual representation on top of the binary representation\nfrom SIGN_MODE_DIRECT.\n\nSince: cosmos-sdk 0.50\n - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses\nSignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not\nrequire signers signing over other signers' `signer_info`.\n\nSince: cosmos-sdk 0.46\n - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses\nAmino JSON and will be removed in the future.\n - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos\nSDK. Ref: https://eips.ethereum.org/EIPS/eip-191\n\nCurrently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant,\nbut is not implemented on the SDK by default. To enable EIP-191, you need\nto pass a custom `TxConfig` that has an implementation of\n`SignModeHandler` for EIP-191. The SDK may decide to fully support\nEIP-191 in the future.\n\nSince: cosmos-sdk 0.45.2","type":"string","default":"SIGN_MODE_UNSPECIFIED","enum":["SIGN_MODE_UNSPECIFIED","SIGN_MODE_DIRECT","SIGN_MODE_TEXTUAL","SIGN_MODE_DIRECT_AUX","SIGN_MODE_LEGACY_AMINO_JSON","SIGN_MODE_EIP_191"]},"cosmos.tx.v1beta1.AuthInfo":{"description":"AuthInfo describes the fee and signer modes that are used to sign a\ntransaction.","type":"object","properties":{"fee":{"description":"Fee is the fee and gas limit for the transaction. The first signer is the\nprimary signer and the one which pays the fee. The fee can be calculated\nbased on the cost of evaluating the body and doing signature verification\nof the signers. This can be estimated via simulation.","$ref":"#/definitions/cosmos.tx.v1beta1.Fee"},"signer_infos":{"description":"signer_infos defines the signing modes for the required signers. The number\nand order of elements must match the required signers from TxBody's\nmessages. The first element is the primary signer and the one which pays\nthe fee.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.tx.v1beta1.SignerInfo"}},"tip":{"description":"Tip is the optional tip used for transactions fees paid in another denom.\n\nThis field is ignored if the chain didn't enable tips, i.e. didn't add the\n`TipDecorator` in its posthandler.","$ref":"#/definitions/cosmos.tx.v1beta1.Tip"}}},"cosmos.tx.v1beta1.BroadcastMode":{"description":"BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC\nmethod.\n\n - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering\n - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead,\nBROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards.\n - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits\nfor a CheckTx execution response only.\n - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client\nreturns immediately.","type":"string","default":"BROADCAST_MODE_UNSPECIFIED","enum":["BROADCAST_MODE_UNSPECIFIED","BROADCAST_MODE_BLOCK","BROADCAST_MODE_SYNC","BROADCAST_MODE_ASYNC"]},"cosmos.tx.v1beta1.BroadcastTxRequest":{"description":"BroadcastTxRequest is the request type for the Service.BroadcastTxRequest\nRPC method.","type":"object","properties":{"mode":{"$ref":"#/definitions/cosmos.tx.v1beta1.BroadcastMode"},"tx_bytes":{"description":"tx_bytes is the raw transaction.","type":"string","format":"byte"}}},"cosmos.tx.v1beta1.BroadcastTxResponse":{"description":"BroadcastTxResponse is the response type for the\nService.BroadcastTx method.","type":"object","properties":{"tx_response":{"description":"tx_response is the queried TxResponses.","$ref":"#/definitions/cosmos.base.abci.v1beta1.TxResponse"}}},"cosmos.tx.v1beta1.Fee":{"description":"Fee includes the amount of coins paid in fees and the maximum\ngas to be used by the transaction. The ratio yields an effective \"gasprice\",\nwhich must be above some miminum to be accepted into the mempool.","type":"object","properties":{"amount":{"type":"array","title":"amount is the amount of coins to be paid as a fee","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"gas_limit":{"type":"string","format":"uint64","title":"gas_limit is the maximum gas that can be used in transaction processing\nbefore an out of gas error occurs"},"granter":{"type":"string","title":"if set, the fee payer (either the first signer or the value of the payer\nfield) requests that a fee grant be used to pay fees instead of the fee\npayer's own balance. If an appropriate fee grant does not exist or the\nchain does not support fee grants, this will fail"},"payer":{"description":"if unset, the first signer is responsible for paying the fees. If set, the\nspecified account must pay the fees. the payer must be a tx signer (and\nthus have signed this field in AuthInfo). setting this field does *not*\nchange the ordering of required signers for the transaction.","type":"string"}}},"cosmos.tx.v1beta1.GetBlockWithTxsResponse":{"description":"GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs\nmethod.","type":"object","properties":{"block":{"$ref":"#/definitions/tendermint.types.Block"},"block_id":{"$ref":"#/definitions/tendermint.types.BlockID"},"pagination":{"description":"pagination defines a pagination for the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"txs":{"description":"txs are the transactions in the block.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.tx.v1beta1.Tx"}}}},"cosmos.tx.v1beta1.GetTxResponse":{"description":"GetTxResponse is the response type for the Service.GetTx method.","type":"object","properties":{"tx":{"description":"tx is the queried transaction.","$ref":"#/definitions/cosmos.tx.v1beta1.Tx"},"tx_response":{"description":"tx_response is the queried TxResponses.","$ref":"#/definitions/cosmos.base.abci.v1beta1.TxResponse"}}},"cosmos.tx.v1beta1.GetTxsEventResponse":{"description":"GetTxsEventResponse is the response type for the Service.TxsByEvents\nRPC method.","type":"object","properties":{"pagination":{"description":"pagination defines a pagination for the response.\nDeprecated post v0.46.x: use total instead.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"total":{"type":"string","format":"uint64","title":"total is total number of results available"},"tx_responses":{"description":"tx_responses is the list of queried TxResponses.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.base.abci.v1beta1.TxResponse"}},"txs":{"description":"txs is the list of queried transactions.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.tx.v1beta1.Tx"}}}},"cosmos.tx.v1beta1.ModeInfo":{"description":"ModeInfo describes the signing mode of a single or nested multisig signer.","type":"object","properties":{"multi":{"title":"multi represents a nested multisig signer","$ref":"#/definitions/cosmos.tx.v1beta1.ModeInfo.Multi"},"single":{"title":"single represents a single signer","$ref":"#/definitions/cosmos.tx.v1beta1.ModeInfo.Single"}}},"cosmos.tx.v1beta1.ModeInfo.Multi":{"type":"object","title":"Multi is the mode info for a multisig public key","properties":{"bitarray":{"title":"bitarray specifies which keys within the multisig are signing","$ref":"#/definitions/cosmos.crypto.multisig.v1beta1.CompactBitArray"},"mode_infos":{"type":"array","title":"mode_infos is the corresponding modes of the signers of the multisig\nwhich could include nested multisig public keys","items":{"type":"object","$ref":"#/definitions/cosmos.tx.v1beta1.ModeInfo"}}}},"cosmos.tx.v1beta1.ModeInfo.Single":{"type":"object","title":"Single is the mode info for a single signer. It is structured as a message\nto allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the\nfuture","properties":{"mode":{"title":"mode is the signing mode of the single signer","$ref":"#/definitions/cosmos.tx.signing.v1beta1.SignMode"}}},"cosmos.tx.v1beta1.OrderBy":{"description":"- ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults\nto ASC in this case.\n - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order\n - ORDER_BY_DESC: ORDER_BY_DESC defines descending order","type":"string","title":"OrderBy defines the sorting order","default":"ORDER_BY_UNSPECIFIED","enum":["ORDER_BY_UNSPECIFIED","ORDER_BY_ASC","ORDER_BY_DESC"]},"cosmos.tx.v1beta1.SignerInfo":{"description":"SignerInfo describes the public key and signing mode of a single top-level\nsigner.","type":"object","properties":{"mode_info":{"title":"mode_info describes the signing mode of the signer and is a nested\nstructure to support nested multisig pubkey's","$ref":"#/definitions/cosmos.tx.v1beta1.ModeInfo"},"public_key":{"description":"public_key is the public key of the signer. It is optional for accounts\nthat already exist in state. If unset, the verifier can use the required \\\nsigner address for this position and lookup the public key.","$ref":"#/definitions/google.protobuf.Any"},"sequence":{"description":"sequence is the sequence of the account, which describes the\nnumber of committed transactions signed by a given address. It is used to\nprevent replay attacks.","type":"string","format":"uint64"}}},"cosmos.tx.v1beta1.SimulateRequest":{"description":"SimulateRequest is the request type for the Service.Simulate\nRPC method.","type":"object","properties":{"tx":{"description":"tx is the transaction to simulate.\nDeprecated. Send raw tx bytes instead.","$ref":"#/definitions/cosmos.tx.v1beta1.Tx"},"tx_bytes":{"description":"tx_bytes is the raw transaction.","type":"string","format":"byte"}}},"cosmos.tx.v1beta1.SimulateResponse":{"description":"SimulateResponse is the response type for the\nService.SimulateRPC method.","type":"object","properties":{"gas_info":{"description":"gas_info is the information about gas used in the simulation.","$ref":"#/definitions/cosmos.base.abci.v1beta1.GasInfo"},"result":{"description":"result is the result of the simulation.","$ref":"#/definitions/cosmos.base.abci.v1beta1.Result"}}},"cosmos.tx.v1beta1.Tip":{"description":"Tip is the tip used for meta-transactions.","type":"object","properties":{"amount":{"type":"array","title":"amount is the amount of the tip","items":{"type":"object","$ref":"#/definitions/cosmos.base.v1beta1.Coin"}},"tipper":{"type":"string","title":"tipper is the address of the account paying for the tip"}}},"cosmos.tx.v1beta1.Tx":{"description":"Tx is the standard type used for broadcasting transactions.","type":"object","properties":{"auth_info":{"title":"auth_info is the authorization related content of the transaction,\nspecifically signers, signer modes and fee","$ref":"#/definitions/cosmos.tx.v1beta1.AuthInfo"},"body":{"title":"body is the processable content of the transaction","$ref":"#/definitions/cosmos.tx.v1beta1.TxBody"},"signatures":{"description":"signatures is a list of signatures that matches the length and order of\nAuthInfo's signer_infos to allow connecting signature meta information like\npublic key and signing mode by position.","type":"array","items":{"type":"string","format":"byte"}}}},"cosmos.tx.v1beta1.TxBody":{"description":"TxBody is the body of a transaction that all signers sign over.","type":"object","properties":{"extension_options":{"type":"array","title":"extension_options are arbitrary options that can be added by chains\nwhen the default options are not sufficient. If any of these are present\nand can't be handled, the transaction will be rejected","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"memo":{"description":"memo is any arbitrary note/comment to be added to the transaction.\nWARNING: in clients, any publicly exposed text should not be called memo,\nbut should be called `note` instead (see\nhttps://github.com/cosmos/cosmos-sdk/issues/9122).","type":"string"},"messages":{"description":"messages is a list of messages to be executed. The required signers of\nthose messages define the number and order of elements in AuthInfo's\nsigner_infos and Tx's signatures. Each required signer address is added to\nthe list only the first time it occurs.\nBy convention, the first required signer (usually from the first message)\nis referred to as the primary signer and pays the fee for the whole\ntransaction.","type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"non_critical_extension_options":{"type":"array","title":"extension_options are arbitrary options that can be added by chains\nwhen the default options are not sufficient. If any of these are present\nand can't be handled, they will be ignored","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"timeout_height":{"description":"timeout_height is the block height after which this transaction will not\nbe processed by the chain.","type":"string","format":"uint64"},"timeout_timestamp":{"description":"timeout_timestamp is the block time after which this transaction will not\nbe processed by the chain.\n\nNote, if unordered=true this value MUST be set\nand will act as a short-lived TTL in which the transaction is deemed valid\nand kept in memory to prevent duplicates.","type":"string","format":"date-time"},"unordered":{"description":"unordered, when set to true, indicates that the transaction signer(s)\nintend for the transaction to be evaluated and executed in an un-ordered\nfashion. Specifically, the account's nonce will NOT be checked or\nincremented, which allows for fire-and-forget as well as concurrent\ntransaction execution.\n\nNote, when set to true, the existing 'timeout_timestamp' value must\nbe set and will be used to correspond to a timestamp in which the transaction is deemed\nvalid.\n\nWhen true, the sequence value MUST be 0, and any transaction with unordered=true and a non-zero sequence value will\nbe rejected.\nExternal services that make assumptions about sequence values may need to be updated because of this.","type":"boolean"}}},"cosmos.tx.v1beta1.TxDecodeAminoRequest":{"description":"TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino\nRPC method.","type":"object","properties":{"amino_binary":{"type":"string","format":"byte"}}},"cosmos.tx.v1beta1.TxDecodeAminoResponse":{"description":"TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino\nRPC method.","type":"object","properties":{"amino_json":{"type":"string"}}},"cosmos.tx.v1beta1.TxDecodeRequest":{"description":"TxDecodeRequest is the request type for the Service.TxDecode\nRPC method.","type":"object","properties":{"tx_bytes":{"description":"tx_bytes is the raw transaction.","type":"string","format":"byte"}}},"cosmos.tx.v1beta1.TxDecodeResponse":{"description":"TxDecodeResponse is the response type for the\nService.TxDecode method.","type":"object","properties":{"tx":{"description":"tx is the decoded transaction.","$ref":"#/definitions/cosmos.tx.v1beta1.Tx"}}},"cosmos.tx.v1beta1.TxEncodeAminoRequest":{"description":"TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino\nRPC method.","type":"object","properties":{"amino_json":{"type":"string"}}},"cosmos.tx.v1beta1.TxEncodeAminoResponse":{"description":"TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino\nRPC method.","type":"object","properties":{"amino_binary":{"type":"string","format":"byte"}}},"cosmos.tx.v1beta1.TxEncodeRequest":{"description":"TxEncodeRequest is the request type for the Service.TxEncode\nRPC method.","type":"object","properties":{"tx":{"description":"tx is the transaction to encode.","$ref":"#/definitions/cosmos.tx.v1beta1.Tx"}}},"cosmos.tx.v1beta1.TxEncodeResponse":{"description":"TxEncodeResponse is the response type for the\nService.TxEncode method.","type":"object","properties":{"tx_bytes":{"description":"tx_bytes is the encoded transaction bytes.","type":"string","format":"byte"}}},"cosmos.upgrade.v1beta1.ModuleVersion":{"description":"ModuleVersion specifies a module and its consensus version.","type":"object","properties":{"name":{"type":"string","title":"name of the app module"},"version":{"type":"string","format":"uint64","title":"consensus version of the app module"}}},"cosmos.upgrade.v1beta1.Plan":{"description":"Plan specifies information about a planned upgrade and when it should occur.","type":"object","properties":{"height":{"description":"The height at which the upgrade must be performed.","type":"string","format":"int64"},"info":{"type":"string","title":"Any application specific upgrade info to be included on-chain\nsuch as a git commit that validators could automatically upgrade to"},"name":{"description":"Sets the name for the upgrade. This name will be used by the upgraded\nversion of the software to apply any special \"on-upgrade\" commands during\nthe first BeginBlock method after the upgrade is applied. It is also used\nto detect whether a software version can handle a given upgrade. If no\nupgrade handler with this name has been set in the software, it will be\nassumed that the software is out-of-date when the upgrade Time or Height is\nreached and the software will exit.","type":"string"},"time":{"description":"Deprecated: Time based upgrades have been deprecated. Time based upgrade logic\nhas been removed from the SDK.\nIf this field is not empty, an error will be thrown.","type":"string","format":"date-time"},"upgraded_client_state":{"description":"Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been\nmoved to the IBC module in the sub module 02-client.\nIf this field is not empty, an error will be thrown.","$ref":"#/definitions/google.protobuf.Any"}}},"cosmos.upgrade.v1beta1.QueryAppliedPlanResponse":{"description":"QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC\nmethod.","type":"object","properties":{"height":{"description":"height is the block height at which the plan was applied.","type":"string","format":"int64"}}},"cosmos.upgrade.v1beta1.QueryAuthorityResponse":{"type":"object","title":"QueryAuthorityResponse is the response type for Query/Authority","properties":{"address":{"type":"string"}}},"cosmos.upgrade.v1beta1.QueryCurrentPlanResponse":{"description":"QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC\nmethod.","type":"object","properties":{"plan":{"description":"plan is the current upgrade plan.","$ref":"#/definitions/cosmos.upgrade.v1beta1.Plan"}}},"cosmos.upgrade.v1beta1.QueryModuleVersionsResponse":{"description":"QueryModuleVersionsResponse is the response type for the Query/ModuleVersions\nRPC method.","type":"object","properties":{"module_versions":{"description":"module_versions is a list of module names with their consensus versions.","type":"array","items":{"type":"object","$ref":"#/definitions/cosmos.upgrade.v1beta1.ModuleVersion"}}}},"cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse":{"description":"QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState\nRPC method.","type":"object","properties":{"upgraded_consensus_state":{"type":"string","format":"byte"}}},"google.protobuf.Any":{"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{}},"google.rpc.Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"details":{"type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"message":{"type":"string"}}},"ibc.applications.interchain_accounts.controller.v1.Params":{"description":"Params defines the set of on-chain interchain accounts parameters.\nThe following parameters may be used to disable the controller submodule.","type":"object","properties":{"controller_enabled":{"description":"controller_enabled enables or disables the controller submodule.","type":"boolean"}}},"ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse":{"description":"QueryInterchainAccountResponse the response type for the Query/InterchainAccount RPC method.","type":"object","properties":{"address":{"type":"string"}}},"ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params defines the parameters of the module.","$ref":"#/definitions/ibc.applications.interchain_accounts.controller.v1.Params"}}},"ibc.applications.interchain_accounts.host.v1.Params":{"description":"Params defines the set of on-chain interchain accounts parameters.\nThe following parameters may be used to disable the host submodule.","type":"object","properties":{"allow_messages":{"description":"allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain.","type":"array","items":{"type":"string"}},"host_enabled":{"description":"host_enabled enables or disables the host submodule.","type":"boolean"}}},"ibc.applications.interchain_accounts.host.v1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params defines the parameters of the module.","$ref":"#/definitions/ibc.applications.interchain_accounts.host.v1.Params"}}},"ibc.applications.transfer.v1.Denom":{"description":"Denom holds the base denom of a Token and a trace of the chains it was sent through.","type":"object","properties":{"base":{"type":"string","title":"the base token denomination"},"trace":{"type":"array","title":"the trace of the token","items":{"type":"object","$ref":"#/definitions/ibc.applications.transfer.v1.Hop"}}}},"ibc.applications.transfer.v1.Hop":{"type":"object","title":"Hop defines a port ID, channel ID pair specifying a unique \"hop\" in a trace","properties":{"channel_id":{"type":"string"},"port_id":{"type":"string"}}},"ibc.applications.transfer.v1.Params":{"description":"Params defines the set of IBC transfer parameters.\nNOTE: To prevent a single token from being transferred, set the\nTransfersEnabled parameter to true and then set the bank module's SendEnabled\nparameter for the denomination to false.","type":"object","properties":{"receive_enabled":{"description":"receive_enabled enables or disables all cross-chain token transfers to this\nchain.","type":"boolean"},"send_enabled":{"description":"send_enabled enables or disables all cross-chain token transfers from this\nchain.","type":"boolean"}}},"ibc.applications.transfer.v1.QueryDenomHashResponse":{"description":"QueryDenomHashResponse is the response type for the Query/DenomHash RPC\nmethod.","type":"object","properties":{"hash":{"description":"hash (in hex format) of the denomination trace information.","type":"string"}}},"ibc.applications.transfer.v1.QueryDenomResponse":{"description":"QueryDenomResponse is the response type for the Query/Denom RPC\nmethod.","type":"object","properties":{"denom":{"description":"denom returns the requested denomination.","$ref":"#/definitions/ibc.applications.transfer.v1.Denom"}}},"ibc.applications.transfer.v1.QueryDenomsResponse":{"description":"QueryDenomsResponse is the response type for the Query/Denoms RPC\nmethod.","type":"object","properties":{"denoms":{"description":"denoms returns all denominations.","type":"array","items":{"type":"object","$ref":"#/definitions/ibc.applications.transfer.v1.Denom"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.applications.transfer.v1.QueryEscrowAddressResponse":{"description":"QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method.","type":"object","properties":{"escrow_address":{"type":"string","title":"the escrow account address"}}},"ibc.applications.transfer.v1.QueryParamsResponse":{"description":"QueryParamsResponse is the response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params defines the parameters of the module.","$ref":"#/definitions/ibc.applications.transfer.v1.Params"}}},"ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse":{"description":"QueryTotalEscrowForDenomResponse is the response type for TotalEscrowForDenom RPC method.","type":"object","properties":{"amount":{"$ref":"#/definitions/cosmos.base.v1beta1.Coin"}}},"ibc.core.channel.v1.Channel":{"description":"Channel defines pipeline for exactly-once packet delivery between specific\nmodules on separate blockchains, which has at least one end capable of\nsending packets and one end capable of receiving packets.","type":"object","properties":{"connection_hops":{"type":"array","title":"list of connection identifiers, in order, along which packets sent on\nthis channel will travel","items":{"type":"string"}},"counterparty":{"title":"counterparty channel end","$ref":"#/definitions/ibc.core.channel.v1.Counterparty"},"ordering":{"title":"whether the channel is ordered or unordered","$ref":"#/definitions/ibc.core.channel.v1.Order"},"state":{"title":"current state of the channel end","$ref":"#/definitions/ibc.core.channel.v1.State"},"version":{"type":"string","title":"opaque channel version, which is agreed upon during the handshake"}}},"ibc.core.channel.v1.Counterparty":{"type":"object","title":"Counterparty defines a channel end counterparty","properties":{"channel_id":{"type":"string","title":"channel end on the counterparty chain"},"port_id":{"description":"port on the counterparty chain which owns the other end of the channel.","type":"string"}}},"ibc.core.channel.v1.IdentifiedChannel":{"description":"IdentifiedChannel defines a channel with additional port and channel\nidentifier fields.","type":"object","properties":{"channel_id":{"type":"string","title":"channel identifier"},"connection_hops":{"type":"array","title":"list of connection identifiers, in order, along which packets sent on\nthis channel will travel","items":{"type":"string"}},"counterparty":{"title":"counterparty channel end","$ref":"#/definitions/ibc.core.channel.v1.Counterparty"},"ordering":{"title":"whether the channel is ordered or unordered","$ref":"#/definitions/ibc.core.channel.v1.Order"},"port_id":{"type":"string","title":"port identifier"},"state":{"title":"current state of the channel end","$ref":"#/definitions/ibc.core.channel.v1.State"},"version":{"type":"string","title":"opaque channel version, which is agreed upon during the handshake"}}},"ibc.core.channel.v1.Order":{"description":"- ORDER_NONE_UNSPECIFIED: zero-value for channel ordering\n - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in\nwhich they were sent.\n - ORDER_ORDERED: packets are delivered exactly in the order which they were sent","type":"string","title":"Order defines if a channel is ORDERED or UNORDERED","default":"ORDER_NONE_UNSPECIFIED","enum":["ORDER_NONE_UNSPECIFIED","ORDER_UNORDERED","ORDER_ORDERED"]},"ibc.core.channel.v1.PacketState":{"description":"PacketState defines the generic type necessary to retrieve and store\npacket commitments, acknowledgements, and receipts.\nCaller is responsible for knowing the context necessary to interpret this\nstate as a commitment, acknowledgement, or a receipt.","type":"object","properties":{"channel_id":{"description":"channel unique identifier.","type":"string"},"data":{"description":"embedded data that represents packet state.","type":"string","format":"byte"},"port_id":{"description":"channel port identifier.","type":"string"},"sequence":{"description":"packet sequence.","type":"string","format":"uint64"}}},"ibc.core.channel.v1.QueryChannelClientStateResponse":{"type":"object","title":"QueryChannelClientStateResponse is the Response type for the\nQuery/QueryChannelClientState RPC method","properties":{"identified_client_state":{"title":"client state associated with the channel","$ref":"#/definitions/ibc.core.client.v1.IdentifiedClientState"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v1.QueryChannelConsensusStateResponse":{"type":"object","title":"QueryChannelClientStateResponse is the Response type for the\nQuery/QueryChannelClientState RPC method","properties":{"client_id":{"type":"string","title":"client ID associated with the consensus state"},"consensus_state":{"title":"consensus state associated with the channel","$ref":"#/definitions/google.protobuf.Any"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v1.QueryChannelResponse":{"description":"QueryChannelResponse is the response type for the Query/Channel RPC method.\nBesides the Channel end, it includes a proof and the height from which the\nproof was retrieved.","type":"object","properties":{"channel":{"title":"channel associated with the request identifiers","$ref":"#/definitions/ibc.core.channel.v1.Channel"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v1.QueryChannelsResponse":{"description":"QueryChannelsResponse is the response type for the Query/Channels RPC method.","type":"object","properties":{"channels":{"description":"list of stored channels of the chain.","type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.channel.v1.IdentifiedChannel"}},"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.channel.v1.QueryConnectionChannelsResponse":{"type":"object","title":"QueryConnectionChannelsResponse is the Response type for the\nQuery/QueryConnectionChannels RPC method","properties":{"channels":{"description":"list of channels associated with a connection.","type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.channel.v1.IdentifiedChannel"}},"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.channel.v1.QueryNextSequenceReceiveResponse":{"type":"object","title":"QuerySequenceResponse is the response type for the\nQuery/QueryNextSequenceReceiveResponse RPC method","properties":{"next_sequence_receive":{"type":"string","format":"uint64","title":"next sequence receive number"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v1.QueryNextSequenceSendResponse":{"type":"object","title":"QueryNextSequenceSendResponse is the request type for the\nQuery/QueryNextSequenceSend RPC method","properties":{"next_sequence_send":{"type":"string","format":"uint64","title":"next sequence send number"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v1.QueryPacketAcknowledgementResponse":{"type":"object","title":"QueryPacketAcknowledgementResponse defines the client query response for a\npacket which also includes a proof and the height from which the\nproof was retrieved","properties":{"acknowledgement":{"type":"string","format":"byte","title":"packet associated with the request fields"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v1.QueryPacketAcknowledgementsResponse":{"type":"object","title":"QueryPacketAcknowledgemetsResponse is the request type for the\nQuery/QueryPacketAcknowledgements RPC method","properties":{"acknowledgements":{"type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.channel.v1.PacketState"}},"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.channel.v1.QueryPacketCommitmentResponse":{"type":"object","title":"QueryPacketCommitmentResponse defines the client query response for a packet\nwhich also includes a proof and the height from which the proof was\nretrieved","properties":{"commitment":{"type":"string","format":"byte","title":"packet associated with the request fields"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v1.QueryPacketCommitmentsResponse":{"type":"object","title":"QueryPacketCommitmentsResponse is the request type for the\nQuery/QueryPacketCommitments RPC method","properties":{"commitments":{"type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.channel.v1.PacketState"}},"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.channel.v1.QueryPacketReceiptResponse":{"type":"object","title":"QueryPacketReceiptResponse defines the client query response for a packet\nreceipt which also includes a proof, and the height from which the proof was\nretrieved","properties":{"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"},"received":{"type":"boolean","title":"success flag for if receipt exists"}}},"ibc.core.channel.v1.QueryUnreceivedAcksResponse":{"type":"object","title":"QueryUnreceivedAcksResponse is the response type for the\nQuery/UnreceivedAcks RPC method","properties":{"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"sequences":{"type":"array","title":"list of unreceived acknowledgement sequences","items":{"type":"string","format":"uint64"}}}},"ibc.core.channel.v1.QueryUnreceivedPacketsResponse":{"type":"object","title":"QueryUnreceivedPacketsResponse is the response type for the\nQuery/UnreceivedPacketCommitments RPC method","properties":{"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"sequences":{"type":"array","title":"list of unreceived packet sequences","items":{"type":"string","format":"uint64"}}}},"ibc.core.channel.v1.State":{"description":"State defines if a channel is in one of the following states:\nCLOSED, INIT, TRYOPEN, OPEN, or UNINITIALIZED.\n\n - STATE_UNINITIALIZED_UNSPECIFIED: Default State\n - STATE_INIT: A channel has just started the opening handshake.\n - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain.\n - STATE_OPEN: A channel has completed the handshake. Open channels are\nready to send and receive packets.\n - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive\npackets.","type":"string","default":"STATE_UNINITIALIZED_UNSPECIFIED","enum":["STATE_UNINITIALIZED_UNSPECIFIED","STATE_INIT","STATE_TRYOPEN","STATE_OPEN","STATE_CLOSED"]},"ibc.core.channel.v2.PacketState":{"description":"PacketState defines the generic type necessary to retrieve and store\npacket commitments, acknowledgements, and receipts.\nCaller is responsible for knowing the context necessary to interpret this\nstate as a commitment, acknowledgement, or a receipt.","type":"object","properties":{"client_id":{"description":"client unique identifier.","type":"string"},"data":{"description":"embedded data that represents packet state.","type":"string","format":"byte"},"sequence":{"description":"packet sequence.","type":"string","format":"uint64"}}},"ibc.core.channel.v2.QueryNextSequenceSendResponse":{"type":"object","title":"QueryNextSequenceSendResponse is the response type for the Query/QueryNextSequenceSend RPC method","properties":{"next_sequence_send":{"type":"string","format":"uint64","title":"next sequence send number"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v2.QueryPacketAcknowledgementResponse":{"description":"QueryPacketAcknowledgementResponse is the response type for the Query/PacketAcknowledgement RPC method.","type":"object","properties":{"acknowledgement":{"type":"string","format":"byte","title":"acknowledgement associated with the request fields"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v2.QueryPacketAcknowledgementsResponse":{"type":"object","title":"QueryPacketAcknowledgemetsResponse is the request type for the\nQuery/QueryPacketAcknowledgements RPC method","properties":{"acknowledgements":{"type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.channel.v2.PacketState"}},"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.channel.v2.QueryPacketCommitmentResponse":{"description":"QueryPacketCommitmentResponse is the response type for the Query/PacketCommitment RPC method.","type":"object","properties":{"commitment":{"type":"string","format":"byte","title":"packet associated with the request fields"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.channel.v2.QueryPacketCommitmentsResponse":{"description":"QueryPacketCommitmentResponse is the response type for the Query/PacketCommitment RPC method.","type":"object","properties":{"commitments":{"description":"collection of packet commitments for the requested channel identifier.","type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.channel.v2.PacketState"}},"height":{"description":"query block height.","$ref":"#/definitions/ibc.core.client.v1.Height"},"pagination":{"description":"pagination response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.channel.v2.QueryPacketReceiptResponse":{"description":"QueryPacketReceiptResponse is the response type for the Query/PacketReceipt RPC method.","type":"object","properties":{"proof":{"type":"string","format":"byte","title":"merkle proof of existence or absence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"},"received":{"type":"boolean","title":"success flag for if receipt exists"}}},"ibc.core.channel.v2.QueryUnreceivedAcksResponse":{"type":"object","title":"QueryUnreceivedAcksResponse is the response type for the\nQuery/UnreceivedAcks RPC method","properties":{"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"sequences":{"type":"array","title":"list of unreceived acknowledgement sequences","items":{"type":"string","format":"uint64"}}}},"ibc.core.channel.v2.QueryUnreceivedPacketsResponse":{"type":"object","title":"QueryUnreceivedPacketsResponse is the response type for the Query/UnreceivedPacketCommitments RPC method","properties":{"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"sequences":{"type":"array","title":"list of unreceived packet sequences","items":{"type":"string","format":"uint64"}}}},"ibc.core.client.v1.ConsensusStateWithHeight":{"description":"ConsensusStateWithHeight defines a consensus state with an additional height\nfield.","type":"object","properties":{"consensus_state":{"title":"consensus state","$ref":"#/definitions/google.protobuf.Any"},"height":{"title":"consensus state height","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.client.v1.Height":{"description":"Normally the RevisionHeight is incremented at each height while keeping\nRevisionNumber the same. However some consensus algorithms may choose to\nreset the height in certain conditions e.g. hard forks, state-machine\nbreaking changes In these cases, the RevisionNumber is incremented so that\nheight continues to be monitonically increasing even as the RevisionHeight\ngets reset\n\nPlease note that json tags for generated Go code are overridden to explicitly exclude the omitempty jsontag.\nThis enforces the Go json marshaller to always emit zero values for both revision_number and revision_height.","type":"object","title":"Height is a monotonically increasing data type\nthat can be compared against another Height for the purposes of updating and\nfreezing clients","properties":{"revision_height":{"type":"string","format":"uint64","title":"the height within the given revision"},"revision_number":{"type":"string","format":"uint64","title":"the revision that the client is currently on"}}},"ibc.core.client.v1.IdentifiedClientState":{"description":"IdentifiedClientState defines a client state with an additional client\nidentifier field.","type":"object","properties":{"client_id":{"type":"string","title":"client identifier"},"client_state":{"title":"client state","$ref":"#/definitions/google.protobuf.Any"}}},"ibc.core.client.v1.Params":{"description":"Params defines the set of IBC light client parameters.","type":"object","properties":{"allowed_clients":{"description":"allowed_clients defines the list of allowed client state types which can be created\nand interacted with. If a client type is removed from the allowed clients list, usage\nof this client will be disabled until it is added again to the list.","type":"array","items":{"type":"string"}}}},"ibc.core.client.v1.QueryClientCreatorResponse":{"description":"QueryClientCreatorResponse is the response type for the Query/ClientCreator RPC\nmethod.","type":"object","properties":{"creator":{"type":"string","title":"creator of the client"}}},"ibc.core.client.v1.QueryClientParamsResponse":{"description":"QueryClientParamsResponse is the response type for the Query/ClientParams RPC\nmethod.","type":"object","properties":{"params":{"description":"params defines the parameters of the module.","$ref":"#/definitions/ibc.core.client.v1.Params"}}},"ibc.core.client.v1.QueryClientStateResponse":{"description":"QueryClientStateResponse is the response type for the Query/ClientState RPC\nmethod. Besides the client state, it includes a proof and the height from\nwhich the proof was retrieved.","type":"object","properties":{"client_state":{"title":"client state associated with the request identifier","$ref":"#/definitions/google.protobuf.Any"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.client.v1.QueryClientStatesResponse":{"description":"QueryClientStatesResponse is the response type for the Query/ClientStates RPC\nmethod.","type":"object","properties":{"client_states":{"description":"list of stored ClientStates of the chain.","type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.client.v1.IdentifiedClientState"}},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.client.v1.QueryClientStatusResponse":{"description":"QueryClientStatusResponse is the response type for the Query/ClientStatus RPC\nmethod. It returns the current status of the IBC client.","type":"object","properties":{"status":{"type":"string"}}},"ibc.core.client.v1.QueryConsensusStateHeightsResponse":{"type":"object","title":"QueryConsensusStateHeightsResponse is the response type for the\nQuery/ConsensusStateHeights RPC method","properties":{"consensus_state_heights":{"type":"array","title":"consensus state heights","items":{"type":"object","$ref":"#/definitions/ibc.core.client.v1.Height"}},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.client.v1.QueryConsensusStateResponse":{"type":"object","title":"QueryConsensusStateResponse is the response type for the Query/ConsensusState\nRPC method","properties":{"consensus_state":{"title":"consensus state associated with the client identifier at the given height","$ref":"#/definitions/google.protobuf.Any"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.client.v1.QueryConsensusStatesResponse":{"type":"object","title":"QueryConsensusStatesResponse is the response type for the\nQuery/ConsensusStates RPC method","properties":{"consensus_states":{"type":"array","title":"consensus states associated with the identifier","items":{"type":"object","$ref":"#/definitions/ibc.core.client.v1.ConsensusStateWithHeight"}},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.client.v1.QueryUpgradedClientStateResponse":{"description":"QueryUpgradedClientStateResponse is the response type for the\nQuery/UpgradedClientState RPC method.","type":"object","properties":{"upgraded_client_state":{"title":"client state associated with the request identifier","$ref":"#/definitions/google.protobuf.Any"}}},"ibc.core.client.v1.QueryUpgradedConsensusStateResponse":{"description":"QueryUpgradedConsensusStateResponse is the response type for the\nQuery/UpgradedConsensusState RPC method.","type":"object","properties":{"upgraded_consensus_state":{"title":"Consensus state associated with the request identifier","$ref":"#/definitions/google.protobuf.Any"}}},"ibc.core.client.v1.QueryVerifyMembershipRequest":{"type":"object","title":"QueryVerifyMembershipRequest is the request type for the Query/VerifyMembership RPC method","properties":{"block_delay":{"type":"string","format":"uint64","title":"optional block delay"},"client_id":{"description":"client unique identifier.","type":"string"},"merkle_path":{"description":"the commitment key path.","$ref":"#/definitions/ibc.core.commitment.v2.MerklePath"},"proof":{"description":"the proof to be verified by the client.","type":"string","format":"byte"},"proof_height":{"description":"the height of the commitment root at which the proof is verified.","$ref":"#/definitions/ibc.core.client.v1.Height"},"time_delay":{"type":"string","format":"uint64","title":"optional time delay"},"value":{"description":"the value which is proven.","type":"string","format":"byte"}}},"ibc.core.client.v1.QueryVerifyMembershipResponse":{"type":"object","title":"QueryVerifyMembershipResponse is the response type for the Query/VerifyMembership RPC method","properties":{"success":{"description":"boolean indicating success or failure of proof verification.","type":"boolean"}}},"ibc.core.client.v2.Config":{"type":"object","title":"Config is a **per-client** configuration struct that sets which relayers are allowed to relay v2 IBC messages\nfor a given client.\nIf it is set, then only relayers in the allow list can send v2 messages\nIf it is not set, then the client allows permissionless relaying of v2 messages","properties":{"allowed_relayers":{"type":"array","title":"allowed_relayers defines the set of allowed relayers for IBC V2 protocol for the given client","items":{"type":"string"}}}},"ibc.core.client.v2.CounterpartyInfo":{"type":"object","title":"CounterpartyInfo defines the key that the counterparty will use to message our client","properties":{"client_id":{"type":"string","title":"client identifier is the identifier used to send packet messages to our client"},"merkle_prefix":{"type":"array","title":"merkle prefix key is the prefix that ics provable keys are stored under","items":{"type":"string","format":"byte"}}}},"ibc.core.client.v2.QueryConfigResponse":{"type":"object","title":"QueryConfigResponse is the response type for the Query/Config RPC method","properties":{"config":{"$ref":"#/definitions/ibc.core.client.v2.Config"}}},"ibc.core.client.v2.QueryCounterpartyInfoResponse":{"description":"QueryCounterpartyInfoResponse is the response type for the\nQuery/CounterpartyInfo RPC method.","type":"object","properties":{"counterparty_info":{"$ref":"#/definitions/ibc.core.client.v2.CounterpartyInfo"}}},"ibc.core.commitment.v1.MerklePrefix":{"type":"object","title":"MerklePrefix is merkle path prefixed to the key.\nThe constructed key from the Path and the key will be append(Path.KeyPath,\nappend(Path.KeyPrefix, key...))","properties":{"key_prefix":{"type":"string","format":"byte"}}},"ibc.core.commitment.v2.MerklePath":{"description":"MerklePath is the path used to verify commitment proofs, which can be an\narbitrary structured object (defined by a commitment type).\nICS-23 verification supports membership proofs for nested merkle trees.\nThe ICS-24 standard provable keys MUST be stored in the lowest level tree with an optional prefix.\nThe IC24 provable tree may then be stored in a higher level tree(s) that hash up to the root hash\nstored in the consensus state of the client.\nEach element of the path represents the key of a merkle tree from the root to the leaf.\nThe elements of the path before the final element must be the path to the tree that contains\nthe ICS24 provable store. Thus, it should remain constant for all ICS24 proofs.\nThe final element of the path is the key of the leaf in the ICS24 provable store,\nThus IBC core will append the ICS24 path to the final element of the MerklePath\nstored in the counterparty to create the full path to the leaf for proof verification.\nExamples:\nCosmos SDK:\nThe Cosmos SDK commits to a multi-tree where each store is an IAVL tree and all store hashes\nare hashed in a simple merkle tree to get the final root hash. Thus, the MerklePath in the counterparty\nMerklePrefix has the following structure: [\"ibc\", \"\"]\nThe core IBC handler will append the ICS24 path to the final element of the MerklePath\nlike so: [\"ibc\", \"{packetCommitmentPath}\"] which will then be used for final verification.\nEthereum:\nThe Ethereum client commits to a single Patricia merkle trie. The ICS24 provable store is managed\nby the smart contract state. Each smart contract has a specific prefix reserved within the global trie.\nThus the MerklePath in the counterparty is the prefix to the smart contract state in the global trie.\nSince there is only one tree in the commitment structure of ethereum the MerklePath in the counterparty\nMerklePrefix has the following structure: [\"IBCCoreContractAddressStoragePrefix\"]\nThe core IBC handler will append the ICS24 path to the final element of the MerklePath\nlike so: [\"IBCCoreContractAddressStoragePrefix{packetCommitmentPath}\"] which will then be used for final\nverification. Thus the MerklePath in the counterparty MerklePrefix is the nested key path from the root hash of the\nconsensus state down to the ICS24 provable store. The IBC handler retrieves the counterparty key path to the ICS24\nprovable store from the MerklePath and appends the ICS24 path to get the final key path to the value being verified\nby the client against the root hash in the client's consensus state.","type":"object","properties":{"key_path":{"type":"array","items":{"type":"string","format":"byte"}}}},"ibc.core.connection.v1.ConnectionEnd":{"description":"ConnectionEnd defines a stateful object on a chain connected to another\nseparate one.\nNOTE: there must only be 2 defined ConnectionEnds to establish\na connection between two chains.","type":"object","properties":{"client_id":{"description":"client associated with this connection.","type":"string"},"counterparty":{"description":"counterparty chain associated with this connection.","$ref":"#/definitions/ibc.core.connection.v1.Counterparty"},"delay_period":{"description":"delay period that must pass before a consensus state can be used for\npacket-verification NOTE: delay period logic is only implemented by some\nclients.","type":"string","format":"uint64"},"state":{"description":"current state of the connection end.","$ref":"#/definitions/ibc.core.connection.v1.State"},"versions":{"description":"IBC version which can be utilised to determine encodings or protocols for\nchannels or packets utilising this connection.","type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.connection.v1.Version"}}}},"ibc.core.connection.v1.Counterparty":{"description":"Counterparty defines the counterparty chain associated with a connection end.","type":"object","properties":{"client_id":{"description":"identifies the client on the counterparty chain associated with a given\nconnection.","type":"string"},"connection_id":{"description":"identifies the connection end on the counterparty chain associated with a\ngiven connection.","type":"string"},"prefix":{"description":"commitment merkle prefix of the counterparty chain.","$ref":"#/definitions/ibc.core.commitment.v1.MerklePrefix"}}},"ibc.core.connection.v1.IdentifiedConnection":{"description":"IdentifiedConnection defines a connection with additional connection\nidentifier field.","type":"object","properties":{"client_id":{"description":"client associated with this connection.","type":"string"},"counterparty":{"description":"counterparty chain associated with this connection.","$ref":"#/definitions/ibc.core.connection.v1.Counterparty"},"delay_period":{"description":"delay period associated with this connection.","type":"string","format":"uint64"},"id":{"description":"connection identifier.","type":"string"},"state":{"description":"current state of the connection end.","$ref":"#/definitions/ibc.core.connection.v1.State"},"versions":{"type":"array","title":"IBC version which can be utilised to determine encodings or protocols for\nchannels or packets utilising this connection","items":{"type":"object","$ref":"#/definitions/ibc.core.connection.v1.Version"}}}},"ibc.core.connection.v1.Params":{"description":"Params defines the set of Connection parameters.","type":"object","properties":{"max_expected_time_per_block":{"description":"maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the\nlargest amount of time that the chain might reasonably take to produce the next block under normal operating\nconditions. A safe choice is 3-5x the expected time per block.","type":"string","format":"uint64"}}},"ibc.core.connection.v1.QueryClientConnectionsResponse":{"type":"object","title":"QueryClientConnectionsResponse is the response type for the\nQuery/ClientConnections RPC method","properties":{"connection_paths":{"description":"slice of all the connection paths associated with a client.","type":"array","items":{"type":"string"}},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was generated","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.connection.v1.QueryConnectionClientStateResponse":{"type":"object","title":"QueryConnectionClientStateResponse is the response type for the\nQuery/ConnectionClientState RPC method","properties":{"identified_client_state":{"title":"client state associated with the channel","$ref":"#/definitions/ibc.core.client.v1.IdentifiedClientState"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.connection.v1.QueryConnectionConsensusStateResponse":{"type":"object","title":"QueryConnectionConsensusStateResponse is the response type for the\nQuery/ConnectionConsensusState RPC method","properties":{"client_id":{"type":"string","title":"client ID associated with the consensus state"},"consensus_state":{"title":"consensus state associated with the channel","$ref":"#/definitions/google.protobuf.Any"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.connection.v1.QueryConnectionParamsResponse":{"description":"QueryConnectionParamsResponse is the response type for the Query/ConnectionParams RPC method.","type":"object","properties":{"params":{"description":"params defines the parameters of the module.","$ref":"#/definitions/ibc.core.connection.v1.Params"}}},"ibc.core.connection.v1.QueryConnectionResponse":{"description":"QueryConnectionResponse is the response type for the Query/Connection RPC\nmethod. Besides the connection end, it includes a proof and the height from\nwhich the proof was retrieved.","type":"object","properties":{"connection":{"title":"connection associated with the request identifier","$ref":"#/definitions/ibc.core.connection.v1.ConnectionEnd"},"proof":{"type":"string","format":"byte","title":"merkle proof of existence"},"proof_height":{"title":"height at which the proof was retrieved","$ref":"#/definitions/ibc.core.client.v1.Height"}}},"ibc.core.connection.v1.QueryConnectionsResponse":{"description":"QueryConnectionsResponse is the response type for the Query/Connections RPC\nmethod.","type":"object","properties":{"connections":{"description":"list of stored connections of the chain.","type":"array","items":{"type":"object","$ref":"#/definitions/ibc.core.connection.v1.IdentifiedConnection"}},"height":{"title":"query block height","$ref":"#/definitions/ibc.core.client.v1.Height"},"pagination":{"title":"pagination response","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.core.connection.v1.State":{"description":"State defines if a connection is in one of the following states:\nINIT, TRYOPEN, OPEN or UNINITIALIZED.\n\n - STATE_UNINITIALIZED_UNSPECIFIED: Default State\n - STATE_INIT: A connection end has just started the opening handshake.\n - STATE_TRYOPEN: A connection end has acknowledged the handshake step on the counterparty\nchain.\n - STATE_OPEN: A connection end has completed the handshake.","type":"string","default":"STATE_UNINITIALIZED_UNSPECIFIED","enum":["STATE_UNINITIALIZED_UNSPECIFIED","STATE_INIT","STATE_TRYOPEN","STATE_OPEN"]},"ibc.core.connection.v1.Version":{"description":"Version defines the versioning scheme used to negotiate the IBC version in\nthe connection handshake.","type":"object","properties":{"features":{"type":"array","title":"list of features compatible with the specified identifier","items":{"type":"string"}},"identifier":{"type":"string","title":"unique version identifier"}}},"ibc.lightclients.wasm.v1.QueryChecksumsResponse":{"description":"QueryChecksumsResponse is the response type for the Query/Checksums RPC method.","type":"object","properties":{"checksums":{"description":"checksums is a list of the hex encoded checksums of all wasm codes stored.","type":"array","items":{"type":"string"}},"pagination":{"description":"pagination defines the pagination in the response.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"ibc.lightclients.wasm.v1.QueryCodeResponse":{"description":"QueryCodeResponse is the response type for the Query/Code RPC method.","type":"object","properties":{"data":{"type":"string","format":"byte"}}},"pulsarchain.abci.QueryGetValidatorSetWithPowersResponse":{"type":"object","properties":{"validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.common.ValidatorEntry"}}}},"pulsarchain.abci.QueryVoteExtBodyByHeightResponse":{"description":"QueryVoteExtBodyByHeightResponse defines the response for VoteExtBodyByHeight.","type":"object","properties":{"vote_ext_body":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.VoteExtBody"}}},"pulsarchain.bridge.v1.Params":{"description":"Params defines the parameters for the module.","type":"object","properties":{"actions_reduced_root_snapshot_window_size":{"description":"actions_reduced_root_snapshot_window_size is the retained consensus root window.","type":"string","format":"int64"},"confirmation_depth":{"description":"confirmation_depth is the Mina finality depth used by the archive wrapper.","type":"string","format":"int64"},"contract_address":{"description":"contract_address is the Mina bridge contract address.","type":"string"},"max_block_range":{"description":"max_block_range is the maximum Mina height span processed by one request.","type":"string","format":"int64"},"start_block_height":{"description":"start_block_height is the first Mina block indexed by the bridge.","type":"string","format":"int64"}}},"pulsarchain.bridge.v1.QueryActionsReducedRootResponse":{"description":"QueryActionsReducedRootResponse defines the QueryActionsReducedRootResponse message.","type":"object","properties":{"actions_reduced_root":{"type":"string"}}},"pulsarchain.bridge.v1.QueryLatestActionHashesResponse":{"description":"QueryLatestActionHashesResponse defines the QueryLatestActionHashesResponse message.","type":"object","properties":{"action_hashes":{"description":"action_hashes is the ordered canonical hash batch that reconstructs\nthe root transition for the source Cosmos block.","type":"array","items":{"type":"string"}},"action_hashes_cosmos_block_height":{"description":"action_hashes_cosmos_block_height is the Cosmos block height where\nthis query batch was produced.","type":"string","format":"int64"},"latest_fetched_mina_height":{"description":"latest_fetched_mina_height is the inclusive upper Mina cursor of the\ncurrent batch. Together with start_mina_height it defines the consumed\nMina interval (start_mina_height, latest_fetched_mina_height].","type":"string","format":"int64"},"start_mina_height":{"description":"start_mina_height is the exclusive lower Mina cursor of the current batch.","type":"string","format":"int64"}}},"pulsarchain.bridge.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.bridge.v1.Params"}}},"pulsarchain.common.ValidatorEntry":{"type":"object","properties":{"consensus_power":{"type":"string","format":"int64"},"validator_cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.ActorType":{"description":"ActorType identifies the key-registry actor authorized by a signing challenge.\n\n - ACTOR_TYPE_UNSPECIFIED: ACTOR_TYPE_UNSPECIFIED is invalid for key-registry operations.\n - ACTOR_TYPE_USER: ACTOR_TYPE_USER identifies a user account key association.\n - ACTOR_TYPE_VALIDATOR: ACTOR_TYPE_VALIDATOR identifies a validator consensus key association.","type":"string","default":"ACTOR_TYPE_UNSPECIFIED","enum":["ACTOR_TYPE_UNSPECIFIED","ACTOR_TYPE_USER","ACTOR_TYPE_VALIDATOR"]},"pulsarchain.keyregistry.v1.KeySigningOperation":{"description":"KeySigningOperation identifies the key-registry state transition authorized\nby a wallet field signature.\n\n - KEY_SIGNING_OPERATION_UNSPECIFIED: KEY_SIGNING_OPERATION_UNSPECIFIED is invalid for signing requests.\n - KEY_SIGNING_OPERATION_REGISTER: KEY_SIGNING_OPERATION_REGISTER creates the first stable-key association.\n - KEY_SIGNING_OPERATION_UPDATE: KEY_SIGNING_OPERATION_UPDATE replaces an existing Mina key.","type":"string","default":"KEY_SIGNING_OPERATION_UNSPECIFIED","enum":["KEY_SIGNING_OPERATION_UNSPECIFIED","KEY_SIGNING_OPERATION_REGISTER","KEY_SIGNING_OPERATION_UPDATE"]},"pulsarchain.keyregistry.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.keyregistry.v1.QueryGetKeySigningChallengeResponse":{"description":"QueryGetKeySigningChallengeResponse contains the exact field and state version to sign.","type":"object","properties":{"challenge":{"type":"string"},"challenge_bytes":{"type":"string","format":"byte"},"new_key_version":{"type":"string","format":"uint64"},"previous_mina_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetUserCosmosPublicKeyResponse":{"description":"QueryGetUserCosmosPublicKeyResponse defines the QueryGetUserCosmosPublicKeyResponse message.","type":"object","properties":{"user_cosmos_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetUserMinaPublicKeyResponse":{"description":"QueryGetUserMinaPublicKeyResponse defines the QueryGetUserMinaPublicKeyResponse message.","type":"object","properties":{"user_mina_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse":{"description":"QueryGetValidatorCosmosPubKeyResponse defines the QueryGetValidatorCosmosPubKeyResponse message.","type":"object","properties":{"validator_cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse":{"description":"QueryGetValidatorMinaPubKeyResponse defines the QueryGetValidatorMinaPubKeyResponse message.","type":"object","properties":{"validator_mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorSetWithMinaKeysResponse":{"description":"QueryGetValidatorSetWithMinaKeysResponse defines the response for GetValidatorSetWithMinaKeys.","type":"object","properties":{"registered_validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.keyregistry.v1.RegisteredValidatorSetEntry"}}}},"pulsarchain.keyregistry.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.keyregistry.v1.Params"}}},"pulsarchain.keyregistry.v1.RegisteredValidatorSetEntry":{"type":"object","properties":{"consensus_power":{"type":"string","format":"int64"},"validator_cosmos_pub_key":{"type":"string","format":"byte"},"validator_mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.smartaccounts.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.smartaccounts.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.smartaccounts.v1.Params"}}},"pulsarchain.verification.v1.CommitmentEntry":{"description":"CommitmentEntry is a query representation of a retained commitment.","type":"object","properties":{"commitment":{"$ref":"#/definitions/pulsarchain.verification.v1.CommitmentRecord"},"commitment_height":{"type":"string","format":"uint64"},"validator":{"type":"string"}}},"pulsarchain.verification.v1.CommitmentRecord":{"description":"CommitmentRecord stores a validator commitment root.","type":"object","properties":{"commitment":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.FinalProofResult":{"description":"FinalProofResult stores an immutable finalized proof outcome.","type":"object","properties":{"finalized_height":{"type":"string","format":"uint64"},"invalid_voting_power":{"type":"string","format":"int64"},"proof_hash":{"type":"string","format":"byte"},"proof_type":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofType"},"public_inputs_hash":{"type":"string","format":"byte"},"status":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofStatus"},"submission_height":{"type":"string","format":"uint64"},"total_voting_power":{"type":"string","format":"int64"},"valid_voting_power":{"type":"string","format":"int64"},"verification_id":{"type":"string","format":"byte"},"verification_key_hash":{"type":"string","format":"byte"},"voting_power_threshold":{"type":"string","format":"int64"}}},"pulsarchain.verification.v1.Params":{"description":"Params defines the governance-controlled verification module parameters.","type":"object","properties":{"max_proofs_per_block":{"type":"integer","format":"int64"}}},"pulsarchain.verification.v1.ProofKey":{"description":"ProofKey identifies a proof by absolute block height and in-block index.","type":"object","properties":{"index_in_block":{"type":"integer","format":"int64"},"submission_height":{"type":"string","format":"uint64"}}},"pulsarchain.verification.v1.ProofRecord":{"description":"ProofRecord stores the complete descriptor and its chain-derived identity.","type":"object","properties":{"proof_hash":{"type":"string","format":"byte"},"proof_type":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofType"},"public_inputs_hash":{"type":"string","format":"byte"},"verification_id":{"type":"string","format":"byte"},"verification_key_hash":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.ProofStatus":{"description":"ProofStatus is the finalized verification outcome.\n\n - PROOF_STATUS_PENDING: PROOF_STATUS_PENDING is the non-finalized status.\n - PROOF_STATUS_VALID: PROOF_STATUS_VALID means valid voting power exceeded two thirds.\n - PROOF_STATUS_INVALID: PROOF_STATUS_INVALID means invalid voting power exceeded two thirds.\n - PROOF_STATUS_INCONCLUSIVE: PROOF_STATUS_INCONCLUSIVE means neither side reached threshold.","type":"string","default":"PROOF_STATUS_PENDING","enum":["PROOF_STATUS_PENDING","PROOF_STATUS_VALID","PROOF_STATUS_INVALID","PROOF_STATUS_INCONCLUSIVE"]},"pulsarchain.verification.v1.ProofTally":{"description":"ProofTally stores the historical consensus power behind effective votes.","type":"object","properties":{"invalid_voting_power":{"type":"string","format":"int64"},"valid_voting_power":{"type":"string","format":"int64"}}},"pulsarchain.verification.v1.ProofType":{"description":"ProofType selects the verifier family. The exact statement and circuit are\nbound separately by the public-input and verification-key hashes.\n\n - PROOF_TYPE_UNSPECIFIED: PROOF_TYPE_UNSPECIFIED is invalid for proof submission.\n - PROOF_TYPE_MINA_PICKLES: PROOF_TYPE_MINA_PICKLES selects Mina's Pickles proof system.\n - PROOF_TYPE_NOIR_BARRETENBERG: PROOF_TYPE_NOIR_BARRETENBERG selects Noir proofs using Barretenberg.","type":"string","default":"PROOF_TYPE_UNSPECIFIED","enum":["PROOF_TYPE_UNSPECIFIED","PROOF_TYPE_MINA_PICKLES","PROOF_TYPE_NOIR_BARRETENBERG"]},"pulsarchain.verification.v1.QueryCommitmentResponse":{"description":"QueryCommitmentResponse contains one retained commitment.","type":"object","properties":{"commitment":{"$ref":"#/definitions/pulsarchain.verification.v1.CommitmentEntry"}}},"pulsarchain.verification.v1.QueryCommitmentsByValidatorResponse":{"description":"QueryCommitmentsByValidatorResponse contains retained commitments.","type":"object","properties":{"commitments":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.CommitmentEntry"}},"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"pulsarchain.verification.v1.QueryFinalProofResultResponse":{"description":"QueryFinalProofResultResponse contains an immutable proof result.","type":"object","properties":{"final_result":{"$ref":"#/definitions/pulsarchain.verification.v1.FinalProofResult"},"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"}}},"pulsarchain.verification.v1.QueryParamsResponse":{"description":"QueryParamsResponse contains verification parameters.","type":"object","properties":{"params":{"$ref":"#/definitions/pulsarchain.verification.v1.Params"}}},"pulsarchain.verification.v1.QueryProofResponse":{"description":"QueryProofResponse contains either pending or finalized proof state.","type":"object","properties":{"final_result":{"$ref":"#/definitions/pulsarchain.verification.v1.FinalProofResult"},"pending":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofRecord"},"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"}}},"pulsarchain.verification.v1.QueryProofTallyResponse":{"description":"QueryProofTallyResponse contains a pending proof tally.","type":"object","properties":{"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"},"tally":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofTally"}}},"pulsarchain.verification.v1.QueryProofsByHeightResponse":{"description":"QueryProofsByHeightResponse contains a page of proofs.","type":"object","properties":{"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"proofs":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}}}},"pulsarchain.verification.v1.QueryVerificationVotesResponse":{"description":"QueryVerificationVotesResponse contains effective votes.","type":"object","properties":{"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"votes":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.VerificationVoteEntry"}}}},"pulsarchain.verification.v1.QueryVoteResponse":{"description":"QueryVoteResponse contains one effective vote.","type":"object","properties":{"vote":{"$ref":"#/definitions/pulsarchain.verification.v1.VerificationVoteEntry"}}},"pulsarchain.verification.v1.VerificationVoteEntry":{"description":"VerificationVoteEntry is a query representation of an effective vote.","type":"object","properties":{"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"},"state":{"$ref":"#/definitions/pulsarchain.verification.v1.VoteState"},"validator":{"type":"string"}}},"pulsarchain.verification.v1.VoteState":{"description":"VoteState tracks a validator's effective vote.\n\n - VOTE_STATE_NONE: VOTE_STATE_NONE means the validator has not voted.\n - VOTE_STATE_TRUE: VOTE_STATE_TRUE is an effective valid vote.\n - VOTE_STATE_FALSE: VOTE_STATE_FALSE is an effective invalid vote.\n - VOTE_STATE_EQUIVOCATED: VOTE_STATE_EQUIVOCATED excludes conflicting votes from the tally.","type":"string","default":"VOTE_STATE_NONE","enum":["VOTE_STATE_NONE","VOTE_STATE_TRUE","VOTE_STATE_FALSE","VOTE_STATE_EQUIVOCATED"]},"pulsarchain.votepersistence.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.votepersistence.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.votepersistence.v1.Params"}}},"pulsarchain.votepersistence.v1.QueryVoteExtensionsResponse":{"description":"QueryVoteExtensionsResponse defines the QueryVoteExtensionsResponse message.","type":"object","properties":{"persisted_vote_extensions_block_height":{"description":"persisted_vote_extensions_block_height is the signed source/current state\nheight. For vote extensions produced at height N, this value is N-2.","type":"string","format":"int64"},"query_block_height":{"type":"string","format":"int64"},"vote_extensions":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.votepersistence.v1.StoredVoteExtension"}}}},"pulsarchain.votepersistence.v1.StoredVoteExtension":{"description":"StoredVoteExtension defines a persisted Mina validator vote extension.","type":"object","properties":{"mina_public_key":{"type":"string","format":"byte"},"vote_extension":{"type":"string","format":"byte"}}},"pulsarchain.votepersistence.v1.VoteExtBody":{"description":"VoteExtBody defines the VoteExtBody message.","type":"object","properties":{"actions_reduced_root":{"type":"string","format":"byte"},"current_block_height":{"type":"string","format":"int64"},"current_state_root":{"type":"string","format":"byte"},"next_validator_set_hash":{"type":"string","format":"byte"}}},"tendermint.abci.Event":{"description":"Event allows application developers to attach additional information to\nResponseFinalizeBlock and ResponseCheckTx.\nLater, transactions may be queried using these events.","type":"object","properties":{"attributes":{"type":"array","items":{"type":"object","$ref":"#/definitions/tendermint.abci.EventAttribute"}},"type":{"type":"string"}}},"tendermint.abci.EventAttribute":{"description":"EventAttribute is a single key-value pair, associated with an event.","type":"object","properties":{"index":{"type":"boolean","title":"nondeterministic"},"key":{"type":"string"},"value":{"type":"string"}}},"tendermint.crypto.PublicKey":{"type":"object","title":"PublicKey defines the keys available for use with Validators","properties":{"ed25519":{"type":"string","format":"byte"},"secp256k1":{"type":"string","format":"byte"}}},"tendermint.p2p.DefaultNodeInfo":{"type":"object","properties":{"channels":{"type":"string","format":"byte"},"default_node_id":{"type":"string"},"listen_addr":{"type":"string"},"moniker":{"type":"string"},"network":{"type":"string"},"other":{"$ref":"#/definitions/tendermint.p2p.DefaultNodeInfoOther"},"protocol_version":{"$ref":"#/definitions/tendermint.p2p.ProtocolVersion"},"version":{"type":"string"}}},"tendermint.p2p.DefaultNodeInfoOther":{"type":"object","properties":{"rpc_address":{"type":"string"},"tx_index":{"type":"string"}}},"tendermint.p2p.ProtocolVersion":{"type":"object","properties":{"app":{"type":"string","format":"uint64"},"block":{"type":"string","format":"uint64"},"p2p":{"type":"string","format":"uint64"}}},"tendermint.types.ABCIParams":{"description":"ABCIParams configure functionality specific to the Application Blockchain Interface.","type":"object","properties":{"vote_extensions_enable_height":{"description":"vote_extensions_enable_height configures the first height during which\nvote extensions will be enabled. During this specified height, and for all\nsubsequent heights, precommit messages that do not contain valid extension data\nwill be considered invalid. Prior to this height, vote extensions will not\nbe used or accepted by validators on the network.\n\nOnce enabled, vote extensions will be created by the application in ExtendVote,\npassed to the application for validation in VerifyVoteExtension and given\nto the application to use when proposing a block during PrepareProposal.","type":"string","format":"int64"}}},"tendermint.types.Block":{"type":"object","properties":{"data":{"$ref":"#/definitions/tendermint.types.Data"},"evidence":{"$ref":"#/definitions/tendermint.types.EvidenceList"},"header":{"$ref":"#/definitions/tendermint.types.Header"},"last_commit":{"$ref":"#/definitions/tendermint.types.Commit"}}},"tendermint.types.BlockID":{"type":"object","title":"BlockID","properties":{"hash":{"type":"string","format":"byte"},"part_set_header":{"$ref":"#/definitions/tendermint.types.PartSetHeader"}}},"tendermint.types.BlockIDFlag":{"description":"- BLOCK_ID_FLAG_UNKNOWN: indicates an error condition\n - BLOCK_ID_FLAG_ABSENT: the vote was not received\n - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority\n - BLOCK_ID_FLAG_NIL: voted for nil","type":"string","title":"BlockIdFlag indicates which BlockID the signature is for","default":"BLOCK_ID_FLAG_UNKNOWN","enum":["BLOCK_ID_FLAG_UNKNOWN","BLOCK_ID_FLAG_ABSENT","BLOCK_ID_FLAG_COMMIT","BLOCK_ID_FLAG_NIL"]},"tendermint.types.BlockParams":{"description":"BlockParams contains limits on the block size.","type":"object","properties":{"max_bytes":{"type":"string","format":"int64","title":"Max block size, in bytes.\nNote: must be greater than 0"},"max_gas":{"type":"string","format":"int64","title":"Max gas per block.\nNote: must be greater or equal to -1"}}},"tendermint.types.Commit":{"description":"Commit contains the evidence that a block was committed by a set of validators.","type":"object","properties":{"block_id":{"$ref":"#/definitions/tendermint.types.BlockID"},"height":{"type":"string","format":"int64"},"round":{"type":"integer","format":"int32"},"signatures":{"type":"array","items":{"type":"object","$ref":"#/definitions/tendermint.types.CommitSig"}}}},"tendermint.types.CommitSig":{"description":"CommitSig is a part of the Vote included in a Commit.","type":"object","properties":{"block_id_flag":{"$ref":"#/definitions/tendermint.types.BlockIDFlag"},"signature":{"type":"string","format":"byte"},"timestamp":{"type":"string","format":"date-time"},"validator_address":{"type":"string","format":"byte"}}},"tendermint.types.ConsensusParams":{"description":"ConsensusParams contains consensus critical parameters that determine the\nvalidity of blocks.","type":"object","properties":{"abci":{"$ref":"#/definitions/tendermint.types.ABCIParams"},"block":{"$ref":"#/definitions/tendermint.types.BlockParams"},"evidence":{"$ref":"#/definitions/tendermint.types.EvidenceParams"},"validator":{"$ref":"#/definitions/tendermint.types.ValidatorParams"},"version":{"$ref":"#/definitions/tendermint.types.VersionParams"}}},"tendermint.types.Data":{"type":"object","title":"Data contains the set of transactions included in the block","properties":{"txs":{"description":"Txs that will be applied by state @ block.Height+1.\nNOTE: not all txs here are valid. We're just agreeing on the order first.\nThis means that block.AppHash does not include these txs.","type":"array","items":{"type":"string","format":"byte"}}}},"tendermint.types.DuplicateVoteEvidence":{"description":"DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes.","type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"total_voting_power":{"type":"string","format":"int64"},"validator_power":{"type":"string","format":"int64"},"vote_a":{"$ref":"#/definitions/tendermint.types.Vote"},"vote_b":{"$ref":"#/definitions/tendermint.types.Vote"}}},"tendermint.types.Evidence":{"type":"object","properties":{"duplicate_vote_evidence":{"$ref":"#/definitions/tendermint.types.DuplicateVoteEvidence"},"light_client_attack_evidence":{"$ref":"#/definitions/tendermint.types.LightClientAttackEvidence"}}},"tendermint.types.EvidenceList":{"type":"object","properties":{"evidence":{"type":"array","items":{"type":"object","$ref":"#/definitions/tendermint.types.Evidence"}}}},"tendermint.types.EvidenceParams":{"description":"EvidenceParams determine how we handle evidence of malfeasance.","type":"object","properties":{"max_age_duration":{"description":"Max age of evidence, in time.\n\nIt should correspond with an app's \"unbonding period\" or other similar\nmechanism for handling [Nothing-At-Stake\nattacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed).","type":"string"},"max_age_num_blocks":{"description":"Max age of evidence, in blocks.\n\nThe basic formula for calculating this is: MaxAgeDuration / {average block\ntime}.","type":"string","format":"int64"},"max_bytes":{"type":"string","format":"int64","title":"This sets the maximum size of total evidence in bytes that can be committed in a single block.\nand should fall comfortably under the max block bytes.\nDefault is 1048576 or 1MB"}}},"tendermint.types.Header":{"description":"Header defines the structure of a block header.","type":"object","properties":{"app_hash":{"type":"string","format":"byte","title":"state after txs from the previous block"},"chain_id":{"type":"string"},"consensus_hash":{"type":"string","format":"byte","title":"consensus params for current block"},"data_hash":{"type":"string","format":"byte","title":"transactions"},"evidence_hash":{"description":"evidence included in the block","type":"string","format":"byte","title":"consensus info"},"height":{"type":"string","format":"int64"},"last_block_id":{"title":"prev block info","$ref":"#/definitions/tendermint.types.BlockID"},"last_commit_hash":{"description":"commit from validators from the last block","type":"string","format":"byte","title":"hashes of block data"},"last_results_hash":{"type":"string","format":"byte","title":"root hash of all results from the txs from the previous block"},"next_validators_hash":{"type":"string","format":"byte","title":"validators for the next block"},"proposer_address":{"type":"string","format":"byte","title":"original proposer of the block"},"time":{"type":"string","format":"date-time"},"validators_hash":{"description":"validators for the current block","type":"string","format":"byte","title":"hashes from the app output from the prev block"},"version":{"title":"basic block info","$ref":"#/definitions/tendermint.version.Consensus"}}},"tendermint.types.LightBlock":{"type":"object","properties":{"signed_header":{"$ref":"#/definitions/tendermint.types.SignedHeader"},"validator_set":{"$ref":"#/definitions/tendermint.types.ValidatorSet"}}},"tendermint.types.LightClientAttackEvidence":{"description":"LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client.","type":"object","properties":{"byzantine_validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/tendermint.types.Validator"}},"common_height":{"type":"string","format":"int64"},"conflicting_block":{"$ref":"#/definitions/tendermint.types.LightBlock"},"timestamp":{"type":"string","format":"date-time"},"total_voting_power":{"type":"string","format":"int64"}}},"tendermint.types.PartSetHeader":{"type":"object","title":"PartsetHeader","properties":{"hash":{"type":"string","format":"byte"},"total":{"type":"integer","format":"int64"}}},"tendermint.types.SignedHeader":{"type":"object","properties":{"commit":{"$ref":"#/definitions/tendermint.types.Commit"},"header":{"$ref":"#/definitions/tendermint.types.Header"}}},"tendermint.types.SignedMsgType":{"description":"SignedMsgType is a type of signed message in the consensus.\n\n - SIGNED_MSG_TYPE_PREVOTE: Votes\n - SIGNED_MSG_TYPE_PROPOSAL: Proposals","type":"string","default":"SIGNED_MSG_TYPE_UNKNOWN","enum":["SIGNED_MSG_TYPE_UNKNOWN","SIGNED_MSG_TYPE_PREVOTE","SIGNED_MSG_TYPE_PRECOMMIT","SIGNED_MSG_TYPE_PROPOSAL"]},"tendermint.types.Validator":{"type":"object","properties":{"address":{"type":"string","format":"byte"},"proposer_priority":{"type":"string","format":"int64"},"pub_key":{"$ref":"#/definitions/tendermint.crypto.PublicKey"},"voting_power":{"type":"string","format":"int64"}}},"tendermint.types.ValidatorParams":{"description":"ValidatorParams restrict the public key types validators can use.\nNOTE: uses ABCI pubkey naming, not Amino names.","type":"object","properties":{"pub_key_types":{"type":"array","items":{"type":"string"}}}},"tendermint.types.ValidatorSet":{"type":"object","properties":{"proposer":{"$ref":"#/definitions/tendermint.types.Validator"},"total_voting_power":{"type":"string","format":"int64"},"validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/tendermint.types.Validator"}}}},"tendermint.types.VersionParams":{"description":"VersionParams contains the ABCI application version.","type":"object","properties":{"app":{"type":"string","format":"uint64"}}},"tendermint.types.Vote":{"description":"Vote represents a prevote or precommit vote from validators for\nconsensus.","type":"object","properties":{"block_id":{"description":"zero if vote is nil.","$ref":"#/definitions/tendermint.types.BlockID"},"extension":{"description":"Vote extension provided by the application. Only valid for precommit\nmessages.","type":"string","format":"byte"},"extension_signature":{"description":"Vote extension signature by the validator if they participated in\nconsensus for the associated block.\nOnly valid for precommit messages.","type":"string","format":"byte"},"height":{"type":"string","format":"int64"},"round":{"type":"integer","format":"int32"},"signature":{"description":"Vote signature by the validator if they participated in consensus for the\nassociated block.","type":"string","format":"byte"},"timestamp":{"type":"string","format":"date-time"},"type":{"$ref":"#/definitions/tendermint.types.SignedMsgType"},"validator_address":{"type":"string","format":"byte"},"validator_index":{"type":"integer","format":"int32"}}},"tendermint.version.Consensus":{"description":"Consensus captures the consensus rules for processing a block in the blockchain,\nincluding all blockchain data structures and the rules of the application's\nstate transition machine.","type":"object","properties":{"app":{"type":"string","format":"uint64"},"block":{"type":"string","format":"uint64"}}}},"tags":[{"name":"VerificationService"},{"name":"Query"},{"name":"Msg"},{"name":"Service"},{"name":"ReflectionService"},{"name":"ABCIListenerService"},{"name":"ABCI"}]} \ No newline at end of file +{"id":"github.com/node101-io/pulsar-chain","consumes":["application/json"],"produces":["application/json"],"swagger":"2.0","info":{"description":"Chain github.com/node101-io/pulsar-chain REST API","title":"HTTP API Console","contact":{"name":"github.com/node101-io/pulsar-chain"},"version":"version not set"},"paths":{"/node101-io/pulsar-chain/abci/v1/validator_set_with_powers/{block_height}":{"get":{"tags":["Query"],"operationId":"GithubComnode101IopulsarChainQuery_GetValidatorSetWithPowers","parameters":[{"type":"string","format":"int64","name":"block_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.abci.QueryGetValidatorSetWithPowersResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/abci/v1/vote_ext_body_by_height/{vote_extension_height}":{"get":{"tags":["Query"],"summary":"VoteExtBodyByHeight queries the vote extension body for a vote-extension\nconsensus height.","operationId":"GithubComnode101IopulsarChainQuery_VoteExtBodyByHeight","parameters":[{"type":"string","format":"int64","description":"vote_extension_height is the consensus height N where the vote extension is\nproduced. The returned body signs the transition from state N-2 to state N-1.","name":"vote_extension_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.abci.QueryVoteExtBodyByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/actions_reduced_root":{"get":{"tags":["Query"],"summary":"ActionsReducedRoot Queries a list of ActionsReducedRoot items.","operationId":"GithubComnode101IopulsarChainQuery_ActionsReducedRoot","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryActionsReducedRootResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/latest_action_hashes":{"get":{"tags":["Query"],"summary":"LatestActionHashes Queries a list of LatestActionHashes items.","operationId":"GithubComnode101IopulsarChainQuery_LatestActionHashes","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryLatestActionHashesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_user_cosmos_public_key/{user_mina_public_key}":{"get":{"tags":["Query"],"summary":"GetUserCosmosPublicKey Queries a list of GetUserCosmosPublicKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserCosmosPublicKey","parameters":[{"type":"string","format":"byte","name":"user_mina_public_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserCosmosPublicKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_user_mina_public_key/{user_cosmos_public_key}":{"get":{"tags":["Query"],"summary":"GetUserMinaPublicKey Queries a list of GetUserMinaPublicKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserMinaPublicKey","parameters":[{"type":"string","format":"byte","name":"user_cosmos_public_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserMinaPublicKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_cosmos_pub_key/{validator_mina_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorCosmosPubKey Queries a list of GetValidatorCosmosPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorCosmosPubKey","parameters":[{"type":"string","format":"byte","name":"validator_mina_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_mina_pub_key/{validator_cosmos_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorMinaPubKey Queries a list of GetValidatorMinaPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorMinaPubKey","parameters":[{"type":"string","format":"byte","name":"validator_cosmos_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_set_with_mina_keys":{"get":{"tags":["Query"],"summary":"GetValidatorSetWithMinaKeys returns the supplied validator set with each validator's registered Mina public key.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorSetWithMinaKeys","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorSetWithMinaKeysResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/key_signing_challenge":{"get":{"tags":["Query"],"summary":"GetKeySigningChallenge returns the state-bound field a Mina wallet must sign.","operationId":"GithubComnode101IopulsarChainQuery_GetKeySigningChallenge","parameters":[{"enum":["KEY_SIGNING_OPERATION_UNSPECIFIED","KEY_SIGNING_OPERATION_REGISTER","KEY_SIGNING_OPERATION_UPDATE"],"type":"string","default":"KEY_SIGNING_OPERATION_UNSPECIFIED","description":" - KEY_SIGNING_OPERATION_UNSPECIFIED: KEY_SIGNING_OPERATION_UNSPECIFIED is invalid for signing requests.\n - KEY_SIGNING_OPERATION_REGISTER: KEY_SIGNING_OPERATION_REGISTER creates the first stable-key association.\n - KEY_SIGNING_OPERATION_UPDATE: KEY_SIGNING_OPERATION_UPDATE replaces an existing Mina key.","name":"operation","in":"query"},{"enum":["ACTOR_TYPE_UNSPECIFIED","ACTOR_TYPE_USER","ACTOR_TYPE_VALIDATOR"],"type":"string","default":"ACTOR_TYPE_UNSPECIFIED","description":" - ACTOR_TYPE_UNSPECIFIED: ACTOR_TYPE_UNSPECIFIED is invalid for key-registry operations.\n - ACTOR_TYPE_USER: ACTOR_TYPE_USER identifies a user account key association.\n - ACTOR_TYPE_VALIDATOR: ACTOR_TYPE_VALIDATOR identifies a validator consensus key association.","name":"actor_type","in":"query"},{"type":"string","format":"byte","name":"cosmos_public_key","in":"query"},{"type":"string","format":"byte","name":"new_mina_public_key","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetKeySigningChallengeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin17","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/smartaccounts/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin22","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.smartaccounts.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/commitments/{validator}":{"get":{"tags":["Query"],"summary":"CommitmentsByValidator lists retained commitments for a validator.","operationId":"GithubComnode101IopulsarChainQuery_CommitmentsByValidator","parameters":[{"type":"string","name":"validator","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryCommitmentsByValidatorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/commitments/{validator}/{commitment_height}":{"get":{"tags":["Query"],"summary":"Commitment returns one retained validator commitment.","operationId":"GithubComnode101IopulsarChainQuery_Commitment","parameters":[{"type":"string","name":"validator","in":"path","required":true},{"type":"string","format":"uint64","name":"commitment_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryCommitmentResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/params":{"get":{"tags":["Query"],"summary":"Params returns module parameters.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin27","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/height/{submission_height}":{"get":{"tags":["Query"],"summary":"ProofsByHeight lists proofs submitted at a height.","operationId":"GithubComnode101IopulsarChainQuery_ProofsByHeight","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofsByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/verification-id/{verification_id}":{"get":{"tags":["Query"],"summary":"ProofByVerificationId resolves the permanent verification request registry.","operationId":"GithubComnode101IopulsarChainQuery_ProofByVerificationId","parameters":[{"type":"string","format":"byte","name":"verification_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"Proof returns a pending or finalized proof by key.","operationId":"GithubComnode101IopulsarChainQuery_Proof","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/results/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"FinalProofResult returns an immutable finalized result.","operationId":"GithubComnode101IopulsarChainQuery_FinalProofResult","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryFinalProofResultResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/tallies/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"ProofTally returns the active tally for a pending proof.","operationId":"GithubComnode101IopulsarChainQuery_ProofTally","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofTallyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/votes/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"VerificationVotes lists effective votes for a proof.","operationId":"GithubComnode101IopulsarChainQuery_VerificationVotes","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryVerificationVotesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/votes/{submission_height}/{index_in_block}/{validator}":{"get":{"tags":["Query"],"summary":"Vote returns one validator's effective vote for a proof.","operationId":"GithubComnode101IopulsarChainQuery_Vote","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true},{"type":"string","name":"validator","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryVoteResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/votepersistence/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin33","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/votepersistence/v1/vote_extensions":{"get":{"tags":["Query"],"summary":"VoteExtensions queries the currently persisted vote extensions.","operationId":"GithubComnode101IopulsarChainQuery_VoteExtensions","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.QueryVoteExtensionsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}}},"definitions":{"cosmos.base.query.v1beta1.PageRequest":{"description":"message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }","type":"object","title":"PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:","properties":{"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.","type":"boolean"},"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.","type":"string","format":"byte"},"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.","type":"string","format":"uint64"},"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.","type":"string","format":"uint64"},"reverse":{"description":"reverse is set to true if results are to be returned in the descending order.","type":"boolean"}}},"cosmos.base.query.v1beta1.PageResponse":{"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 }","type":"object","properties":{"next_key":{"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.","type":"string","format":"byte"},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}},"google.protobuf.Any":{"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{}},"google.rpc.Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"details":{"type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"message":{"type":"string"}}},"pulsarchain.abci.QueryGetValidatorSetWithPowersResponse":{"type":"object","properties":{"validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.common.ValidatorEntry"}}}},"pulsarchain.abci.QueryVoteExtBodyByHeightResponse":{"description":"QueryVoteExtBodyByHeightResponse defines the response for VoteExtBodyByHeight.","type":"object","properties":{"vote_ext_body":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.VoteExtBody"}}},"pulsarchain.bridge.v1.Params":{"description":"Params defines the parameters for the module.","type":"object","properties":{"actions_reduced_root_snapshot_window_size":{"description":"actions_reduced_root_snapshot_window_size is the retained consensus root window.","type":"string","format":"int64"},"confirmation_depth":{"description":"confirmation_depth is the Mina finality depth used by the archive wrapper.","type":"string","format":"int64"},"contract_address":{"description":"contract_address is the Mina bridge contract address.","type":"string"},"max_block_range":{"description":"max_block_range is the maximum Mina height span processed by one request.","type":"string","format":"int64"},"start_block_height":{"description":"start_block_height is the first Mina block indexed by the bridge.","type":"string","format":"int64"}}},"pulsarchain.bridge.v1.QueryActionsReducedRootResponse":{"description":"QueryActionsReducedRootResponse defines the QueryActionsReducedRootResponse message.","type":"object","properties":{"actions_reduced_root":{"type":"string"}}},"pulsarchain.bridge.v1.QueryLatestActionHashesResponse":{"description":"QueryLatestActionHashesResponse defines the QueryLatestActionHashesResponse message.","type":"object","properties":{"action_hashes":{"description":"action_hashes is the ordered canonical hash batch that reconstructs\nthe root transition for the source Cosmos block.","type":"array","items":{"type":"string"}},"action_hashes_cosmos_block_height":{"description":"action_hashes_cosmos_block_height is the Cosmos block height where\nthis query batch was produced.","type":"string","format":"int64"},"latest_fetched_mina_height":{"description":"latest_fetched_mina_height is the inclusive upper Mina cursor of the\ncurrent batch. Together with start_mina_height it defines the consumed\nMina interval (start_mina_height, latest_fetched_mina_height].","type":"string","format":"int64"},"start_mina_height":{"description":"start_mina_height is the exclusive lower Mina cursor of the current batch.","type":"string","format":"int64"}}},"pulsarchain.bridge.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.bridge.v1.Params"}}},"pulsarchain.common.ValidatorEntry":{"type":"object","properties":{"consensus_power":{"type":"string","format":"int64"},"validator_cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.ActorType":{"description":"ActorType identifies the key-registry actor authorized by a signing challenge.\n\n - ACTOR_TYPE_UNSPECIFIED: ACTOR_TYPE_UNSPECIFIED is invalid for key-registry operations.\n - ACTOR_TYPE_USER: ACTOR_TYPE_USER identifies a user account key association.\n - ACTOR_TYPE_VALIDATOR: ACTOR_TYPE_VALIDATOR identifies a validator consensus key association.","type":"string","default":"ACTOR_TYPE_UNSPECIFIED","enum":["ACTOR_TYPE_UNSPECIFIED","ACTOR_TYPE_USER","ACTOR_TYPE_VALIDATOR"]},"pulsarchain.keyregistry.v1.KeySigningOperation":{"description":"KeySigningOperation identifies the key-registry state transition authorized\nby a wallet field signature.\n\n - KEY_SIGNING_OPERATION_UNSPECIFIED: KEY_SIGNING_OPERATION_UNSPECIFIED is invalid for signing requests.\n - KEY_SIGNING_OPERATION_REGISTER: KEY_SIGNING_OPERATION_REGISTER creates the first stable-key association.\n - KEY_SIGNING_OPERATION_UPDATE: KEY_SIGNING_OPERATION_UPDATE replaces an existing Mina key.","type":"string","default":"KEY_SIGNING_OPERATION_UNSPECIFIED","enum":["KEY_SIGNING_OPERATION_UNSPECIFIED","KEY_SIGNING_OPERATION_REGISTER","KEY_SIGNING_OPERATION_UPDATE"]},"pulsarchain.keyregistry.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.keyregistry.v1.QueryGetKeySigningChallengeResponse":{"description":"QueryGetKeySigningChallengeResponse contains the exact field and state version to sign.","type":"object","properties":{"challenge":{"type":"string"},"challenge_bytes":{"type":"string","format":"byte"},"new_key_version":{"type":"string","format":"uint64"},"previous_mina_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetUserCosmosPublicKeyResponse":{"description":"QueryGetUserCosmosPublicKeyResponse defines the QueryGetUserCosmosPublicKeyResponse message.","type":"object","properties":{"user_cosmos_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetUserMinaPublicKeyResponse":{"description":"QueryGetUserMinaPublicKeyResponse defines the QueryGetUserMinaPublicKeyResponse message.","type":"object","properties":{"user_mina_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse":{"description":"QueryGetValidatorCosmosPubKeyResponse defines the QueryGetValidatorCosmosPubKeyResponse message.","type":"object","properties":{"validator_cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse":{"description":"QueryGetValidatorMinaPubKeyResponse defines the QueryGetValidatorMinaPubKeyResponse message.","type":"object","properties":{"validator_mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorSetWithMinaKeysResponse":{"description":"QueryGetValidatorSetWithMinaKeysResponse defines the response for GetValidatorSetWithMinaKeys.","type":"object","properties":{"registered_validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.keyregistry.v1.RegisteredValidatorSetEntry"}}}},"pulsarchain.keyregistry.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.keyregistry.v1.Params"}}},"pulsarchain.keyregistry.v1.RegisteredValidatorSetEntry":{"type":"object","properties":{"consensus_power":{"type":"string","format":"int64"},"validator_cosmos_pub_key":{"type":"string","format":"byte"},"validator_mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.smartaccounts.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.smartaccounts.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.smartaccounts.v1.Params"}}},"pulsarchain.verification.v1.CommitmentEntry":{"description":"CommitmentEntry is a query representation of a retained commitment.","type":"object","properties":{"commitment":{"$ref":"#/definitions/pulsarchain.verification.v1.CommitmentRecord"},"commitment_height":{"type":"string","format":"uint64"},"validator":{"type":"string"}}},"pulsarchain.verification.v1.CommitmentRecord":{"description":"CommitmentRecord stores a validator commitment root.","type":"object","properties":{"commitment":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.FinalProofResult":{"description":"FinalProofResult stores an immutable finalized proof outcome.","type":"object","properties":{"finalized_height":{"type":"string","format":"uint64"},"invalid_voting_power":{"type":"string","format":"int64"},"proof_hash":{"type":"string","format":"byte"},"proof_type":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofType"},"public_inputs_hash":{"type":"string","format":"byte"},"status":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofStatus"},"submission_height":{"type":"string","format":"uint64"},"total_voting_power":{"type":"string","format":"int64"},"valid_voting_power":{"type":"string","format":"int64"},"verification_id":{"type":"string","format":"byte"},"verification_key_hash":{"type":"string","format":"byte"},"voting_power_threshold":{"type":"string","format":"int64"}}},"pulsarchain.verification.v1.Params":{"description":"Params defines the governance-controlled verification module parameters.","type":"object","properties":{"max_proofs_per_block":{"type":"integer","format":"int64"}}},"pulsarchain.verification.v1.ProofKey":{"description":"ProofKey identifies a proof by absolute block height and in-block index.","type":"object","properties":{"index_in_block":{"type":"integer","format":"int64"},"submission_height":{"type":"string","format":"uint64"}}},"pulsarchain.verification.v1.ProofRecord":{"description":"ProofRecord stores the complete descriptor and its chain-derived identity.","type":"object","properties":{"proof_hash":{"type":"string","format":"byte"},"proof_type":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofType"},"public_inputs_hash":{"type":"string","format":"byte"},"verification_id":{"type":"string","format":"byte"},"verification_key_hash":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.ProofStatus":{"description":"ProofStatus is the finalized verification outcome.\n\n - PROOF_STATUS_PENDING: PROOF_STATUS_PENDING is the non-finalized status.\n - PROOF_STATUS_VALID: PROOF_STATUS_VALID means valid voting power exceeded two thirds.\n - PROOF_STATUS_INVALID: PROOF_STATUS_INVALID means invalid voting power exceeded two thirds.\n - PROOF_STATUS_INCONCLUSIVE: PROOF_STATUS_INCONCLUSIVE means neither side reached threshold.","type":"string","default":"PROOF_STATUS_PENDING","enum":["PROOF_STATUS_PENDING","PROOF_STATUS_VALID","PROOF_STATUS_INVALID","PROOF_STATUS_INCONCLUSIVE"]},"pulsarchain.verification.v1.ProofTally":{"description":"ProofTally stores the historical consensus power behind effective votes.","type":"object","properties":{"invalid_voting_power":{"type":"string","format":"int64"},"valid_voting_power":{"type":"string","format":"int64"}}},"pulsarchain.verification.v1.ProofType":{"description":"ProofType selects the verifier family. The exact statement and circuit are\nbound separately by the public-input and verification-key hashes.\n\n - PROOF_TYPE_UNSPECIFIED: PROOF_TYPE_UNSPECIFIED is invalid for proof submission.\n - PROOF_TYPE_MINA_PICKLES: PROOF_TYPE_MINA_PICKLES selects Mina's Pickles proof system.\n - PROOF_TYPE_NOIR_BARRETENBERG: PROOF_TYPE_NOIR_BARRETENBERG selects Noir proofs using Barretenberg.","type":"string","default":"PROOF_TYPE_UNSPECIFIED","enum":["PROOF_TYPE_UNSPECIFIED","PROOF_TYPE_MINA_PICKLES","PROOF_TYPE_NOIR_BARRETENBERG"]},"pulsarchain.verification.v1.QueryCommitmentResponse":{"description":"QueryCommitmentResponse contains one retained commitment.","type":"object","properties":{"commitment":{"$ref":"#/definitions/pulsarchain.verification.v1.CommitmentEntry"}}},"pulsarchain.verification.v1.QueryCommitmentsByValidatorResponse":{"description":"QueryCommitmentsByValidatorResponse contains retained commitments.","type":"object","properties":{"commitments":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.CommitmentEntry"}},"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"pulsarchain.verification.v1.QueryFinalProofResultResponse":{"description":"QueryFinalProofResultResponse contains an immutable proof result.","type":"object","properties":{"final_result":{"$ref":"#/definitions/pulsarchain.verification.v1.FinalProofResult"},"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"}}},"pulsarchain.verification.v1.QueryParamsResponse":{"description":"QueryParamsResponse contains verification parameters.","type":"object","properties":{"params":{"$ref":"#/definitions/pulsarchain.verification.v1.Params"}}},"pulsarchain.verification.v1.QueryProofResponse":{"description":"QueryProofResponse contains either pending or finalized proof state.","type":"object","properties":{"final_result":{"$ref":"#/definitions/pulsarchain.verification.v1.FinalProofResult"},"pending":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofRecord"},"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"}}},"pulsarchain.verification.v1.QueryProofTallyResponse":{"description":"QueryProofTallyResponse contains a pending proof tally.","type":"object","properties":{"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"},"tally":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofTally"}}},"pulsarchain.verification.v1.QueryProofsByHeightResponse":{"description":"QueryProofsByHeightResponse contains a page of proofs.","type":"object","properties":{"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"proofs":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}}}},"pulsarchain.verification.v1.QueryVerificationVotesResponse":{"description":"QueryVerificationVotesResponse contains effective votes.","type":"object","properties":{"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"votes":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.VerificationVoteEntry"}}}},"pulsarchain.verification.v1.QueryVoteResponse":{"description":"QueryVoteResponse contains one effective vote.","type":"object","properties":{"vote":{"$ref":"#/definitions/pulsarchain.verification.v1.VerificationVoteEntry"}}},"pulsarchain.verification.v1.VerificationVoteEntry":{"description":"VerificationVoteEntry is a query representation of an effective vote.","type":"object","properties":{"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"},"state":{"$ref":"#/definitions/pulsarchain.verification.v1.VoteState"},"validator":{"type":"string"}}},"pulsarchain.verification.v1.VoteState":{"description":"VoteState tracks a validator's effective vote.\n\n - VOTE_STATE_NONE: VOTE_STATE_NONE means the validator has not voted.\n - VOTE_STATE_TRUE: VOTE_STATE_TRUE is an effective valid vote.\n - VOTE_STATE_FALSE: VOTE_STATE_FALSE is an effective invalid vote.\n - VOTE_STATE_EQUIVOCATED: VOTE_STATE_EQUIVOCATED excludes conflicting votes from the tally.","type":"string","default":"VOTE_STATE_NONE","enum":["VOTE_STATE_NONE","VOTE_STATE_TRUE","VOTE_STATE_FALSE","VOTE_STATE_EQUIVOCATED"]},"pulsarchain.votepersistence.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.votepersistence.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.votepersistence.v1.Params"}}},"pulsarchain.votepersistence.v1.QueryVoteExtensionsResponse":{"description":"QueryVoteExtensionsResponse defines the QueryVoteExtensionsResponse message.","type":"object","properties":{"persisted_vote_extensions_block_height":{"description":"persisted_vote_extensions_block_height is the signed source/current state\nheight. For vote extensions produced at height N, this value is N-2.","type":"string","format":"int64"},"query_block_height":{"type":"string","format":"int64"},"vote_extensions":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.votepersistence.v1.StoredVoteExtension"}}}},"pulsarchain.votepersistence.v1.StoredVoteExtension":{"description":"StoredVoteExtension defines a persisted Mina validator vote extension.","type":"object","properties":{"mina_public_key":{"type":"string","format":"byte"},"vote_extension":{"type":"string","format":"byte"}}},"pulsarchain.votepersistence.v1.VoteExtBody":{"description":"VoteExtBody defines the VoteExtBody message.","type":"object","properties":{"actions_reduced_root":{"type":"string","format":"byte"},"current_block_height":{"type":"string","format":"int64"},"current_state_root":{"type":"string","format":"byte"},"next_validator_set_hash":{"type":"string","format":"byte"}}}},"tags":[{"name":"VerificationService"},{"name":"Query"},{"name":"Msg"}]} \ No newline at end of file diff --git a/proto/pulsarchain/smartaccounts/v1/tx.proto b/proto/pulsarchain/smartaccounts/v1/tx.proto index da224f62..5c65393e 100644 --- a/proto/pulsarchain/smartaccounts/v1/tx.proto +++ b/proto/pulsarchain/smartaccounts/v1/tx.proto @@ -1,4 +1,5 @@ syntax = "proto3"; + package pulsarchain.smartaccounts.v1; import "amino/amino.proto"; @@ -6,6 +7,7 @@ import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "pulsarchain/smartaccounts/v1/params.proto"; +import "pulsarchain/smartaccounts/v1/types.proto"; option go_package = "github.com/node101-io/pulsar-chain/x/smartaccounts/types"; @@ -16,6 +18,9 @@ service Msg { // UpdateParams defines a (governance) operation for updating the module // parameters. The authority defaults to the x/gov module account. rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); + + // AddPublicKey defines the AddPublicKey RPC. + rpc AddPublicKey(MsgAddPublicKey) returns (MsgAddPublicKeyResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. @@ -38,3 +43,14 @@ message MsgUpdateParams { // MsgUpdateParamsResponse defines the response structure for executing a // MsgUpdateParams message. message MsgUpdateParamsResponse {} + +// MsgAddPublicKey defines the MsgAddPublicKey message. +message MsgAddPublicKey { + option (cosmos.msg.v1.signer) = "creator"; + string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + bytes verification_key_hash = 2; + PublicKeyInputs public_key_inputs = 3; +} + +// MsgAddPublicKeyResponse defines the MsgAddPublicKeyResponse message. +message MsgAddPublicKeyResponse {} diff --git a/proto/pulsarchain/smartaccounts/v1/types.proto b/proto/pulsarchain/smartaccounts/v1/types.proto index 9e30dcca..729b90a4 100644 --- a/proto/pulsarchain/smartaccounts/v1/types.proto +++ b/proto/pulsarchain/smartaccounts/v1/types.proto @@ -13,4 +13,10 @@ message SmartAccount { message SessionKey { bytes public_key = 1; uint64 expires_at_height = 2; -} \ No newline at end of file +} + +// PublicKeyInputs defines the PublicKeyInputs message. +message PublicKeyInputs { + bytes session_public_key = 1; + uint64 expires_at_height = 2; +} diff --git a/x/smartaccounts/keeper/msg_server_add_public_key.go b/x/smartaccounts/keeper/msg_server_add_public_key.go new file mode 100644 index 00000000..498fb9dd --- /dev/null +++ b/x/smartaccounts/keeper/msg_server_add_public_key.go @@ -0,0 +1,18 @@ +package keeper + +import ( + "context" + + errorsmod "cosmossdk.io/errors" + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +func (k msgServer) AddPublicKey(ctx context.Context, msg *types.MsgAddPublicKey) (*types.MsgAddPublicKeyResponse, error) { + if _, err := k.addressCodec.StringToBytes(msg.Creator); err != nil { + return nil, errorsmod.Wrap(err, "invalid authority address") + } + + // TODO: Handle the message + + return &types.MsgAddPublicKeyResponse{}, nil +} diff --git a/x/smartaccounts/module/autocli.go b/x/smartaccounts/module/autocli.go index 0fddd0f7..c0996455 100644 --- a/x/smartaccounts/module/autocli.go +++ b/x/smartaccounts/module/autocli.go @@ -27,6 +27,12 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { RpcMethod: "UpdateParams", Skip: true, // skipped because authority gated }, + { + RpcMethod: "AddPublicKey", + Use: "add-public-key [verification-key-hash]", + Short: "Send a add-public-key tx", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "verification_key_hash", Varargs: true}}, + }, }, }, } diff --git a/x/smartaccounts/types/codec.go b/x/smartaccounts/types/codec.go index 56398f5e..bf8f4db7 100644 --- a/x/smartaccounts/types/codec.go +++ b/x/smartaccounts/types/codec.go @@ -7,6 +7,10 @@ import ( ) func RegisterInterfaces(registrar codectypes.InterfaceRegistry) { + registrar.RegisterImplementations((*sdk.Msg)(nil), + &MsgAddPublicKey{}, + ) + registrar.RegisterImplementations((*sdk.Msg)(nil), &MsgUpdateParams{}, ) diff --git a/x/smartaccounts/types/tx.pb.go b/x/smartaccounts/types/tx.pb.go index 41b6e2f7..1d48c585 100644 --- a/x/smartaccounts/types/tx.pb.go +++ b/x/smartaccounts/types/tx.pb.go @@ -126,9 +126,109 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo +// MsgAddPublicKey defines the MsgAddPublicKey message. +type MsgAddPublicKey struct { + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + VerificationKeyHash []byte `protobuf:"bytes,2,opt,name=verification_key_hash,json=verificationKeyHash,proto3" json:"verification_key_hash,omitempty"` + PublicKeyInputs *PublicKeyInputs `protobuf:"bytes,3,opt,name=public_key_inputs,json=publicKeyInputs,proto3" json:"public_key_inputs,omitempty"` +} + +func (m *MsgAddPublicKey) Reset() { *m = MsgAddPublicKey{} } +func (m *MsgAddPublicKey) String() string { return proto.CompactTextString(m) } +func (*MsgAddPublicKey) ProtoMessage() {} +func (*MsgAddPublicKey) Descriptor() ([]byte, []int) { + return fileDescriptor_c2293ab44008f8fc, []int{2} +} +func (m *MsgAddPublicKey) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddPublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddPublicKey.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAddPublicKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddPublicKey.Merge(m, src) +} +func (m *MsgAddPublicKey) XXX_Size() int { + return m.Size() +} +func (m *MsgAddPublicKey) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddPublicKey.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddPublicKey proto.InternalMessageInfo + +func (m *MsgAddPublicKey) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +func (m *MsgAddPublicKey) GetVerificationKeyHash() []byte { + if m != nil { + return m.VerificationKeyHash + } + return nil +} + +func (m *MsgAddPublicKey) GetPublicKeyInputs() *PublicKeyInputs { + if m != nil { + return m.PublicKeyInputs + } + return nil +} + +// MsgAddPublicKeyResponse defines the MsgAddPublicKeyResponse message. +type MsgAddPublicKeyResponse struct { +} + +func (m *MsgAddPublicKeyResponse) Reset() { *m = MsgAddPublicKeyResponse{} } +func (m *MsgAddPublicKeyResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAddPublicKeyResponse) ProtoMessage() {} +func (*MsgAddPublicKeyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c2293ab44008f8fc, []int{3} +} +func (m *MsgAddPublicKeyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAddPublicKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAddPublicKeyResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAddPublicKeyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAddPublicKeyResponse.Merge(m, src) +} +func (m *MsgAddPublicKeyResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAddPublicKeyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAddPublicKeyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAddPublicKeyResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "pulsarchain.smartaccounts.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "pulsarchain.smartaccounts.v1.MsgUpdateParamsResponse") + proto.RegisterType((*MsgAddPublicKey)(nil), "pulsarchain.smartaccounts.v1.MsgAddPublicKey") + proto.RegisterType((*MsgAddPublicKeyResponse)(nil), "pulsarchain.smartaccounts.v1.MsgAddPublicKeyResponse") } func init() { @@ -136,30 +236,39 @@ func init() { } var fileDescriptor_c2293ab44008f8fc = []byte{ - // 366 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2d, 0x28, 0xcd, 0x29, - 0x4e, 0x2c, 0x4a, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x2f, 0xce, 0x4d, 0x2c, 0x2a, 0x49, 0x4c, 0x4e, - 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, - 0xc9, 0x17, 0x92, 0x41, 0x52, 0xa6, 0x87, 0xa2, 0x4c, 0xaf, 0xcc, 0x50, 0x4a, 0x30, 0x31, 0x37, - 0x33, 0x2f, 0x5f, 0x1f, 0x4c, 0x42, 0x34, 0x48, 0x89, 0x27, 0xe7, 0x17, 0xe7, 0xe6, 0x17, 0xeb, - 0xe7, 0x16, 0xa7, 0x83, 0x0c, 0xca, 0x2d, 0x4e, 0x87, 0x4a, 0x48, 0x42, 0x24, 0xe2, 0xc1, 0x3c, - 0x7d, 0x08, 0x07, 0x2a, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x11, 0x07, 0xb1, 0xa0, 0xa2, 0x9a, - 0x78, 0x5d, 0x58, 0x90, 0x58, 0x94, 0x98, 0x0b, 0x35, 0x40, 0xe9, 0x12, 0x23, 0x17, 0xbf, 0x6f, - 0x71, 0x7a, 0x68, 0x41, 0x4a, 0x62, 0x49, 0x6a, 0x00, 0x58, 0x46, 0xc8, 0x8c, 0x8b, 0x33, 0xb1, - 0xb4, 0x24, 0x23, 0xbf, 0x28, 0xb3, 0xa4, 0x52, 0x82, 0x51, 0x81, 0x51, 0x83, 0xd3, 0x49, 0xe2, - 0xd2, 0x16, 0x5d, 0x11, 0xa8, 0xcd, 0x8e, 0x29, 0x29, 0x45, 0xa9, 0xc5, 0xc5, 0xc1, 0x25, 0x45, - 0x99, 0x79, 0xe9, 0x41, 0x08, 0xa5, 0x42, 0xee, 0x5c, 0x6c, 0x10, 0xb3, 0x25, 0x98, 0x14, 0x18, - 0x35, 0xb8, 0x8d, 0x54, 0xf4, 0xf0, 0x05, 0x81, 0x1e, 0xc4, 0x36, 0x27, 0xce, 0x13, 0xf7, 0xe4, - 0x19, 0x56, 0x3c, 0xdf, 0xa0, 0xc5, 0x18, 0x04, 0xd5, 0x6e, 0x65, 0xd7, 0xf4, 0x7c, 0x83, 0x16, - 0xc2, 0xe0, 0xae, 0xe7, 0x1b, 0xb4, 0xb4, 0x91, 0xbd, 0x54, 0x81, 0xe6, 0x29, 0x34, 0x0f, 0x28, - 0x49, 0x72, 0x89, 0xa3, 0x09, 0x05, 0xa5, 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0x1a, 0x35, 0x31, - 0x72, 0x31, 0xfb, 0x16, 0xa7, 0x0b, 0x95, 0x70, 0xf1, 0xa0, 0xf8, 0x59, 0x17, 0xbf, 0x5b, 0xd1, - 0x8c, 0x93, 0x32, 0x25, 0x49, 0x39, 0xcc, 0x76, 0x29, 0xd6, 0x06, 0x90, 0x3f, 0x9d, 0x82, 0x4e, - 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, - 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x22, 0x3d, 0xb3, 0x24, 0xa3, 0x34, - 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x2f, 0x3f, 0x25, 0xd5, 0xd0, 0xc0, 0x50, 0x37, 0x33, 0x5f, - 0x1f, 0x62, 0x99, 0x2e, 0x76, 0xdf, 0x97, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0xe3, 0xd3, - 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x6e, 0x47, 0x82, 0x9e, 0x02, 0x00, 0x00, + // 498 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x4f, 0x6b, 0x13, 0x41, + 0x14, 0xcf, 0x58, 0xac, 0x64, 0x0c, 0x94, 0xae, 0x95, 0xa6, 0x41, 0xd6, 0x12, 0x14, 0x62, 0x24, + 0xbb, 0x26, 0xa2, 0x48, 0x0f, 0x42, 0x73, 0x51, 0x29, 0x85, 0xb2, 0xe2, 0x41, 0x2f, 0x61, 0xb2, + 0x3b, 0xee, 0x0e, 0x76, 0x77, 0x86, 0x79, 0xb3, 0xa1, 0x7b, 0x13, 0x8f, 0x9e, 0xfc, 0x18, 0x1e, + 0x73, 0xf0, 0x43, 0xf4, 0x58, 0x7a, 0xf2, 0x24, 0x92, 0x1c, 0xf2, 0x15, 0x3c, 0xca, 0xce, 0xee, + 0xd2, 0x4d, 0x28, 0x59, 0xbd, 0x84, 0xcc, 0x7b, 0xbf, 0xf7, 0x7e, 0x7f, 0x76, 0x06, 0x3f, 0x14, + 0xf1, 0x29, 0x10, 0xe9, 0x06, 0x84, 0x45, 0x36, 0x84, 0x44, 0x2a, 0xe2, 0xba, 0x3c, 0x8e, 0x14, + 0xd8, 0x93, 0xbe, 0xad, 0xce, 0x2c, 0x21, 0xb9, 0xe2, 0xc6, 0xbd, 0x12, 0xcc, 0x5a, 0x82, 0x59, + 0x93, 0x7e, 0x6b, 0x9b, 0x84, 0x2c, 0xe2, 0xb6, 0xfe, 0xcd, 0x06, 0x5a, 0xbb, 0x2e, 0x87, 0x90, + 0x83, 0x1d, 0x82, 0x9f, 0x2e, 0x0a, 0xc1, 0xcf, 0x1b, 0x7b, 0x59, 0x63, 0xa4, 0x4f, 0x76, 0x76, + 0xc8, 0x5b, 0x3b, 0x3e, 0xf7, 0x79, 0x56, 0x4f, 0xff, 0xe5, 0xd5, 0x47, 0x6b, 0x15, 0x0a, 0x22, + 0x49, 0x58, 0x2c, 0xe8, 0xac, 0x37, 0x93, 0x08, 0x9a, 0x23, 0xdb, 0x97, 0x08, 0x6f, 0x1d, 0x83, + 0xff, 0x4e, 0x78, 0x44, 0xd1, 0x13, 0xbd, 0xc3, 0x78, 0x8e, 0xeb, 0x24, 0x56, 0x01, 0x97, 0x4c, + 0x25, 0x4d, 0xb4, 0x8f, 0x3a, 0xf5, 0x61, 0xf3, 0xf2, 0x47, 0x6f, 0x27, 0xd7, 0x78, 0xe8, 0x79, + 0x92, 0x02, 0xbc, 0x55, 0x92, 0x45, 0xbe, 0x73, 0x05, 0x35, 0x5e, 0xe1, 0xcd, 0x4c, 0x45, 0xf3, + 0xc6, 0x3e, 0xea, 0xdc, 0x1e, 0x3c, 0xb0, 0xd6, 0x85, 0x65, 0x65, 0x6c, 0xc3, 0xfa, 0xf9, 0xaf, + 0xfb, 0xb5, 0xef, 0x8b, 0x69, 0x17, 0x39, 0xf9, 0xf8, 0xc1, 0xcb, 0x2f, 0x8b, 0x69, 0xf7, 0x6a, + 0xf1, 0xd7, 0xc5, 0xb4, 0xfb, 0xb8, 0xec, 0xe8, 0x6c, 0xc5, 0xd3, 0x8a, 0x81, 0xf6, 0x1e, 0xde, + 0x5d, 0x29, 0x39, 0x14, 0x04, 0x8f, 0x80, 0xb6, 0x67, 0x99, 0xdf, 0x43, 0xcf, 0x3b, 0x89, 0xc7, + 0xa7, 0xcc, 0x3d, 0xa2, 0x89, 0x31, 0xc0, 0xb7, 0x5c, 0x49, 0x89, 0xe2, 0xb2, 0xd2, 0x6d, 0x01, + 0x34, 0x06, 0xf8, 0xee, 0x84, 0x4a, 0xf6, 0x91, 0xb9, 0x44, 0x31, 0x1e, 0x8d, 0x3e, 0xd1, 0x64, + 0x14, 0x10, 0x08, 0xb4, 0xf5, 0x86, 0x73, 0xa7, 0xdc, 0x3c, 0xa2, 0xc9, 0x6b, 0x02, 0x81, 0xf1, + 0x1e, 0x6f, 0x0b, 0x4d, 0xaa, 0xd1, 0x2c, 0x12, 0xb1, 0x82, 0xe6, 0x86, 0x8e, 0xaa, 0x57, 0x11, + 0x55, 0xa1, 0xf5, 0x8d, 0x1e, 0x72, 0xb6, 0xc4, 0x72, 0xe1, 0xa0, 0x91, 0x26, 0x56, 0x88, 0xcb, + 0xfd, 0x97, 0x3d, 0x16, 0xfe, 0x07, 0x7f, 0x10, 0xde, 0x38, 0x06, 0xdf, 0x50, 0xb8, 0xb1, 0xf4, + 0xcd, 0x2b, 0x04, 0xac, 0xc4, 0xd9, 0x7a, 0xf6, 0x5f, 0xf0, 0x82, 0x3d, 0x65, 0x5d, 0x4a, 0xbe, + 0x9a, 0xb5, 0x0c, 0xff, 0x07, 0xd6, 0xeb, 0x3c, 0xb7, 0x6e, 0x7e, 0x4e, 0x6f, 0xd7, 0xd0, 0x39, + 0x9f, 0x99, 0xe8, 0x62, 0x66, 0xa2, 0xdf, 0x33, 0x13, 0x7d, 0x9b, 0x9b, 0xb5, 0x8b, 0xb9, 0x59, + 0xfb, 0x39, 0x37, 0x6b, 0x1f, 0x5e, 0xf8, 0x4c, 0x05, 0xf1, 0xd8, 0x72, 0x79, 0x68, 0x47, 0xdc, + 0xa3, 0xfd, 0x27, 0xfd, 0x1e, 0xe3, 0x76, 0x46, 0xd6, 0xbb, 0xfe, 0xce, 0xe9, 0x47, 0x34, 0xde, + 0xd4, 0xaf, 0xe8, 0xe9, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfa, 0x60, 0xad, 0xdd, 0x3e, 0x04, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -177,6 +286,8 @@ type MsgClient interface { // UpdateParams defines a (governance) operation for updating the module // parameters. The authority defaults to the x/gov module account. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // AddPublicKey defines the AddPublicKey RPC. + AddPublicKey(ctx context.Context, in *MsgAddPublicKey, opts ...grpc.CallOption) (*MsgAddPublicKeyResponse, error) } type msgClient struct { @@ -196,11 +307,22 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } +func (c *msgClient) AddPublicKey(ctx context.Context, in *MsgAddPublicKey, opts ...grpc.CallOption) (*MsgAddPublicKeyResponse, error) { + out := new(MsgAddPublicKeyResponse) + err := c.cc.Invoke(ctx, "/pulsarchain.smartaccounts.v1.Msg/AddPublicKey", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // UpdateParams defines a (governance) operation for updating the module // parameters. The authority defaults to the x/gov module account. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // AddPublicKey defines the AddPublicKey RPC. + AddPublicKey(context.Context, *MsgAddPublicKey) (*MsgAddPublicKeyResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -210,6 +332,9 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } +func (*UnimplementedMsgServer) AddPublicKey(ctx context.Context, req *MsgAddPublicKey) (*MsgAddPublicKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddPublicKey not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -233,6 +358,24 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_AddPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAddPublicKey) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).AddPublicKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pulsarchain.smartaccounts.v1.Msg/AddPublicKey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AddPublicKey(ctx, req.(*MsgAddPublicKey)) + } + return interceptor(ctx, in, info, handler) +} + var Msg_serviceDesc = _Msg_serviceDesc var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "pulsarchain.smartaccounts.v1.Msg", @@ -242,6 +385,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "AddPublicKey", + Handler: _Msg_AddPublicKey_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "pulsarchain/smartaccounts/v1/tx.proto", @@ -310,6 +457,78 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *MsgAddPublicKey) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAddPublicKey) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddPublicKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PublicKeyInputs != nil { + { + size, err := m.PublicKeyInputs.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.VerificationKeyHash) > 0 { + i -= len(m.VerificationKeyHash) + copy(dAtA[i:], m.VerificationKeyHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.VerificationKeyHash))) + i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAddPublicKeyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAddPublicKeyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAddPublicKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -345,6 +564,36 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { return n } +func (m *MsgAddPublicKey) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.VerificationKeyHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.PublicKeyInputs != nil { + l = m.PublicKeyInputs.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgAddPublicKeyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -516,6 +765,208 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgAddPublicKey) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddPublicKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddPublicKey: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerificationKeyHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VerificationKeyHash = append(m.VerificationKeyHash[:0], dAtA[iNdEx:postIndex]...) + if m.VerificationKeyHash == nil { + m.VerificationKeyHash = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyInputs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PublicKeyInputs == nil { + m.PublicKeyInputs = &PublicKeyInputs{} + } + if err := m.PublicKeyInputs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAddPublicKeyResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAddPublicKeyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAddPublicKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/smartaccounts/types/types.pb.go b/x/smartaccounts/types/types.pb.go index f7948aae..545b6df7 100644 --- a/x/smartaccounts/types/types.pb.go +++ b/x/smartaccounts/types/types.pb.go @@ -120,9 +120,63 @@ func (m *SessionKey) GetExpiresAtHeight() uint64 { return 0 } +// PublicKeyInputs defines the PublicKeyInputs message. +type PublicKeyInputs struct { + SessionPublicKey []byte `protobuf:"bytes,1,opt,name=session_public_key,json=sessionPublicKey,proto3" json:"session_public_key,omitempty"` + ExpiresAtHeight uint64 `protobuf:"varint,2,opt,name=expires_at_height,json=expiresAtHeight,proto3" json:"expires_at_height,omitempty"` +} + +func (m *PublicKeyInputs) Reset() { *m = PublicKeyInputs{} } +func (m *PublicKeyInputs) String() string { return proto.CompactTextString(m) } +func (*PublicKeyInputs) ProtoMessage() {} +func (*PublicKeyInputs) Descriptor() ([]byte, []int) { + return fileDescriptor_5513da7f29cb5285, []int{2} +} +func (m *PublicKeyInputs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PublicKeyInputs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PublicKeyInputs.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PublicKeyInputs) XXX_Merge(src proto.Message) { + xxx_messageInfo_PublicKeyInputs.Merge(m, src) +} +func (m *PublicKeyInputs) XXX_Size() int { + return m.Size() +} +func (m *PublicKeyInputs) XXX_DiscardUnknown() { + xxx_messageInfo_PublicKeyInputs.DiscardUnknown(m) +} + +var xxx_messageInfo_PublicKeyInputs proto.InternalMessageInfo + +func (m *PublicKeyInputs) GetSessionPublicKey() []byte { + if m != nil { + return m.SessionPublicKey + } + return nil +} + +func (m *PublicKeyInputs) GetExpiresAtHeight() uint64 { + if m != nil { + return m.ExpiresAtHeight + } + return 0 +} + func init() { proto.RegisterType((*SmartAccount)(nil), "pulsarchain.smartaccounts.v1.SmartAccount") proto.RegisterType((*SessionKey)(nil), "pulsarchain.smartaccounts.v1.SessionKey") + proto.RegisterType((*PublicKeyInputs)(nil), "pulsarchain.smartaccounts.v1.PublicKeyInputs") } func init() { @@ -130,7 +184,7 @@ func init() { } var fileDescriptor_5513da7f29cb5285 = []byte{ - // 290 bytes of a gzipped FileDescriptorProto + // 318 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x28, 0x28, 0xcd, 0x29, 0x4e, 0x2c, 0x4a, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x2f, 0xce, 0x4d, 0x2c, 0x2a, 0x49, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2b, @@ -144,12 +198,13 @@ var fileDescriptor_5513da7f29cb5285 = []byte{ 0xe6, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x04, 0x71, 0x42, 0x44, 0x40, 0xd2, 0x5a, 0x5c, 0x82, 0xa9, 0x15, 0x05, 0x99, 0x45, 0xa9, 0xc5, 0xf1, 0x89, 0x25, 0xf1, 0x19, 0xa9, 0x99, 0xe9, 0x19, 0x25, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x2c, 0x41, 0xfc, 0x50, 0x09, 0xc7, 0x12, 0x0f, 0xb0, 0xb0, - 0x53, 0xd0, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, - 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x59, 0xa4, 0x67, 0x96, - 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xe7, 0xe5, 0xa7, 0xa4, 0x1a, 0x1a, 0x18, 0xea, - 0x66, 0xe6, 0xeb, 0x43, 0x3c, 0xa1, 0x0b, 0x09, 0xdd, 0x0a, 0xb4, 0xf0, 0x05, 0x07, 0x6e, 0x12, - 0x1b, 0x38, 0x58, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x2e, 0x1d, 0xb6, 0x5b, 0x89, 0x01, - 0x00, 0x00, + 0x52, 0x36, 0x17, 0x7f, 0x00, 0x4c, 0xa3, 0x67, 0x5e, 0x41, 0x69, 0x49, 0xb1, 0x90, 0x0e, 0x97, + 0x10, 0xcc, 0xf9, 0x18, 0xb6, 0x08, 0x40, 0x65, 0x02, 0xc8, 0xb1, 0xcc, 0x29, 0xe8, 0xc4, 0x23, + 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, + 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x2c, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, + 0x92, 0xf3, 0x73, 0xf5, 0xf3, 0xf2, 0x53, 0x52, 0x0d, 0x0d, 0x0c, 0x75, 0x33, 0xf3, 0xf5, 0x21, + 0x21, 0xa6, 0x0b, 0x89, 0xca, 0x0a, 0xb4, 0xc8, 0x04, 0xc7, 0x64, 0x12, 0x1b, 0x38, 0x0e, 0x8c, + 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x62, 0x3f, 0x22, 0x1c, 0xf6, 0x01, 0x00, 0x00, } func (m *SmartAccount) Marshal() (dAtA []byte, err error) { @@ -224,6 +279,41 @@ func (m *SessionKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *PublicKeyInputs) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PublicKeyInputs) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PublicKeyInputs) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ExpiresAtHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ExpiresAtHeight)) + i-- + dAtA[i] = 0x10 + } + if len(m.SessionPublicKey) > 0 { + i -= len(m.SessionPublicKey) + copy(dAtA[i:], m.SessionPublicKey) + i = encodeVarintTypes(dAtA, i, uint64(len(m.SessionPublicKey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { offset -= sovTypes(v) base := offset @@ -266,6 +356,22 @@ func (m *SessionKey) Size() (n int) { return n } +func (m *PublicKeyInputs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SessionPublicKey) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.ExpiresAtHeight != 0 { + n += 1 + sovTypes(uint64(m.ExpiresAtHeight)) + } + return n +} + func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -459,6 +565,109 @@ func (m *SessionKey) Unmarshal(dAtA []byte) error { } return nil } +func (m *PublicKeyInputs) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PublicKeyInputs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PublicKeyInputs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionPublicKey", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SessionPublicKey = append(m.SessionPublicKey[:0], dAtA[iNdEx:postIndex]...) + if m.SessionPublicKey == nil { + m.SessionPublicKey = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiresAtHeight", wireType) + } + m.ExpiresAtHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpiresAtHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From b42d3786172e288b5ca1faef16919b32235b1c87 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Mon, 24 Aug 2026 18:09:26 +0300 Subject: [PATCH 05/51] fix: update the smart account map's prefix --- x/smartaccounts/keeper/keeper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/smartaccounts/keeper/keeper.go b/x/smartaccounts/keeper/keeper.go index 43d99ea8..6cf5b694 100644 --- a/x/smartaccounts/keeper/keeper.go +++ b/x/smartaccounts/keeper/keeper.go @@ -50,7 +50,7 @@ func NewKeeper( SmartAccounts: collections.NewMap( sb, - types.ParamsKey, + types.SmartAccountsKey, SmartAccountsMapName, collections.Int64Key, codec.CollValue[types.SmartAccount](cdc)), From e6362335011991eeeebff9b84070e19c34f59ecf Mon Sep 17 00:00:00 2001 From: Yusuf Date: Mon, 24 Aug 2026 18:10:40 +0300 Subject: [PATCH 06/51] feat: add verification key hash to smart accounts module params --- .../pulsarchain/smartaccounts/v1/params.proto | 2 + x/smartaccounts/keeper/genesis_test.go | 3 +- x/smartaccounts/keeper/keeper_test.go | 4 +- .../keeper/msg_update_params_test.go | 8 +- x/smartaccounts/keeper/query_params_test.go | 3 +- x/smartaccounts/types/genesis_test.go | 16 +++- x/smartaccounts/types/params.go | 19 ++++- x/smartaccounts/types/params.pb.go | 77 ++++++++++++++++--- 8 files changed, 110 insertions(+), 22 deletions(-) diff --git a/proto/pulsarchain/smartaccounts/v1/params.proto b/proto/pulsarchain/smartaccounts/v1/params.proto index 9ccd7c1b..fab32d3a 100644 --- a/proto/pulsarchain/smartaccounts/v1/params.proto +++ b/proto/pulsarchain/smartaccounts/v1/params.proto @@ -10,4 +10,6 @@ option go_package = "github.com/node101-io/pulsar-chain/x/smartaccounts/types"; message Params { option (amino.name) = "pulsarchain/x/smartaccounts/Params"; option (gogoproto.equal) = true; + + bytes verification_key_hash = 1; } diff --git a/x/smartaccounts/keeper/genesis_test.go b/x/smartaccounts/keeper/genesis_test.go index 43cf6058..72bba3e4 100644 --- a/x/smartaccounts/keeper/genesis_test.go +++ b/x/smartaccounts/keeper/genesis_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "bytes" "testing" "github.com/node101-io/pulsar-chain/x/smartaccounts/types" @@ -10,7 +11,7 @@ import ( func TestGenesis(t *testing.T) { genesisState := types.GenesisState{ - Params: types.DefaultParams(), + Params: types.NewParams(bytes.Repeat([]byte{0x01}, types.VerificationKeyHashSize)), } f := initFixture(t) diff --git a/x/smartaccounts/keeper/keeper_test.go b/x/smartaccounts/keeper/keeper_test.go index b28a1df1..5f7b7964 100644 --- a/x/smartaccounts/keeper/keeper_test.go +++ b/x/smartaccounts/keeper/keeper_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "bytes" "context" "testing" @@ -44,7 +45,8 @@ func initFixture(t *testing.T) *fixture { ) // Initialize params - if err := k.Params.Set(ctx, types.DefaultParams()); err != nil { + params := types.NewParams(bytes.Repeat([]byte{0x01}, types.VerificationKeyHashSize)) + if err := k.Params.Set(ctx, params); err != nil { t.Fatalf("failed to set params: %v", err) } diff --git a/x/smartaccounts/keeper/msg_update_params_test.go b/x/smartaccounts/keeper/msg_update_params_test.go index fcaf6838..5609cc08 100644 --- a/x/smartaccounts/keeper/msg_update_params_test.go +++ b/x/smartaccounts/keeper/msg_update_params_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "bytes" "testing" "github.com/stretchr/testify/require" @@ -13,7 +14,7 @@ func TestMsgUpdateParams(t *testing.T) { f := initFixture(t) ms := keeper.NewMsgServerImpl(f.keeper) - params := types.DefaultParams() + params := types.NewParams(bytes.Repeat([]byte{0x01}, types.VerificationKeyHashSize)) require.NoError(t, f.keeper.Params.Set(f.ctx, params)) authorityStr, err := f.addressCodec.BytesToString(f.keeper.GetAuthority()) @@ -36,12 +37,13 @@ func TestMsgUpdateParams(t *testing.T) { expErrMsg: "invalid authority", }, { - name: "send enabled param", + name: "invalid verification key hash", input: &types.MsgUpdateParams{ Authority: authorityStr, Params: types.Params{}, }, - expErr: false, + expErr: true, + expErrMsg: "verification key hash must be 32 bytes", }, { name: "all good", diff --git a/x/smartaccounts/keeper/query_params_test.go b/x/smartaccounts/keeper/query_params_test.go index c11b7b2a..643ef346 100644 --- a/x/smartaccounts/keeper/query_params_test.go +++ b/x/smartaccounts/keeper/query_params_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "bytes" "testing" "github.com/stretchr/testify/require" @@ -13,7 +14,7 @@ func TestParamsQuery(t *testing.T) { f := initFixture(t) qs := keeper.NewQueryServerImpl(f.keeper) - params := types.DefaultParams() + params := types.NewParams(bytes.Repeat([]byte{0x01}, types.VerificationKeyHashSize)) require.NoError(t, f.keeper.Params.Set(f.ctx, params)) response, err := qs.Params(f.ctx, &types.QueryParamsRequest{}) diff --git a/x/smartaccounts/types/genesis_test.go b/x/smartaccounts/types/genesis_test.go index 98403d3c..6faa6151 100644 --- a/x/smartaccounts/types/genesis_test.go +++ b/x/smartaccounts/types/genesis_test.go @@ -1,6 +1,7 @@ package types_test import ( + "bytes" "testing" "github.com/node101-io/pulsar-chain/x/smartaccounts/types" @@ -14,14 +15,21 @@ func TestGenesisState_Validate(t *testing.T) { valid bool }{ { - desc: "default is valid", + desc: "default requires verification key hash", genState: types.DefaultGenesis(), - valid: true, + valid: false, }, { - desc: "valid genesis state", + desc: "valid genesis state", + genState: &types.GenesisState{Params: types.NewParams( + bytes.Repeat([]byte{0x01}, types.VerificationKeyHashSize), + )}, + valid: true, + }, + { + desc: "missing verification key hash", genState: &types.GenesisState{}, - valid: true, + valid: false, }, } for _, tc := range tests { diff --git a/x/smartaccounts/types/params.go b/x/smartaccounts/types/params.go index d7e00501..2f603569 100644 --- a/x/smartaccounts/types/params.go +++ b/x/smartaccounts/types/params.go @@ -1,17 +1,30 @@ package types +import ( + "fmt" +) + +const VerificationKeyHashSize = 32 + // NewParams creates a new Params instance. -func NewParams() Params { - return Params{} +func NewParams(verificationKeyHash []byte) Params { + return Params{VerificationKeyHash: verificationKeyHash} } // DefaultParams returns a default set of parameters. func DefaultParams() Params { - return NewParams() + return Params{} } // Validate validates the set of params. func (p Params) Validate() error { + if len(p.VerificationKeyHash) != VerificationKeyHashSize { + return fmt.Errorf( + "verification key hash must be %d bytes: got %d", + VerificationKeyHashSize, + len(p.VerificationKeyHash), + ) + } return nil } diff --git a/x/smartaccounts/types/params.pb.go b/x/smartaccounts/types/params.pb.go index 9f477a97..f1b87cb7 100644 --- a/x/smartaccounts/types/params.pb.go +++ b/x/smartaccounts/types/params.pb.go @@ -4,6 +4,7 @@ package types import ( + bytes "bytes" fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" @@ -26,6 +27,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Params defines the parameters for the module. type Params struct { + VerificationKeyHash []byte `protobuf:"bytes,1,opt,name=verification_key_hash,json=verificationKeyHash,proto3" json:"verification_key_hash,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -61,6 +63,13 @@ func (m *Params) XXX_DiscardUnknown() { var xxx_messageInfo_Params proto.InternalMessageInfo +func (m *Params) GetVerificationKeyHash() []byte { + if m != nil { + return m.VerificationKeyHash + } + return nil +} + func init() { proto.RegisterType((*Params)(nil), "pulsarchain.smartaccounts.v1.Params") } @@ -70,20 +79,22 @@ func init() { } var fileDescriptor_07ef7ec9bd065507 = []byte{ - // 195 bytes of a gzipped FileDescriptorProto + // 237 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x2c, 0x28, 0xcd, 0x29, 0x4e, 0x2c, 0x4a, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x2f, 0xce, 0x4d, 0x2c, 0x2a, 0x49, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x41, 0x52, 0xaa, 0x87, 0xa2, 0x54, 0xaf, 0xcc, 0x50, 0x4a, 0x30, 0x31, 0x37, 0x33, 0x2f, 0x5f, 0x1f, 0x4c, 0x42, 0x34, 0x48, 0x89, 0xa4, 0xe7, 0xa7, - 0xe7, 0x83, 0x99, 0xfa, 0x20, 0x16, 0x44, 0x54, 0xc9, 0x94, 0x8b, 0x2d, 0x00, 0x6c, 0xac, 0x95, - 0xf6, 0x8b, 0x05, 0xf2, 0x8c, 0x5d, 0xcf, 0x37, 0x68, 0x29, 0x21, 0x3b, 0xa2, 0x02, 0xcd, 0x19, - 0x10, 0xc5, 0x4e, 0x41, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, - 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x91, - 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x97, 0x9f, 0x92, 0x6a, 0x68, - 0x60, 0xa8, 0x9b, 0x99, 0xaf, 0x0f, 0x31, 0x53, 0x17, 0xbb, 0xa1, 0x25, 0x95, 0x05, 0xa9, 0xc5, - 0x49, 0x6c, 0x60, 0x17, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x9a, 0x0d, 0xfa, 0x05, - 0x01, 0x00, 0x00, + 0xe7, 0x83, 0x99, 0xfa, 0x20, 0x16, 0x44, 0x54, 0x29, 0x93, 0x8b, 0x2d, 0x00, 0x6c, 0xac, 0x90, + 0x11, 0x97, 0x68, 0x59, 0x6a, 0x51, 0x66, 0x5a, 0x66, 0x72, 0x62, 0x49, 0x66, 0x7e, 0x5e, 0x7c, + 0x76, 0x6a, 0x65, 0x7c, 0x46, 0x62, 0x71, 0x86, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x4f, 0x90, 0x30, + 0xb2, 0xa4, 0x77, 0x6a, 0xa5, 0x47, 0x62, 0x71, 0x86, 0x95, 0xf6, 0x8b, 0x05, 0xf2, 0x8c, 0x5d, + 0xcf, 0x37, 0x68, 0x29, 0x21, 0x3b, 0xbc, 0x02, 0xcd, 0xe9, 0x10, 0x0b, 0x9c, 0x82, 0x4e, 0x3c, + 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, + 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x22, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, + 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x2f, 0x3f, 0x25, 0xd5, 0xd0, 0xc0, 0x50, 0x37, 0x33, 0x5f, 0x1f, + 0x62, 0xa6, 0x2e, 0x76, 0x43, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xbe, 0x30, 0x06, + 0x04, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xda, 0x82, 0x63, 0x39, 0x01, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -105,6 +116,9 @@ func (this *Params) Equal(that interface{}) bool { } else if this == nil { return false } + if !bytes.Equal(this.VerificationKeyHash, that1.VerificationKeyHash) { + return false + } return true } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -127,6 +141,13 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.VerificationKeyHash) > 0 { + i -= len(m.VerificationKeyHash) + copy(dAtA[i:], m.VerificationKeyHash) + i = encodeVarintParams(dAtA, i, uint64(len(m.VerificationKeyHash))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -147,6 +168,10 @@ func (m *Params) Size() (n int) { } var l int _ = l + l = len(m.VerificationKeyHash) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } return n } @@ -185,6 +210,40 @@ func (m *Params) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerificationKeyHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VerificationKeyHash = append(m.VerificationKeyHash[:0], dAtA[iNdEx:postIndex]...) + if m.VerificationKeyHash == nil { + m.VerificationKeyHash = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) From f2652620f5cabd445b3d55617ae228ea38aa887e Mon Sep 17 00:00:00 2001 From: Yusuf Date: Mon, 24 Aug 2026 19:15:39 +0300 Subject: [PATCH 07/51] refactor: use proof hash as MsgAddPublicKey's input instead of verification key hash --- proto/pulsarchain/smartaccounts/v1/tx.proto | 2 +- x/smartaccounts/types/tx.pb.go | 91 ++++++++++----------- 2 files changed, 46 insertions(+), 47 deletions(-) diff --git a/proto/pulsarchain/smartaccounts/v1/tx.proto b/proto/pulsarchain/smartaccounts/v1/tx.proto index 5c65393e..ff067b6d 100644 --- a/proto/pulsarchain/smartaccounts/v1/tx.proto +++ b/proto/pulsarchain/smartaccounts/v1/tx.proto @@ -48,7 +48,7 @@ message MsgUpdateParamsResponse {} message MsgAddPublicKey { option (cosmos.msg.v1.signer) = "creator"; string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - bytes verification_key_hash = 2; + bytes proof_hash = 2; PublicKeyInputs public_key_inputs = 3; } diff --git a/x/smartaccounts/types/tx.pb.go b/x/smartaccounts/types/tx.pb.go index 1d48c585..802251aa 100644 --- a/x/smartaccounts/types/tx.pb.go +++ b/x/smartaccounts/types/tx.pb.go @@ -128,9 +128,9 @@ var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo // MsgAddPublicKey defines the MsgAddPublicKey message. type MsgAddPublicKey struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - VerificationKeyHash []byte `protobuf:"bytes,2,opt,name=verification_key_hash,json=verificationKeyHash,proto3" json:"verification_key_hash,omitempty"` - PublicKeyInputs *PublicKeyInputs `protobuf:"bytes,3,opt,name=public_key_inputs,json=publicKeyInputs,proto3" json:"public_key_inputs,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + ProofHash []byte `protobuf:"bytes,2,opt,name=proof_hash,json=proofHash,proto3" json:"proof_hash,omitempty"` + PublicKeyInputs *PublicKeyInputs `protobuf:"bytes,3,opt,name=public_key_inputs,json=publicKeyInputs,proto3" json:"public_key_inputs,omitempty"` } func (m *MsgAddPublicKey) Reset() { *m = MsgAddPublicKey{} } @@ -173,9 +173,9 @@ func (m *MsgAddPublicKey) GetCreator() string { return "" } -func (m *MsgAddPublicKey) GetVerificationKeyHash() []byte { +func (m *MsgAddPublicKey) GetProofHash() []byte { if m != nil { - return m.VerificationKeyHash + return m.ProofHash } return nil } @@ -236,39 +236,38 @@ func init() { } var fileDescriptor_c2293ab44008f8fc = []byte{ - // 498 bytes of a gzipped FileDescriptorProto + // 490 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x4f, 0x6b, 0x13, 0x41, - 0x14, 0xcf, 0x58, 0xac, 0x64, 0x0c, 0x94, 0xae, 0x95, 0xa6, 0x41, 0xd6, 0x12, 0x14, 0x62, 0x24, - 0xbb, 0x26, 0xa2, 0x48, 0x0f, 0x42, 0x73, 0x51, 0x29, 0x85, 0xb2, 0xe2, 0x41, 0x2f, 0x61, 0xb2, - 0x3b, 0xee, 0x0e, 0x76, 0x77, 0x86, 0x79, 0xb3, 0xa1, 0x7b, 0x13, 0x8f, 0x9e, 0xfc, 0x18, 0x1e, - 0x73, 0xf0, 0x43, 0xf4, 0x58, 0x7a, 0xf2, 0x24, 0x92, 0x1c, 0xf2, 0x15, 0x3c, 0xca, 0xce, 0xee, - 0xd2, 0x4d, 0x28, 0x59, 0xbd, 0x84, 0xcc, 0x7b, 0xbf, 0xf7, 0x7e, 0x7f, 0x76, 0x06, 0x3f, 0x14, - 0xf1, 0x29, 0x10, 0xe9, 0x06, 0x84, 0x45, 0x36, 0x84, 0x44, 0x2a, 0xe2, 0xba, 0x3c, 0x8e, 0x14, - 0xd8, 0x93, 0xbe, 0xad, 0xce, 0x2c, 0x21, 0xb9, 0xe2, 0xc6, 0xbd, 0x12, 0xcc, 0x5a, 0x82, 0x59, - 0x93, 0x7e, 0x6b, 0x9b, 0x84, 0x2c, 0xe2, 0xb6, 0xfe, 0xcd, 0x06, 0x5a, 0xbb, 0x2e, 0x87, 0x90, - 0x83, 0x1d, 0x82, 0x9f, 0x2e, 0x0a, 0xc1, 0xcf, 0x1b, 0x7b, 0x59, 0x63, 0xa4, 0x4f, 0x76, 0x76, - 0xc8, 0x5b, 0x3b, 0x3e, 0xf7, 0x79, 0x56, 0x4f, 0xff, 0xe5, 0xd5, 0x47, 0x6b, 0x15, 0x0a, 0x22, - 0x49, 0x58, 0x2c, 0xe8, 0xac, 0x37, 0x93, 0x08, 0x9a, 0x23, 0xdb, 0x97, 0x08, 0x6f, 0x1d, 0x83, - 0xff, 0x4e, 0x78, 0x44, 0xd1, 0x13, 0xbd, 0xc3, 0x78, 0x8e, 0xeb, 0x24, 0x56, 0x01, 0x97, 0x4c, - 0x25, 0x4d, 0xb4, 0x8f, 0x3a, 0xf5, 0x61, 0xf3, 0xf2, 0x47, 0x6f, 0x27, 0xd7, 0x78, 0xe8, 0x79, - 0x92, 0x02, 0xbc, 0x55, 0x92, 0x45, 0xbe, 0x73, 0x05, 0x35, 0x5e, 0xe1, 0xcd, 0x4c, 0x45, 0xf3, - 0xc6, 0x3e, 0xea, 0xdc, 0x1e, 0x3c, 0xb0, 0xd6, 0x85, 0x65, 0x65, 0x6c, 0xc3, 0xfa, 0xf9, 0xaf, - 0xfb, 0xb5, 0xef, 0x8b, 0x69, 0x17, 0x39, 0xf9, 0xf8, 0xc1, 0xcb, 0x2f, 0x8b, 0x69, 0xf7, 0x6a, - 0xf1, 0xd7, 0xc5, 0xb4, 0xfb, 0xb8, 0xec, 0xe8, 0x6c, 0xc5, 0xd3, 0x8a, 0x81, 0xf6, 0x1e, 0xde, - 0x5d, 0x29, 0x39, 0x14, 0x04, 0x8f, 0x80, 0xb6, 0x67, 0x99, 0xdf, 0x43, 0xcf, 0x3b, 0x89, 0xc7, - 0xa7, 0xcc, 0x3d, 0xa2, 0x89, 0x31, 0xc0, 0xb7, 0x5c, 0x49, 0x89, 0xe2, 0xb2, 0xd2, 0x6d, 0x01, - 0x34, 0x06, 0xf8, 0xee, 0x84, 0x4a, 0xf6, 0x91, 0xb9, 0x44, 0x31, 0x1e, 0x8d, 0x3e, 0xd1, 0x64, - 0x14, 0x10, 0x08, 0xb4, 0xf5, 0x86, 0x73, 0xa7, 0xdc, 0x3c, 0xa2, 0xc9, 0x6b, 0x02, 0x81, 0xf1, - 0x1e, 0x6f, 0x0b, 0x4d, 0xaa, 0xd1, 0x2c, 0x12, 0xb1, 0x82, 0xe6, 0x86, 0x8e, 0xaa, 0x57, 0x11, - 0x55, 0xa1, 0xf5, 0x8d, 0x1e, 0x72, 0xb6, 0xc4, 0x72, 0xe1, 0xa0, 0x91, 0x26, 0x56, 0x88, 0xcb, - 0xfd, 0x97, 0x3d, 0x16, 0xfe, 0x07, 0x7f, 0x10, 0xde, 0x38, 0x06, 0xdf, 0x50, 0xb8, 0xb1, 0xf4, - 0xcd, 0x2b, 0x04, 0xac, 0xc4, 0xd9, 0x7a, 0xf6, 0x5f, 0xf0, 0x82, 0x3d, 0x65, 0x5d, 0x4a, 0xbe, - 0x9a, 0xb5, 0x0c, 0xff, 0x07, 0xd6, 0xeb, 0x3c, 0xb7, 0x6e, 0x7e, 0x4e, 0x6f, 0xd7, 0xd0, 0x39, - 0x9f, 0x99, 0xe8, 0x62, 0x66, 0xa2, 0xdf, 0x33, 0x13, 0x7d, 0x9b, 0x9b, 0xb5, 0x8b, 0xb9, 0x59, - 0xfb, 0x39, 0x37, 0x6b, 0x1f, 0x5e, 0xf8, 0x4c, 0x05, 0xf1, 0xd8, 0x72, 0x79, 0x68, 0x47, 0xdc, - 0xa3, 0xfd, 0x27, 0xfd, 0x1e, 0xe3, 0x76, 0x46, 0xd6, 0xbb, 0xfe, 0xce, 0xe9, 0x47, 0x34, 0xde, - 0xd4, 0xaf, 0xe8, 0xe9, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfa, 0x60, 0xad, 0xdd, 0x3e, 0x04, - 0x00, 0x00, + 0x14, 0xcf, 0x58, 0xac, 0x64, 0x0c, 0x94, 0x2e, 0x85, 0xa6, 0x41, 0xd7, 0x12, 0x14, 0x62, 0x24, + 0xbb, 0x26, 0xa2, 0x48, 0x0f, 0x42, 0x73, 0x51, 0x91, 0x42, 0x59, 0xf1, 0xa0, 0x97, 0x30, 0xd9, + 0x1d, 0x77, 0x17, 0xbb, 0xfb, 0x86, 0x79, 0xb3, 0xa5, 0xb9, 0x89, 0x47, 0x4f, 0x7e, 0x0c, 0x8f, + 0x39, 0xf8, 0x21, 0x7a, 0x11, 0x4a, 0x4f, 0x9e, 0x44, 0x92, 0x43, 0xbe, 0x82, 0x47, 0xd9, 0xd9, + 0x5d, 0x9a, 0x84, 0x90, 0xb5, 0x97, 0x90, 0x79, 0xef, 0xf7, 0xde, 0xef, 0xcf, 0xce, 0xd0, 0x07, + 0x22, 0x39, 0x41, 0x26, 0xdd, 0x80, 0x85, 0xb1, 0x8d, 0x11, 0x93, 0x8a, 0xb9, 0x2e, 0x24, 0xb1, + 0x42, 0xfb, 0xb4, 0x6b, 0xab, 0x33, 0x4b, 0x48, 0x50, 0x60, 0xdc, 0x99, 0x83, 0x59, 0x0b, 0x30, + 0xeb, 0xb4, 0xdb, 0xd8, 0x66, 0x51, 0x18, 0x83, 0xad, 0x7f, 0xb3, 0x81, 0xc6, 0xae, 0x0b, 0x18, + 0x01, 0xda, 0x11, 0xfa, 0xe9, 0xa2, 0x08, 0xfd, 0xbc, 0xb1, 0x97, 0x35, 0x06, 0xfa, 0x64, 0x67, + 0x87, 0xbc, 0xb5, 0xe3, 0x83, 0x0f, 0x59, 0x3d, 0xfd, 0x97, 0x57, 0x1f, 0xae, 0x55, 0x28, 0x98, + 0x64, 0x51, 0xb1, 0xa0, 0xb5, 0xde, 0xcc, 0x48, 0xf0, 0x1c, 0xd9, 0xbc, 0x24, 0x74, 0xeb, 0x08, + 0xfd, 0x77, 0xc2, 0x63, 0x8a, 0x1f, 0xeb, 0x1d, 0xc6, 0x33, 0x5a, 0x65, 0x89, 0x0a, 0x40, 0x86, + 0x6a, 0x54, 0x27, 0xfb, 0xa4, 0x55, 0xed, 0xd7, 0x2f, 0x7f, 0x74, 0x76, 0x72, 0x8d, 0x87, 0x9e, + 0x27, 0x39, 0xe2, 0x5b, 0x25, 0xc3, 0xd8, 0x77, 0xae, 0xa0, 0xc6, 0x4b, 0xba, 0x99, 0xa9, 0xa8, + 0xdf, 0xd8, 0x27, 0xad, 0xdb, 0xbd, 0xfb, 0xd6, 0xba, 0xb0, 0xac, 0x8c, 0xad, 0x5f, 0x3d, 0xff, + 0x7d, 0xaf, 0xf2, 0x7d, 0x36, 0x6e, 0x13, 0x27, 0x1f, 0x3f, 0x78, 0xf1, 0x65, 0x36, 0x6e, 0x5f, + 0x2d, 0xfe, 0x3a, 0x1b, 0xb7, 0x1f, 0xcd, 0x3b, 0x3a, 0x5b, 0xf2, 0xb4, 0x64, 0xa0, 0xb9, 0x47, + 0x77, 0x97, 0x4a, 0x0e, 0x47, 0x01, 0x31, 0xf2, 0xe6, 0xcf, 0xcc, 0xef, 0xa1, 0xe7, 0x1d, 0x27, + 0xc3, 0x93, 0xd0, 0x7d, 0xc3, 0x47, 0x46, 0x8f, 0xde, 0x72, 0x25, 0x67, 0x0a, 0x64, 0xa9, 0xdb, + 0x02, 0x68, 0xdc, 0xa5, 0x54, 0x48, 0x80, 0x8f, 0x83, 0x80, 0x61, 0xa0, 0xfd, 0xd6, 0x9c, 0xaa, + 0xae, 0xbc, 0x62, 0x18, 0x18, 0xef, 0xe9, 0xb6, 0xd0, 0xfb, 0x07, 0x9f, 0xf8, 0x68, 0x10, 0xc6, + 0x22, 0x51, 0x58, 0xdf, 0xd0, 0xa9, 0x74, 0x4a, 0x52, 0x29, 0x64, 0xbd, 0xd6, 0x43, 0xce, 0x96, + 0x58, 0x2c, 0x1c, 0xd4, 0xd2, 0x70, 0x0a, 0x1d, 0xb9, 0xd5, 0x79, 0x3b, 0x85, 0xd5, 0xde, 0x5f, + 0x42, 0x37, 0x8e, 0xd0, 0x37, 0x14, 0xad, 0x2d, 0x7c, 0xde, 0x12, 0x01, 0x4b, 0xc9, 0x35, 0x9e, + 0x5e, 0x0b, 0x5e, 0xb0, 0xa7, 0xac, 0x0b, 0x21, 0x97, 0xb3, 0xce, 0xc3, 0xff, 0x83, 0x75, 0x95, + 0xe7, 0xc6, 0xcd, 0xcf, 0xe9, 0x45, 0xea, 0x3b, 0xe7, 0x13, 0x93, 0x5c, 0x4c, 0x4c, 0xf2, 0x67, + 0x62, 0x92, 0x6f, 0x53, 0xb3, 0x72, 0x31, 0x35, 0x2b, 0xbf, 0xa6, 0x66, 0xe5, 0xc3, 0x73, 0x3f, + 0x54, 0x41, 0x32, 0xb4, 0x5c, 0x88, 0xec, 0x18, 0x3c, 0xde, 0x7d, 0xdc, 0xed, 0x84, 0x60, 0x67, + 0x64, 0x9d, 0xd5, 0xd7, 0x4b, 0xbf, 0x97, 0xe1, 0xa6, 0x7e, 0x30, 0x4f, 0xfe, 0x05, 0x00, 0x00, + 0xff, 0xff, 0x40, 0x42, 0x66, 0xb3, 0x29, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -489,10 +488,10 @@ func (m *MsgAddPublicKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if len(m.VerificationKeyHash) > 0 { - i -= len(m.VerificationKeyHash) - copy(dAtA[i:], m.VerificationKeyHash) - i = encodeVarintTx(dAtA, i, uint64(len(m.VerificationKeyHash))) + if len(m.ProofHash) > 0 { + i -= len(m.ProofHash) + copy(dAtA[i:], m.ProofHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.ProofHash))) i-- dAtA[i] = 0x12 } @@ -574,7 +573,7 @@ func (m *MsgAddPublicKey) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.VerificationKeyHash) + l = len(m.ProofHash) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -828,7 +827,7 @@ func (m *MsgAddPublicKey) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerificationKeyHash", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProofHash", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -855,9 +854,9 @@ func (m *MsgAddPublicKey) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.VerificationKeyHash = append(m.VerificationKeyHash[:0], dAtA[iNdEx:postIndex]...) - if m.VerificationKeyHash == nil { - m.VerificationKeyHash = []byte{} + m.ProofHash = append(m.ProofHash[:0], dAtA[iNdEx:postIndex]...) + if m.ProofHash == nil { + m.ProofHash = []byte{} } iNdEx = postIndex case 3: From df40c84a98fae0307e1b73432b78890512f9c511 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Mon, 24 Aug 2026 19:16:04 +0300 Subject: [PATCH 08/51] feat: add verification keeper field to smartaccouunts.Keeper --- x/smartaccounts/keeper/keeper.go | 6 ++++- x/smartaccounts/keeper/keeper_test.go | 29 ++++++++++++++++++----- x/smartaccounts/module/depinject.go | 7 ++++-- x/smartaccounts/types/expected_keepers.go | 6 +++++ 4 files changed, 39 insertions(+), 9 deletions(-) diff --git a/x/smartaccounts/keeper/keeper.go b/x/smartaccounts/keeper/keeper.go index 6cf5b694..691de308 100644 --- a/x/smartaccounts/keeper/keeper.go +++ b/x/smartaccounts/keeper/keeper.go @@ -23,6 +23,8 @@ type Keeper struct { SmartAccounts collections.Map[int64, types.SmartAccount] + verificationKeeper types.VerificationKeeper + Schema collections.Schema Params collections.Item[types.Params] } @@ -32,7 +34,7 @@ func NewKeeper( cdc codec.Codec, addressCodec address.Codec, authority []byte, - + verificationKeeper types.VerificationKeeper, ) Keeper { if _, err := addressCodec.BytesToString(authority); err != nil { panic(fmt.Sprintf("invalid authority address %s: %s", authority, err)) @@ -54,6 +56,8 @@ func NewKeeper( SmartAccountsMapName, collections.Int64Key, codec.CollValue[types.SmartAccount](cdc)), + + verificationKeeper: verificationKeeper, } schema, err := sb.Build() diff --git a/x/smartaccounts/keeper/keeper_test.go b/x/smartaccounts/keeper/keeper_test.go index 5f7b7964..11cd17fb 100644 --- a/x/smartaccounts/keeper/keeper_test.go +++ b/x/smartaccounts/keeper/keeper_test.go @@ -17,12 +17,26 @@ import ( "github.com/node101-io/pulsar-chain/x/smartaccounts/keeper" module "github.com/node101-io/pulsar-chain/x/smartaccounts/module" "github.com/node101-io/pulsar-chain/x/smartaccounts/types" + verificationtypes "github.com/node101-io/pulsar-chain/x/verification/types" ) +type mockVerificationKeeper struct { + result verificationtypes.FinalProofResult + err error +} + +func (m mockVerificationKeeper) FinalProofResultByProofHash( + context.Context, + []byte, +) (verificationtypes.FinalProofResult, error) { + return m.result, m.err +} + type fixture struct { - ctx context.Context - keeper keeper.Keeper - addressCodec address.Codec + ctx context.Context + keeper keeper.Keeper + addressCodec address.Codec + verificationKeeper *mockVerificationKeeper } func initFixture(t *testing.T) *fixture { @@ -36,12 +50,14 @@ func initFixture(t *testing.T) *fixture { ctx := testutil.DefaultContextWithDB(t, storeKey, storetypes.NewTransientStoreKey("transient_test")).Ctx authority := authtypes.NewModuleAddress(types.GovModuleName) + verificationKeeper := &mockVerificationKeeper{} k := keeper.NewKeeper( storeService, encCfg.Codec, addressCodec, authority, + verificationKeeper, ) // Initialize params @@ -51,8 +67,9 @@ func initFixture(t *testing.T) *fixture { } return &fixture{ - ctx: ctx, - keeper: k, - addressCodec: addressCodec, + ctx: ctx, + keeper: k, + addressCodec: addressCodec, + verificationKeeper: verificationKeeper, } } diff --git a/x/smartaccounts/module/depinject.go b/x/smartaccounts/module/depinject.go index f60b7fd6..cf6f666f 100644 --- a/x/smartaccounts/module/depinject.go +++ b/x/smartaccounts/module/depinject.go @@ -11,6 +11,7 @@ import ( "github.com/node101-io/pulsar-chain/x/smartaccounts/keeper" "github.com/node101-io/pulsar-chain/x/smartaccounts/types" + verificationkeeper "github.com/node101-io/pulsar-chain/x/verification/keeper" ) var _ depinject.OnePerModuleType = AppModule{} @@ -33,8 +34,9 @@ type ModuleInputs struct { Cdc codec.Codec AddressCodec address.Codec - AuthKeeper types.AuthKeeper - BankKeeper types.BankKeeper + AuthKeeper types.AuthKeeper + BankKeeper types.BankKeeper + VerificationKeeper verificationkeeper.Keeper } type ModuleOutputs struct { @@ -55,6 +57,7 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { in.Cdc, in.AddressCodec, authority, + in.VerificationKeeper, ) m := NewAppModule(in.Cdc, k, in.AuthKeeper, in.BankKeeper) diff --git a/x/smartaccounts/types/expected_keepers.go b/x/smartaccounts/types/expected_keepers.go index b175461c..4c125c64 100644 --- a/x/smartaccounts/types/expected_keepers.go +++ b/x/smartaccounts/types/expected_keepers.go @@ -5,6 +5,8 @@ import ( "cosmossdk.io/core/address" sdk "github.com/cosmos/cosmos-sdk/types" + + verificationtypes "github.com/node101-io/pulsar-chain/x/verification/types" ) // AuthKeeper defines the expected interface for the Auth module. @@ -25,3 +27,7 @@ type ParamSubspace interface { Get(context.Context, []byte, interface{}) Set(context.Context, []byte, interface{}) } + +type VerificationKeeper interface { + FinalProofResultByProofHash(ctx context.Context, proofHash []byte) (verificationtypes.FinalProofResult, error) +} From 95ee66cf732907b151c8346a879bd4ae8bac59ac Mon Sep 17 00:00:00 2001 From: Yusuf Date: Mon, 24 Aug 2026 19:24:23 +0300 Subject: [PATCH 09/51] chore: make smartaccounts map private --- x/smartaccounts/keeper/keeper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/smartaccounts/keeper/keeper.go b/x/smartaccounts/keeper/keeper.go index 691de308..25acf034 100644 --- a/x/smartaccounts/keeper/keeper.go +++ b/x/smartaccounts/keeper/keeper.go @@ -21,7 +21,7 @@ type Keeper struct { // Typically, this should be the x/gov module account. authority []byte - SmartAccounts collections.Map[int64, types.SmartAccount] + smartAccounts collections.Map[int64, types.SmartAccount] verificationKeeper types.VerificationKeeper @@ -50,7 +50,7 @@ func NewKeeper( Params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[types.Params](cdc)), - SmartAccounts: collections.NewMap( + smartAccounts: collections.NewMap( sb, types.SmartAccountsKey, SmartAccountsMapName, From 4d359aa389c0707733aaa98dfaf971431c73dc21 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Mon, 24 Aug 2026 19:33:26 +0300 Subject: [PATCH 10/51] chore: add identity field to public inputs and adjust smart accounts map based on it --- .../pulsarchain/smartaccounts/v1/types.proto | 1 + x/smartaccounts/keeper/keeper.go | 4 +- x/smartaccounts/types/types.pb.go | 96 +++++++++++++++---- 3 files changed, 78 insertions(+), 23 deletions(-) diff --git a/proto/pulsarchain/smartaccounts/v1/types.proto b/proto/pulsarchain/smartaccounts/v1/types.proto index 729b90a4..73526096 100644 --- a/proto/pulsarchain/smartaccounts/v1/types.proto +++ b/proto/pulsarchain/smartaccounts/v1/types.proto @@ -19,4 +19,5 @@ message SessionKey { message PublicKeyInputs { bytes session_public_key = 1; uint64 expires_at_height = 2; + bytes identity = 3; } diff --git a/x/smartaccounts/keeper/keeper.go b/x/smartaccounts/keeper/keeper.go index 25acf034..aa9c1f8e 100644 --- a/x/smartaccounts/keeper/keeper.go +++ b/x/smartaccounts/keeper/keeper.go @@ -21,7 +21,7 @@ type Keeper struct { // Typically, this should be the x/gov module account. authority []byte - smartAccounts collections.Map[int64, types.SmartAccount] + smartAccounts collections.Map[[]byte, types.SmartAccount] // account_id --> session keys verificationKeeper types.VerificationKeeper @@ -54,7 +54,7 @@ func NewKeeper( sb, types.SmartAccountsKey, SmartAccountsMapName, - collections.Int64Key, + collections.BytesKey, codec.CollValue[types.SmartAccount](cdc)), verificationKeeper: verificationKeeper, diff --git a/x/smartaccounts/types/types.pb.go b/x/smartaccounts/types/types.pb.go index 545b6df7..d6cf182d 100644 --- a/x/smartaccounts/types/types.pb.go +++ b/x/smartaccounts/types/types.pb.go @@ -124,6 +124,7 @@ func (m *SessionKey) GetExpiresAtHeight() uint64 { type PublicKeyInputs struct { SessionPublicKey []byte `protobuf:"bytes,1,opt,name=session_public_key,json=sessionPublicKey,proto3" json:"session_public_key,omitempty"` ExpiresAtHeight uint64 `protobuf:"varint,2,opt,name=expires_at_height,json=expiresAtHeight,proto3" json:"expires_at_height,omitempty"` + Identity []byte `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` } func (m *PublicKeyInputs) Reset() { *m = PublicKeyInputs{} } @@ -173,6 +174,13 @@ func (m *PublicKeyInputs) GetExpiresAtHeight() uint64 { return 0 } +func (m *PublicKeyInputs) GetIdentity() []byte { + if m != nil { + return m.Identity + } + return nil +} + func init() { proto.RegisterType((*SmartAccount)(nil), "pulsarchain.smartaccounts.v1.SmartAccount") proto.RegisterType((*SessionKey)(nil), "pulsarchain.smartaccounts.v1.SessionKey") @@ -184,27 +192,28 @@ func init() { } var fileDescriptor_5513da7f29cb5285 = []byte{ - // 318 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x28, 0x28, 0xcd, 0x29, - 0x4e, 0x2c, 0x4a, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x2f, 0xce, 0x4d, 0x2c, 0x2a, 0x49, 0x4c, 0x4e, - 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2b, - 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x41, 0x52, 0xa9, 0x87, 0xa2, 0x52, 0xaf, 0xcc, 0x50, 0x4a, - 0x30, 0x31, 0x37, 0x33, 0x2f, 0x5f, 0x1f, 0x4c, 0x42, 0x34, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, - 0x83, 0x99, 0xfa, 0x20, 0x16, 0x44, 0x54, 0x29, 0x91, 0x8b, 0x27, 0x18, 0xa4, 0xd9, 0x11, 0xa2, - 0x59, 0x28, 0x90, 0x8b, 0xa7, 0x38, 0xb5, 0xb8, 0x38, 0x33, 0x3f, 0x2f, 0x3e, 0x3b, 0xb5, 0xb2, - 0x58, 0x82, 0x51, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x43, 0x0f, 0x9f, 0x6d, 0x7a, 0xc1, 0x10, 0x1d, - 0xde, 0xa9, 0x95, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x71, 0x17, 0xc3, 0x45, 0x8a, 0x95, - 0xc2, 0xb9, 0xb8, 0x10, 0x0a, 0x84, 0x64, 0xb9, 0xb8, 0x0a, 0x4a, 0x93, 0x72, 0x32, 0x93, 0x41, - 0xe6, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x04, 0x71, 0x42, 0x44, 0x40, 0xd2, 0x5a, 0x5c, 0x82, - 0xa9, 0x15, 0x05, 0x99, 0x45, 0xa9, 0xc5, 0xf1, 0x89, 0x25, 0xf1, 0x19, 0xa9, 0x99, 0xe9, 0x19, - 0x25, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x2c, 0x41, 0xfc, 0x50, 0x09, 0xc7, 0x12, 0x0f, 0xb0, 0xb0, - 0x52, 0x36, 0x17, 0x7f, 0x00, 0x4c, 0xa3, 0x67, 0x5e, 0x41, 0x69, 0x49, 0xb1, 0x90, 0x0e, 0x97, - 0x10, 0xcc, 0xf9, 0x18, 0xb6, 0x08, 0x40, 0x65, 0x02, 0xc8, 0xb1, 0xcc, 0x29, 0xe8, 0xc4, 0x23, - 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, - 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x2c, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, - 0x92, 0xf3, 0x73, 0xf5, 0xf3, 0xf2, 0x53, 0x52, 0x0d, 0x0d, 0x0c, 0x75, 0x33, 0xf3, 0xf5, 0x21, - 0x21, 0xa6, 0x0b, 0x89, 0xca, 0x0a, 0xb4, 0xc8, 0x04, 0xc7, 0x64, 0x12, 0x1b, 0x38, 0x0e, 0x8c, - 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x62, 0x3f, 0x22, 0x1c, 0xf6, 0x01, 0x00, 0x00, + // 334 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x51, 0x3f, 0x4f, 0xfa, 0x40, + 0x18, 0xee, 0xfd, 0x20, 0xbf, 0xe8, 0x41, 0x82, 0x34, 0x0e, 0x0d, 0xd1, 0x4a, 0x98, 0x1a, 0x23, + 0x3d, 0xab, 0x8b, 0x2b, 0x4c, 0x1a, 0x17, 0x2c, 0x83, 0x89, 0x0b, 0x39, 0xca, 0xa5, 0xbd, 0x08, + 0x77, 0x4d, 0xdf, 0x2b, 0xa1, 0x9f, 0xc0, 0xd5, 0x8f, 0xc5, 0xc8, 0xe8, 0x64, 0x0c, 0xfd, 0x22, + 0xa6, 0x3d, 0xc0, 0x7f, 0x89, 0x83, 0xcb, 0xe5, 0xbd, 0xe7, 0xcf, 0xfb, 0x5c, 0xee, 0xc1, 0x4e, + 0x9c, 0x4e, 0x81, 0x26, 0x41, 0x44, 0xb9, 0x20, 0x30, 0xa3, 0x89, 0xa2, 0x41, 0x20, 0x53, 0xa1, + 0x80, 0xcc, 0x3d, 0xa2, 0xb2, 0x98, 0x81, 0x1b, 0x27, 0x52, 0x49, 0xf3, 0xe8, 0x93, 0xd2, 0xfd, + 0xa2, 0x74, 0xe7, 0x5e, 0xab, 0x49, 0x67, 0x5c, 0x48, 0x52, 0x9e, 0xda, 0xd0, 0x3a, 0x0c, 0x65, + 0x28, 0xcb, 0x91, 0x14, 0x93, 0x46, 0x3b, 0x14, 0xd7, 0x87, 0x85, 0xb9, 0xa7, 0xcd, 0xe6, 0x1d, + 0xae, 0x03, 0x03, 0xe0, 0x52, 0x8c, 0x1e, 0x59, 0x06, 0x16, 0x6a, 0x57, 0x9c, 0xda, 0x85, 0xe3, + 0xfe, 0x96, 0xe6, 0x0e, 0xb5, 0xe3, 0x96, 0x65, 0xfd, 0xea, 0xf2, 0xf5, 0xc4, 0xf0, 0x6b, 0xb0, + 0x43, 0xa0, 0x73, 0x8f, 0xf1, 0x87, 0xc0, 0x3c, 0xc6, 0x38, 0x4e, 0xc7, 0x53, 0x1e, 0x14, 0xfb, + 0x2d, 0xd4, 0x46, 0x4e, 0xdd, 0xdf, 0xd7, 0x48, 0x41, 0x9f, 0xe2, 0x26, 0x5b, 0xc4, 0x3c, 0x61, + 0x30, 0xa2, 0x6a, 0x14, 0x31, 0x1e, 0x46, 0xca, 0xfa, 0xd7, 0x46, 0x4e, 0xd5, 0x6f, 0x6c, 0x88, + 0x9e, 0xba, 0x2e, 0xe1, 0xce, 0x13, 0xc2, 0x8d, 0xc1, 0xd6, 0x79, 0x23, 0xe2, 0x54, 0x81, 0x79, + 0x86, 0xcd, 0xed, 0xfb, 0x7f, 0xc4, 0x1c, 0x6c, 0x98, 0xc1, 0x5f, 0xd2, 0xcc, 0x16, 0xde, 0xe3, + 0x13, 0x26, 0x14, 0x57, 0x99, 0x55, 0x29, 0xf7, 0xed, 0xee, 0x7d, 0x7f, 0xb9, 0xb6, 0xd1, 0x6a, + 0x6d, 0xa3, 0xb7, 0xb5, 0x8d, 0x9e, 0x73, 0xdb, 0x58, 0xe5, 0xb6, 0xf1, 0x92, 0xdb, 0xc6, 0xc3, + 0x55, 0xc8, 0x55, 0x94, 0x8e, 0xdd, 0x40, 0xce, 0x88, 0x90, 0x13, 0xe6, 0x9d, 0x7b, 0x5d, 0x2e, + 0x89, 0xfe, 0xce, 0xae, 0xee, 0x79, 0xf1, 0xad, 0xe9, 0xb2, 0xe6, 0xf1, 0xff, 0xb2, 0xa0, 0xcb, + 0xf7, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x6c, 0x34, 0x7f, 0x13, 0x02, 0x00, 0x00, } func (m *SmartAccount) Marshal() (dAtA []byte, err error) { @@ -299,6 +308,13 @@ func (m *PublicKeyInputs) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0x1a + } if m.ExpiresAtHeight != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.ExpiresAtHeight)) i-- @@ -369,6 +385,10 @@ func (m *PublicKeyInputs) Size() (n int) { if m.ExpiresAtHeight != 0 { n += 1 + sovTypes(uint64(m.ExpiresAtHeight)) } + l = len(m.Identity) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } return n } @@ -647,6 +667,40 @@ func (m *PublicKeyInputs) Unmarshal(dAtA []byte) error { break } } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) + if m.Identity == nil { + m.Identity = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) From 59f0c13802a4776d9494f54da806a6978a508704 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Mon, 24 Aug 2026 21:04:35 +0300 Subject: [PATCH 11/51] feat: implement AppendSessionKeyToSmartAccount method for future use in AddPublicKey tx --- x/smartaccounts/keeper/keeper.go | 107 ++++++++++++++++++++++++++++++- x/smartaccounts/types/errors.go | 7 +- x/smartaccounts/types/types.go | 2 + 3 files changed, 114 insertions(+), 2 deletions(-) diff --git a/x/smartaccounts/keeper/keeper.go b/x/smartaccounts/keeper/keeper.go index aa9c1f8e..47cdd1a8 100644 --- a/x/smartaccounts/keeper/keeper.go +++ b/x/smartaccounts/keeper/keeper.go @@ -1,13 +1,15 @@ package keeper import ( + "bytes" + "context" "fmt" "cosmossdk.io/collections" "cosmossdk.io/core/address" corestore "cosmossdk.io/core/store" "github.com/cosmos/cosmos-sdk/codec" - + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/node101-io/pulsar-chain/x/smartaccounts/types" ) @@ -73,3 +75,106 @@ func NewKeeper( func (k Keeper) GetAuthority() []byte { return k.authority } + +func (k Keeper) HasSmartAccount(ctx context.Context, identity []byte) (bool, error) { + + if identity == nil { + return false, types.ErrNilIdentity + } + + if len(identity) == 0 { + return false, types.ErrNilIdentity + } + + return k.smartAccounts.Has(ctx, identity) +} + +func (k Keeper) AppendSessionKeyToSmartAccount(ctx context.Context, identity []byte, key types.SessionKey) error { + + if identity == nil { + return types.ErrNilIdentity + } + + if len(identity) == 0 { + return types.ErrNilIdentity + } + + if key.PublicKey == nil { + return types.ErrNilPublicKey + } + + if len(key.PublicKey) != types.SessionPublicKeySize { + return types.ErrPublicKeyInvalidLength + } + + if key.ExpiresAtHeight == 0 { + return types.ErrInvalidExpirationHeight + } + + exists, err := k.HasSmartAccount(ctx, identity) + if err != nil { + return err + } + + if !exists { + err := k.smartAccounts.Set(ctx, identity, types.SmartAccount{ + SessionKeys: []types.SessionKey{ + key, + }, + }) + if err != nil { + return err + } + return nil + } + + acc, err := k.smartAccounts.Get(ctx, identity) + if err != nil { + return err + } + + for _, existingKey := range acc.SessionKeys { + if bytes.Equal(existingKey.PublicKey, key.PublicKey) && + existingKey.ExpiresAtHeight == key.ExpiresAtHeight { + return types.ErrSessionKeyAlreadyExists + } + } + + acc.SessionKeys = append(acc.SessionKeys, key) + + if err := k.smartAccounts.Set(ctx, identity, types.SmartAccount{ + SessionKeys: acc.SessionKeys, + }); err != nil { + return err + } + + return k.pruneSessionKey(ctx, identity) +} + +func (k Keeper) pruneSessionKey(ctx context.Context, identity []byte) error { + + var validSessionKeys []types.SessionKey + + smartAcc, err := k.smartAccounts.Get(ctx, identity) + if err != nil { + return err + } + + currentBlockHeight := uint64(sdk.UnwrapSDKContext(ctx).BlockHeight()) + + for _, key := range smartAcc.SessionKeys { + + if currentBlockHeight >= key.ExpiresAtHeight { + continue + } + validSessionKeys = append(validSessionKeys, key) + } + + if err := k.smartAccounts.Set(ctx, identity, types.SmartAccount{ + SessionKeys: validSessionKeys, + }); err != nil { + return err + } + + return nil +} diff --git a/x/smartaccounts/types/errors.go b/x/smartaccounts/types/errors.go index b6914ed1..d6f73847 100644 --- a/x/smartaccounts/types/errors.go +++ b/x/smartaccounts/types/errors.go @@ -8,5 +8,10 @@ import ( // x/smartaccounts module sentinel errors var ( - ErrInvalidSigner = errors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message") + ErrInvalidSigner = errors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message") + ErrNilPublicKey = errors.Register(ModuleName, 1101, "nil public key") + ErrPublicKeyInvalidLength = errors.Register(ModuleName, 1102, "public key invalid length") + ErrInvalidExpirationHeight = errors.Register(ModuleName, 1103, "invalid expiration height") + ErrNilIdentity = errors.Register(ModuleName, 1105, "nil identity") + ErrSessionKeyAlreadyExists = errors.Register(ModuleName, 1106, "session key already exists") ) diff --git a/x/smartaccounts/types/types.go b/x/smartaccounts/types/types.go index ab1254f4..2a971c40 100644 --- a/x/smartaccounts/types/types.go +++ b/x/smartaccounts/types/types.go @@ -1 +1,3 @@ package types + +const SessionPublicKeySize = 32 From 44122fe86a0790ea7b7bf1c28640141f7d7e7dbd Mon Sep 17 00:00:00 2001 From: Yusuf Date: Mon, 24 Aug 2026 21:11:11 +0300 Subject: [PATCH 12/51] fix: add size check for identity --- x/smartaccounts/keeper/keeper.go | 8 ++++++++ x/smartaccounts/types/errors.go | 1 + x/smartaccounts/types/types.go | 5 ++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/x/smartaccounts/keeper/keeper.go b/x/smartaccounts/keeper/keeper.go index 47cdd1a8..e660df0a 100644 --- a/x/smartaccounts/keeper/keeper.go +++ b/x/smartaccounts/keeper/keeper.go @@ -86,6 +86,10 @@ func (k Keeper) HasSmartAccount(ctx context.Context, identity []byte) (bool, err return false, types.ErrNilIdentity } + if len(identity) != types.IdentitySize { + return false, types.ErrIdentityInvalidLength + } + return k.smartAccounts.Has(ctx, identity) } @@ -99,6 +103,10 @@ func (k Keeper) AppendSessionKeyToSmartAccount(ctx context.Context, identity []b return types.ErrNilIdentity } + if len(identity) != types.IdentitySize { + return types.ErrIdentityInvalidLength + } + if key.PublicKey == nil { return types.ErrNilPublicKey } diff --git a/x/smartaccounts/types/errors.go b/x/smartaccounts/types/errors.go index d6f73847..298d7cf5 100644 --- a/x/smartaccounts/types/errors.go +++ b/x/smartaccounts/types/errors.go @@ -14,4 +14,5 @@ var ( ErrInvalidExpirationHeight = errors.Register(ModuleName, 1103, "invalid expiration height") ErrNilIdentity = errors.Register(ModuleName, 1105, "nil identity") ErrSessionKeyAlreadyExists = errors.Register(ModuleName, 1106, "session key already exists") + ErrIdentityInvalidLength = errors.Register(ModuleName, 1107, "identity invalid length") ) diff --git a/x/smartaccounts/types/types.go b/x/smartaccounts/types/types.go index 2a971c40..ccbdddf7 100644 --- a/x/smartaccounts/types/types.go +++ b/x/smartaccounts/types/types.go @@ -1,3 +1,6 @@ package types -const SessionPublicKeySize = 32 +const ( + SessionPublicKeySize = 32 + IdentitySize = 32 +) From 159292ee1e2317699da4c9fbfae246235959f680 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Mon, 24 Aug 2026 21:27:17 +0300 Subject: [PATCH 13/51] feat: implement ComputePublicInputsHash to compare it with result.PublicInputsHash --- x/smartaccounts/types/errors.go | 1 + x/smartaccounts/types/public_input_hash.go | 44 ++++++++++++++++++++++ x/smartaccounts/types/types.go | 1 + 3 files changed, 46 insertions(+) create mode 100644 x/smartaccounts/types/public_input_hash.go diff --git a/x/smartaccounts/types/errors.go b/x/smartaccounts/types/errors.go index 298d7cf5..4afe7f09 100644 --- a/x/smartaccounts/types/errors.go +++ b/x/smartaccounts/types/errors.go @@ -15,4 +15,5 @@ var ( ErrNilIdentity = errors.Register(ModuleName, 1105, "nil identity") ErrSessionKeyAlreadyExists = errors.Register(ModuleName, 1106, "session key already exists") ErrIdentityInvalidLength = errors.Register(ModuleName, 1107, "identity invalid length") + ErrNilPublicKeyInputs = errors.Register(ModuleName, 1108, "nil public key inputs") ) diff --git a/x/smartaccounts/types/public_input_hash.go b/x/smartaccounts/types/public_input_hash.go new file mode 100644 index 00000000..a8f2b366 --- /dev/null +++ b/x/smartaccounts/types/public_input_hash.go @@ -0,0 +1,44 @@ +package types + +import ( + "crypto/sha256" + "encoding/binary" +) + +const publicInputFieldSize = 32 + +// ComputePublicInputsHash encodes and hashes the smart-account public inputs. +func ComputePublicInputsHash(inputs *PublicKeyInputs) ([]byte, error) { + if inputs == nil { + return nil, ErrNilPublicKeyInputs + } + if inputs.SessionPublicKey == nil { + return nil, ErrNilPublicKey + } + if len(inputs.SessionPublicKey) != SessionPublicKeySize { + return nil, ErrPublicKeyInvalidLength + } + if inputs.ExpiresAtHeight == 0 { + return nil, ErrInvalidExpirationHeight + } + if len(inputs.Identity) == 0 { + return nil, ErrNilIdentity + } + if len(inputs.Identity) != IdentitySize { + return nil, ErrIdentityInvalidLength + } + + rawPublicInputs := make([]byte, 0, SessionPublicKeySize+publicInputFieldSize+IdentitySize) + rawPublicInputs = append(rawPublicInputs, inputs.SessionPublicKey...) + + var expiresAtHeight [publicInputFieldSize]byte + binary.BigEndian.PutUint64( + expiresAtHeight[publicInputFieldSize-8:], + inputs.ExpiresAtHeight, + ) + rawPublicInputs = append(rawPublicInputs, expiresAtHeight[:]...) + rawPublicInputs = append(rawPublicInputs, inputs.Identity...) + + hash := sha256.Sum256(rawPublicInputs) + return hash[:], nil +} diff --git a/x/smartaccounts/types/types.go b/x/smartaccounts/types/types.go index ccbdddf7..05ccd482 100644 --- a/x/smartaccounts/types/types.go +++ b/x/smartaccounts/types/types.go @@ -3,4 +3,5 @@ package types const ( SessionPublicKeySize = 32 IdentitySize = 32 + PublicInputsHashSize = 32 ) From f686cf0d66893c93e8193111a0fffc1ab86f5bae Mon Sep 17 00:00:00 2001 From: Yusuf Date: Mon, 24 Aug 2026 21:35:07 +0300 Subject: [PATCH 14/51] feat(smartaccounts): implement AddPublicKey transaction to append session keys --- .../keeper/msg_server_add_public_key.go | 77 ++++++++++++++++++- x/smartaccounts/types/errors.go | 13 +++- 2 files changed, 85 insertions(+), 5 deletions(-) diff --git a/x/smartaccounts/keeper/msg_server_add_public_key.go b/x/smartaccounts/keeper/msg_server_add_public_key.go index 498fb9dd..cbade8df 100644 --- a/x/smartaccounts/keeper/msg_server_add_public_key.go +++ b/x/smartaccounts/keeper/msg_server_add_public_key.go @@ -1,10 +1,13 @@ package keeper import ( + "bytes" "context" errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/node101-io/pulsar-chain/x/smartaccounts/types" + verificationtypes "github.com/node101-io/pulsar-chain/x/verification/types" ) func (k msgServer) AddPublicKey(ctx context.Context, msg *types.MsgAddPublicKey) (*types.MsgAddPublicKeyResponse, error) { @@ -12,7 +15,79 @@ func (k msgServer) AddPublicKey(ctx context.Context, msg *types.MsgAddPublicKey) return nil, errorsmod.Wrap(err, "invalid authority address") } - // TODO: Handle the message + if msg.ProofHash == nil { + return nil, types.ErrNilProofHash + } + + if len(msg.ProofHash) != verificationtypes.ProofHashSize { + return nil, types.ErrProofHashInvalidLength + } + + if msg.PublicKeyInputs == nil { + return nil, types.ErrNilPublicKeyInputs + } + if msg.PublicKeyInputs.Identity == nil { + return nil, types.ErrNilIdentity + } + if len(msg.PublicKeyInputs.Identity) != types.IdentitySize { + return nil, types.ErrIdentityInvalidLength + } + if msg.PublicKeyInputs.SessionPublicKey == nil { + return nil, types.ErrNilPublicKey + } + + if len(msg.PublicKeyInputs.SessionPublicKey) != types.SessionPublicKeySize { + return nil, types.ErrPublicKeyInvalidLength + } + + if msg.PublicKeyInputs.ExpiresAtHeight == 0 { + return nil, types.ErrInvalidExpirationHeight + } + + currentHeight := sdk.UnwrapSDKContext(ctx).BlockHeight() + + if msg.PublicKeyInputs.ExpiresAtHeight <= uint64(currentHeight) { + return nil, types.ErrInvalidExpirationHeight + } + + result, err := k.verificationKeeper.FinalProofResultByProofHash( + ctx, + msg.ProofHash, + ) + if err != nil { + return nil, err + } + + if result.Status != verificationtypes.ProofStatus_PROOF_STATUS_VALID { + return nil, types.ErrProofNotValid + } + + params, err := k.Params.Get(ctx) + if err != nil { + return nil, err + } + + if !bytes.Equal(result.VerificationKeyHash, + params.VerificationKeyHash) { + return nil, types.ErrVerificationKeyMismatch + } + + publicKeyInputsHash, err := types.ComputePublicInputsHash(msg.PublicKeyInputs) + if err != nil { + return nil, err + } + + if !bytes.Equal(result.PublicInputsHash, + publicKeyInputsHash) { + return nil, types.ErrInvalidPublicInputsHash + } + + if err := k.AppendSessionKeyToSmartAccount(ctx, msg.PublicKeyInputs.Identity, types.SessionKey{ + PublicKey: msg.PublicKeyInputs.SessionPublicKey, + ExpiresAtHeight: msg.PublicKeyInputs.ExpiresAtHeight, + }); err != nil { + return nil, err + } return &types.MsgAddPublicKeyResponse{}, nil } diff --git a/x/smartaccounts/types/errors.go b/x/smartaccounts/types/errors.go index 4afe7f09..33fcc68c 100644 --- a/x/smartaccounts/types/errors.go +++ b/x/smartaccounts/types/errors.go @@ -12,8 +12,13 @@ var ( ErrNilPublicKey = errors.Register(ModuleName, 1101, "nil public key") ErrPublicKeyInvalidLength = errors.Register(ModuleName, 1102, "public key invalid length") ErrInvalidExpirationHeight = errors.Register(ModuleName, 1103, "invalid expiration height") - ErrNilIdentity = errors.Register(ModuleName, 1105, "nil identity") - ErrSessionKeyAlreadyExists = errors.Register(ModuleName, 1106, "session key already exists") - ErrIdentityInvalidLength = errors.Register(ModuleName, 1107, "identity invalid length") - ErrNilPublicKeyInputs = errors.Register(ModuleName, 1108, "nil public key inputs") + ErrNilIdentity = errors.Register(ModuleName, 1104, "nil identity") + ErrSessionKeyAlreadyExists = errors.Register(ModuleName, 1105, "session key already exists") + ErrIdentityInvalidLength = errors.Register(ModuleName, 1106, "identity invalid length") + ErrNilPublicKeyInputs = errors.Register(ModuleName, 1107, "nil public key inputs") + ErrNilProofHash = errors.Register(ModuleName, 1108, "nil proof hash") + ErrProofHashInvalidLength = errors.Register(ModuleName, 1109, "proof hash invalid length") + ErrProofNotValid = errors.Register(ModuleName, 1110, "proof is not valid") + ErrVerificationKeyMismatch = errors.Register(ModuleName, 1111, "verification key hash mismatch") + ErrInvalidPublicInputsHash = errors.Register(ModuleName, 1112, "invalid public inputs hash") ) From fda00800ea839d7d60c861b9b19c23f25cf81ae4 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 14:23:40 +0300 Subject: [PATCH 15/51] test(smartaccounts): add tests for add public key transaction --- .../keeper/msg_server_add_public_key_test.go | 225 ++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100644 x/smartaccounts/keeper/msg_server_add_public_key_test.go diff --git a/x/smartaccounts/keeper/msg_server_add_public_key_test.go b/x/smartaccounts/keeper/msg_server_add_public_key_test.go new file mode 100644 index 00000000..4af7dddc --- /dev/null +++ b/x/smartaccounts/keeper/msg_server_add_public_key_test.go @@ -0,0 +1,225 @@ +package keeper_test + +import ( + "bytes" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + "github.com/node101-io/pulsar-chain/x/smartaccounts/keeper" + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" + verificationtypes "github.com/node101-io/pulsar-chain/x/verification/types" +) + +func TestAddPublicKey(t *testing.T) { + f := initFixture(t) + msg := validAddPublicKeyMessage(t, f) + server := keeper.NewMsgServerImpl(f.keeper) + + response, err := server.AddPublicKey(f.ctx, msg) + require.NoError(t, err) + require.NotNil(t, response) + + exists, err := f.keeper.HasSmartAccount(f.ctx, msg.PublicKeyInputs.Identity) + require.NoError(t, err) + require.True(t, exists) + + _, err = server.AddPublicKey(f.ctx, msg) + require.ErrorIs(t, err, types.ErrSessionKeyAlreadyExists) +} + +func TestAddPublicKeyRejectsInvalidProofData(t *testing.T) { + f := initFixture(t) + msg := validAddPublicKeyMessage(t, f) + validResult := f.verificationKeeper.result + + invalidResult := validResult + invalidResult.Status = verificationtypes.ProofStatus_PROOF_STATUS_INVALID + + verificationKeyMismatch := validResult + verificationKeyMismatch.VerificationKeyHash = bytes.Clone(validResult.VerificationKeyHash) + verificationKeyMismatch.VerificationKeyHash[0] ^= 0xff + + publicInputsHashMismatch := validResult + publicInputsHashMismatch.PublicInputsHash = bytes.Clone(validResult.PublicInputsHash) + publicInputsHashMismatch.PublicInputsHash[0] ^= 0xff + + tests := []struct { + name string + result verificationtypes.FinalProofResult + verificationErr error + want error + }{ + { + name: "proof not found", + result: validResult, + verificationErr: verificationtypes.ErrProofNotFound, + want: verificationtypes.ErrProofNotFound, + }, + { + name: "proof is invalid", + result: invalidResult, + want: types.ErrProofNotValid, + }, + { + name: "verification key mismatch", + result: verificationKeyMismatch, + want: types.ErrVerificationKeyMismatch, + }, + { + name: "public inputs hash mismatch", + result: publicInputsHashMismatch, + want: types.ErrInvalidPublicInputsHash, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + f.verificationKeeper.result = test.result + f.verificationKeeper.err = test.verificationErr + + _, err := keeper.NewMsgServerImpl(f.keeper).AddPublicKey(f.ctx, msg) + require.ErrorIs(t, err, test.want) + }) + } +} + +func TestAddPublicKeyRejectsInvalidInputs(t *testing.T) { + f := initFixture(t) + validMsg := validAddPublicKeyMessage(t, f) + + tests := []struct { + name string + proofHash []byte + publicKeyInputs *types.PublicKeyInputs + want error + }{ + { + name: "nil proof hash", + publicKeyInputs: &types.PublicKeyInputs{ + SessionPublicKey: validMsg.PublicKeyInputs.SessionPublicKey, + ExpiresAtHeight: validMsg.PublicKeyInputs.ExpiresAtHeight, + Identity: validMsg.PublicKeyInputs.Identity, + }, + want: types.ErrNilProofHash, + }, + { + name: "invalid proof hash length", + proofHash: validMsg.ProofHash[:verificationtypes.ProofHashSize-1], + publicKeyInputs: &types.PublicKeyInputs{ + SessionPublicKey: validMsg.PublicKeyInputs.SessionPublicKey, + ExpiresAtHeight: validMsg.PublicKeyInputs.ExpiresAtHeight, + Identity: validMsg.PublicKeyInputs.Identity, + }, + want: types.ErrProofHashInvalidLength, + }, + { + name: "nil public key inputs", + proofHash: validMsg.ProofHash, + want: types.ErrNilPublicKeyInputs, + }, + { + name: "nil identity", + proofHash: validMsg.ProofHash, + publicKeyInputs: &types.PublicKeyInputs{ + SessionPublicKey: validMsg.PublicKeyInputs.SessionPublicKey, + ExpiresAtHeight: validMsg.PublicKeyInputs.ExpiresAtHeight, + }, + want: types.ErrNilIdentity, + }, + { + name: "invalid identity length", + proofHash: validMsg.ProofHash, + publicKeyInputs: &types.PublicKeyInputs{ + SessionPublicKey: validMsg.PublicKeyInputs.SessionPublicKey, + ExpiresAtHeight: validMsg.PublicKeyInputs.ExpiresAtHeight, + Identity: validMsg.PublicKeyInputs.Identity[:types.IdentitySize-1], + }, + want: types.ErrIdentityInvalidLength, + }, + { + name: "nil public key", + proofHash: validMsg.ProofHash, + publicKeyInputs: &types.PublicKeyInputs{ + ExpiresAtHeight: validMsg.PublicKeyInputs.ExpiresAtHeight, + Identity: validMsg.PublicKeyInputs.Identity, + }, + want: types.ErrNilPublicKey, + }, + { + name: "invalid public key length", + proofHash: validMsg.ProofHash, + publicKeyInputs: &types.PublicKeyInputs{ + SessionPublicKey: validMsg.PublicKeyInputs.SessionPublicKey[:types.SessionPublicKeySize-1], + ExpiresAtHeight: validMsg.PublicKeyInputs.ExpiresAtHeight, + Identity: validMsg.PublicKeyInputs.Identity, + }, + want: types.ErrPublicKeyInvalidLength, + }, + { + name: "zero expiration height", + proofHash: validMsg.ProofHash, + publicKeyInputs: &types.PublicKeyInputs{ + SessionPublicKey: validMsg.PublicKeyInputs.SessionPublicKey, + ExpiresAtHeight: 0, + Identity: validMsg.PublicKeyInputs.Identity, + }, + want: types.ErrInvalidExpirationHeight, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + msg := &types.MsgAddPublicKey{ + Creator: validMsg.Creator, + ProofHash: test.proofHash, + PublicKeyInputs: test.publicKeyInputs, + } + + _, err := keeper.NewMsgServerImpl(f.keeper).AddPublicKey(f.ctx, msg) + require.ErrorIs(t, err, test.want) + }) + } +} + +func TestAddPublicKeyRejectsExpiredSessionKey(t *testing.T) { + f := initFixture(t) + msg := validAddPublicKeyMessage(t, f) + + sdkCtx := sdk.UnwrapSDKContext(f.ctx).WithBlockHeight(int64(msg.PublicKeyInputs.ExpiresAtHeight)) + f.ctx = sdk.WrapSDKContext(sdkCtx) + + _, err := keeper.NewMsgServerImpl(f.keeper).AddPublicKey(f.ctx, msg) + require.ErrorIs(t, err, types.ErrInvalidExpirationHeight) +} + +func validAddPublicKeyMessage(t *testing.T, f *fixture) *types.MsgAddPublicKey { + t.Helper() + + creator, err := f.addressCodec.BytesToString(f.keeper.GetAuthority()) + require.NoError(t, err) + + currentHeight := sdk.UnwrapSDKContext(f.ctx).BlockHeight() + inputs := &types.PublicKeyInputs{ + SessionPublicKey: bytes.Repeat([]byte{0x02}, types.SessionPublicKeySize), + ExpiresAtHeight: uint64(currentHeight) + 10, + Identity: bytes.Repeat([]byte{0x03}, types.IdentitySize), + } + publicInputsHash, err := types.ComputePublicInputsHash(inputs) + require.NoError(t, err) + + proofHash := bytes.Repeat([]byte{0x04}, verificationtypes.ProofHashSize) + f.verificationKeeper.result = verificationtypes.FinalProofResult{ + ProofHash: bytes.Clone(proofHash), + Status: verificationtypes.ProofStatus_PROOF_STATUS_VALID, + PublicInputsHash: publicInputsHash, + VerificationKeyHash: bytes.Repeat([]byte{0x01}, types.VerificationKeyHashSize), + } + + return &types.MsgAddPublicKey{ + Creator: creator, + ProofHash: proofHash, + PublicKeyInputs: inputs, + } +} From d605ce3ed69b5687d335ad91f2cea34326378ea0 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 14:29:36 +0300 Subject: [PATCH 16/51] test: add tests for ComputePublicInputsHash --- .../types/public_input_hash_test.go | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 x/smartaccounts/types/public_input_hash_test.go diff --git a/x/smartaccounts/types/public_input_hash_test.go b/x/smartaccounts/types/public_input_hash_test.go new file mode 100644 index 00000000..0d984dda --- /dev/null +++ b/x/smartaccounts/types/public_input_hash_test.go @@ -0,0 +1,100 @@ +package types_test + +import ( + "bytes" + "crypto/sha256" + "encoding/binary" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +func TestComputePublicInputsHash(t *testing.T) { + inputs := validPublicKeyInputs() + + rawPublicInputs := make([]byte, 96) + copy(rawPublicInputs[:32], inputs.SessionPublicKey) + binary.BigEndian.PutUint64(rawPublicInputs[56:64], inputs.ExpiresAtHeight) + copy(rawPublicInputs[64:], inputs.Identity) + expected := sha256.Sum256(rawPublicInputs) + + actual, err := types.ComputePublicInputsHash(inputs) + require.NoError(t, err) + require.Equal(t, expected[:], actual) +} + +func TestComputePublicInputsHashValidation(t *testing.T) { + + validPublicKeyInputs := validPublicKeyInputs() + + tests := []struct { + name string + inputs *types.PublicKeyInputs + want error + }{ + { + name: "nil inputs", + want: types.ErrNilPublicKeyInputs, + }, + { + name: "nil public key", + inputs: &types.PublicKeyInputs{ + ExpiresAtHeight: validPublicKeyInputs.ExpiresAtHeight, + Identity: validPublicKeyInputs.Identity, + }, + want: types.ErrNilPublicKey, + }, + { + name: "invalid public key length", + inputs: &types.PublicKeyInputs{ + SessionPublicKey: validPublicKeyInputs.SessionPublicKey[:types.SessionPublicKeySize-1], + ExpiresAtHeight: validPublicKeyInputs.ExpiresAtHeight, + Identity: validPublicKeyInputs.Identity, + }, + want: types.ErrPublicKeyInvalidLength, + }, + { + name: "zero expiration height", + inputs: &types.PublicKeyInputs{ + SessionPublicKey: validPublicKeyInputs.SessionPublicKey, + ExpiresAtHeight: 0, + Identity: validPublicKeyInputs.Identity, + }, + want: types.ErrInvalidExpirationHeight, + }, + { + name: "nil identity", + inputs: &types.PublicKeyInputs{ + SessionPublicKey: validPublicKeyInputs.SessionPublicKey, + ExpiresAtHeight: validPublicKeyInputs.ExpiresAtHeight, + }, + want: types.ErrNilIdentity, + }, + { + name: "invalid identity length", + inputs: &types.PublicKeyInputs{ + SessionPublicKey: validPublicKeyInputs.SessionPublicKey, + ExpiresAtHeight: validPublicKeyInputs.ExpiresAtHeight, + Identity: validPublicKeyInputs.Identity[:types.IdentitySize-1], + }, + want: types.ErrIdentityInvalidLength, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + _, err := types.ComputePublicInputsHash(test.inputs) + require.ErrorIs(t, err, test.want) + }) + } +} + +func validPublicKeyInputs() *types.PublicKeyInputs { + return &types.PublicKeyInputs{ + SessionPublicKey: bytes.Repeat([]byte{0x11}, types.SessionPublicKeySize), + ExpiresAtHeight: 42, + Identity: bytes.Repeat([]byte{0x22}, types.IdentitySize), + } +} From f989541a3f3a81d90f521463015312dc67692cfc Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 14:33:42 +0300 Subject: [PATCH 17/51] test: add tests for smart account keeper methods --- x/smartaccounts/keeper/smart_accounts_test.go | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 x/smartaccounts/keeper/smart_accounts_test.go diff --git a/x/smartaccounts/keeper/smart_accounts_test.go b/x/smartaccounts/keeper/smart_accounts_test.go new file mode 100644 index 00000000..52b310e4 --- /dev/null +++ b/x/smartaccounts/keeper/smart_accounts_test.go @@ -0,0 +1,76 @@ +package keeper_test + +import ( + "bytes" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +func TestAppendSessionKeyToSmartAccount(t *testing.T) { + f := initFixture(t) + identity := bytes.Repeat([]byte{0x01}, types.IdentitySize) + key := types.SessionKey{ + PublicKey: bytes.Repeat([]byte{0x02}, types.SessionPublicKeySize), + ExpiresAtHeight: 10, + } + + exists, err := f.keeper.HasSmartAccount(f.ctx, identity) + require.NoError(t, err) + require.False(t, exists) + + require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, key)) + + exists, err = f.keeper.HasSmartAccount(f.ctx, identity) + require.NoError(t, err) + require.True(t, exists) + + err = f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, key) + require.ErrorIs(t, err, types.ErrSessionKeyAlreadyExists) +} + +func TestAppendSessionKeyPrunesExpiredKeys(t *testing.T) { + f := initFixture(t) + identity := bytes.Repeat([]byte{0x01}, types.IdentitySize) + expiringKey := types.SessionKey{ + PublicKey: bytes.Repeat([]byte{0x02}, types.SessionPublicKeySize), + ExpiresAtHeight: 2, + } + + f.ctx = sdk.UnwrapSDKContext(f.ctx).WithBlockHeight(1) + require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, expiringKey)) + + f.ctx = sdk.UnwrapSDKContext(f.ctx).WithBlockHeight(2) + activeKey := types.SessionKey{ + PublicKey: bytes.Repeat([]byte{0x03}, types.SessionPublicKeySize), + ExpiresAtHeight: 3, + } + require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, activeKey)) + + // The first key can be appended again because the previous copy was pruned. + require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, expiringKey)) +} + +func TestHasSmartAccountValidation(t *testing.T) { + f := initFixture(t) + + tests := []struct { + name string + identity []byte + want error + }{ + {name: "nil identity", identity: nil, want: types.ErrNilIdentity}, + {name: "empty identity", identity: []byte{}, want: types.ErrNilIdentity}, + {name: "invalid identity length", identity: []byte{0x01}, want: types.ErrIdentityInvalidLength}, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + _, err := f.keeper.HasSmartAccount(f.ctx, test.identity) + require.ErrorIs(t, err, test.want) + }) + } +} From 5dc3d163e8636b5c772e38acf74d15947031a371 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 14:53:25 +0300 Subject: [PATCH 18/51] chore: add verification_key_hash to config --- config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config.yml b/config.yml index ec514aaf..5393a1ce 100644 --- a/config.yml +++ b/config.yml @@ -65,6 +65,9 @@ genesis: start_block_height: "541000" max_block_range: "1000" actions_reduced_root_snapshot_window_size: "4" + smartaccounts: + params: + verification_key_hash: "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE=" consensus: params: abci: From 3e6d2c1d8b64f4d1e13bd7e831ac12c0c9d7863c Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 15:01:29 +0300 Subject: [PATCH 19/51] feat: add smart accounts to genesis --- app/export_test.go | 10 + .../smartaccounts/v1/genesis.proto | 8 + x/smartaccounts/keeper/genesis.go | 38 +++ x/smartaccounts/keeper/genesis_test.go | 18 +- x/smartaccounts/module/autocli.go | 13 +- x/smartaccounts/module/simulation.go | 4 +- x/smartaccounts/types/genesis.go | 56 +++- x/smartaccounts/types/genesis.pb.go | 316 +++++++++++++++++- x/smartaccounts/types/genesis_test.go | 53 ++- 9 files changed, 494 insertions(+), 22 deletions(-) diff --git a/app/export_test.go b/app/export_test.go index 17f9f208..d1bfd36d 100644 --- a/app/export_test.go +++ b/app/export_test.go @@ -1,6 +1,7 @@ package app import ( + "bytes" "encoding/base64" "net" "testing" @@ -22,6 +23,7 @@ import ( minafield "github.com/node101-io/mina-signer-go/field" merkle "github.com/node101-io/mina-signer-go/merklelist" bridgetypes "github.com/node101-io/pulsar-chain/x/bridge/types" + smartaccountstypes "github.com/node101-io/pulsar-chain/x/smartaccounts/types" "github.com/stretchr/testify/require" "google.golang.org/grpc" "google.golang.org/grpc/health" @@ -199,6 +201,14 @@ func TestZeroHeightExportNormalizesBridgeRootSnapshots(t *testing.T) { ) genesisState[bridgetypes.ModuleName] = oldApp.AppCodec().MustMarshalJSON(bridgeGenesis) + smartaccountsGenesis := &smartaccountstypes.GenesisState{ + Params: smartaccountstypes.Params{ + VerificationKeyHash: bytes.Repeat([]byte{0x01}, smartaccountstypes.VerificationKeyHashSize), + }, + } + + genesisState[smartaccountstypes.ModuleName] = oldApp.AppCodec().MustMarshalJSON(smartaccountsGenesis) + appState, err := cmtjson.Marshal(genesisState) require.NoError(t, err) _, err = oldApp.InitChain(&abci.RequestInitChain{ diff --git a/proto/pulsarchain/smartaccounts/v1/genesis.proto b/proto/pulsarchain/smartaccounts/v1/genesis.proto index a50fc85e..48aa5b04 100644 --- a/proto/pulsarchain/smartaccounts/v1/genesis.proto +++ b/proto/pulsarchain/smartaccounts/v1/genesis.proto @@ -4,6 +4,7 @@ package pulsarchain.smartaccounts.v1; import "amino/amino.proto"; import "gogoproto/gogo.proto"; import "pulsarchain/smartaccounts/v1/params.proto"; +import "pulsarchain/smartaccounts/v1/types.proto"; option go_package = "github.com/node101-io/pulsar-chain/x/smartaccounts/types"; @@ -14,4 +15,11 @@ message GenesisState { (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; + repeated SmartAccountEntry smart_accounts = 2 [(gogoproto.nullable) = false]; +} + +// SmartAccountEntry associates an identity with its smart-account state. +message SmartAccountEntry { + bytes identity = 1; + SmartAccount account = 2 [(gogoproto.nullable) = false]; } diff --git a/x/smartaccounts/keeper/genesis.go b/x/smartaccounts/keeper/genesis.go index c58efe30..bab444d2 100644 --- a/x/smartaccounts/keeper/genesis.go +++ b/x/smartaccounts/keeper/genesis.go @@ -8,6 +8,16 @@ import ( // InitGenesis initializes the module's state from a provided genesis state. func (k Keeper) InitGenesis(ctx context.Context, genState types.GenesisState) error { + if err := genState.Validate(); err != nil { + return err + } + + for _, entry := range genState.SmartAccounts { + if err := k.smartAccounts.Set(ctx, entry.Identity, entry.Account); err != nil { + return err + } + } + return k.Params.Set(ctx, genState.Params) } @@ -21,5 +31,33 @@ func (k Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) return nil, err } + iter, err := k.smartAccounts.Iterate(ctx, nil) + if err != nil { + return nil, err + } + defer iter.Close() + + for ; iter.Valid(); iter.Next() { + + acc, err := iter.Value() + if err != nil { + iter.Next() + } + identity, err := iter.Key() + if err != nil { + iter.Next() + } + + genesis.SmartAccounts = append(genesis.SmartAccounts, types.SmartAccountEntry{ + Identity: identity, + Account: acc, + }) + + } + + if err := genesis.Validate(); err != nil { + return nil, err + } + return genesis, nil } diff --git a/x/smartaccounts/keeper/genesis_test.go b/x/smartaccounts/keeper/genesis_test.go index 72bba3e4..f6ded277 100644 --- a/x/smartaccounts/keeper/genesis_test.go +++ b/x/smartaccounts/keeper/genesis_test.go @@ -10,8 +10,20 @@ import ( ) func TestGenesis(t *testing.T) { + identity := bytes.Repeat([]byte{0x02}, types.IdentitySize) genesisState := types.GenesisState{ Params: types.NewParams(bytes.Repeat([]byte{0x01}, types.VerificationKeyHashSize)), + SmartAccounts: []types.SmartAccountEntry{ + { + Identity: identity, + Account: types.SmartAccount{SessionKeys: []types.SessionKey{ + { + PublicKey: bytes.Repeat([]byte{0x03}, types.SessionPublicKeySize), + ExpiresAtHeight: 100, + }, + }}, + }, + }, } f := initFixture(t) @@ -21,5 +33,9 @@ func TestGenesis(t *testing.T) { require.NoError(t, err) require.NotNil(t, got) - require.EqualExportedValues(t, genesisState.Params, got.Params) + require.EqualExportedValues(t, genesisState, *got) + + exists, err := f.keeper.HasSmartAccount(f.ctx, identity) + require.NoError(t, err) + require.True(t, exists) } diff --git a/x/smartaccounts/module/autocli.go b/x/smartaccounts/module/autocli.go index c0996455..d1508f7f 100644 --- a/x/smartaccounts/module/autocli.go +++ b/x/smartaccounts/module/autocli.go @@ -28,10 +28,15 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Skip: true, // skipped because authority gated }, { - RpcMethod: "AddPublicKey", - Use: "add-public-key [verification-key-hash]", - Short: "Send a add-public-key tx", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "verification_key_hash", Varargs: true}}, + RpcMethod: "AddPublicKey", + Use: "add-public-key [proof-hash] [session-public-key] [expires-at-height] [identity]", + Short: "Add a session public key to a smart account", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "proof_hash"}, + {ProtoField: "public_key_inputs.session_public_key"}, + {ProtoField: "public_key_inputs.expires_at_height"}, + {ProtoField: "public_key_inputs.identity"}, + }, }, }, }, diff --git a/x/smartaccounts/module/simulation.go b/x/smartaccounts/module/simulation.go index 50e5c607..98148909 100644 --- a/x/smartaccounts/module/simulation.go +++ b/x/smartaccounts/module/simulation.go @@ -1,6 +1,8 @@ package smartaccounts import ( + "bytes" + "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -14,7 +16,7 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { accs[i] = acc.Address.String() } smartaccountsGenesis := types.GenesisState{ - Params: types.DefaultParams(), + Params: types.NewParams(bytes.Repeat([]byte{0x01}, types.VerificationKeyHashSize)), } simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&smartaccountsGenesis) } diff --git a/x/smartaccounts/types/genesis.go b/x/smartaccounts/types/genesis.go index 9d633ecd..1d7bd8c6 100644 --- a/x/smartaccounts/types/genesis.go +++ b/x/smartaccounts/types/genesis.go @@ -1,14 +1,66 @@ package types +import "fmt" + // DefaultGenesis returns the default genesis state func DefaultGenesis() *GenesisState { return &GenesisState{ - Params: DefaultParams(), + Params: DefaultParams(), + SmartAccounts: []SmartAccountEntry{}, } } // Validate performs basic genesis state validation returning an error upon any // failure. func (gs GenesisState) Validate() error { - return gs.Params.Validate() + if err := gs.Params.Validate(); err != nil { + return err + } + + identities := make(map[string]struct{}, len(gs.SmartAccounts)) + for i, entry := range gs.SmartAccounts { + if len(entry.Identity) != IdentitySize { + return fmt.Errorf( + "smart account %d identity must be %d bytes: got %d", + i, + IdentitySize, + len(entry.Identity), + ) + } + + identity := string(entry.Identity) + if _, exists := identities[identity]; exists { + return fmt.Errorf("duplicate smart account identity at index %d", i) + } + identities[identity] = struct{}{} + + sessionKeys := make(map[string]map[uint64]struct{}, len(entry.Account.SessionKeys)) + for j, key := range entry.Account.SessionKeys { + if len(key.PublicKey) != SessionPublicKeySize { + return fmt.Errorf( + "smart account %d session key %d must be %d bytes: got %d", + i, + j, + SessionPublicKeySize, + len(key.PublicKey), + ) + } + if key.ExpiresAtHeight == 0 { + return fmt.Errorf("smart account %d session key %d has zero expiration height", i, j) + } + + publicKey := string(key.PublicKey) + expirations, exists := sessionKeys[publicKey] + if !exists { + expirations = make(map[uint64]struct{}) + sessionKeys[publicKey] = expirations + } + if _, exists := expirations[key.ExpiresAtHeight]; exists { + return fmt.Errorf("duplicate session key at smart account %d index %d", i, j) + } + expirations[key.ExpiresAtHeight] = struct{}{} + } + } + + return nil } diff --git a/x/smartaccounts/types/genesis.pb.go b/x/smartaccounts/types/genesis.pb.go index 34b1c0ae..5bf2276d 100644 --- a/x/smartaccounts/types/genesis.pb.go +++ b/x/smartaccounts/types/genesis.pb.go @@ -27,7 +27,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the smartaccounts module's genesis state. type GenesisState struct { // params defines all the parameters of the module. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + SmartAccounts []SmartAccountEntry `protobuf:"bytes,2,rep,name=smart_accounts,json=smartAccounts,proto3" json:"smart_accounts"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -70,8 +71,69 @@ func (m *GenesisState) GetParams() Params { return Params{} } +func (m *GenesisState) GetSmartAccounts() []SmartAccountEntry { + if m != nil { + return m.SmartAccounts + } + return nil +} + +// SmartAccountEntry associates an identity with its smart-account state. +type SmartAccountEntry struct { + Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Account SmartAccount `protobuf:"bytes,2,opt,name=account,proto3" json:"account"` +} + +func (m *SmartAccountEntry) Reset() { *m = SmartAccountEntry{} } +func (m *SmartAccountEntry) String() string { return proto.CompactTextString(m) } +func (*SmartAccountEntry) ProtoMessage() {} +func (*SmartAccountEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_a0f3311099fd44bf, []int{1} +} +func (m *SmartAccountEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SmartAccountEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SmartAccountEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SmartAccountEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_SmartAccountEntry.Merge(m, src) +} +func (m *SmartAccountEntry) XXX_Size() int { + return m.Size() +} +func (m *SmartAccountEntry) XXX_DiscardUnknown() { + xxx_messageInfo_SmartAccountEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_SmartAccountEntry proto.InternalMessageInfo + +func (m *SmartAccountEntry) GetIdentity() []byte { + if m != nil { + return m.Identity + } + return nil +} + +func (m *SmartAccountEntry) GetAccount() SmartAccount { + if m != nil { + return m.Account + } + return SmartAccount{} +} + func init() { proto.RegisterType((*GenesisState)(nil), "pulsarchain.smartaccounts.v1.GenesisState") + proto.RegisterType((*SmartAccountEntry)(nil), "pulsarchain.smartaccounts.v1.SmartAccountEntry") } func init() { @@ -79,22 +141,28 @@ func init() { } var fileDescriptor_a0f3311099fd44bf = []byte{ - // 232 bytes of a gzipped FileDescriptorProto + // 324 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x2a, 0x28, 0xcd, 0x29, 0x4e, 0x2c, 0x4a, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x2f, 0xce, 0x4d, 0x2c, 0x2a, 0x49, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x41, 0x52, 0xab, 0x87, 0xa2, 0x56, 0xaf, 0xcc, 0x50, 0x4a, 0x30, 0x31, 0x37, 0x33, 0x2f, 0x5f, 0x1f, 0x4c, 0x42, 0x34, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x99, 0xfa, 0x20, 0x16, 0x54, 0x54, 0x13, 0xaf, 0x95, 0x05, 0x89, 0x45, 0x89, - 0xb9, 0x50, 0x1b, 0x95, 0xc2, 0xb9, 0x78, 0xdc, 0x21, 0x4e, 0x08, 0x2e, 0x49, 0x2c, 0x49, 0x15, - 0x72, 0xe7, 0x62, 0x83, 0xc8, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0xa9, 0xe8, 0xe1, 0x73, - 0x92, 0x5e, 0x00, 0x58, 0xad, 0x13, 0xe7, 0x89, 0x7b, 0xf2, 0x0c, 0x2b, 0x9e, 0x6f, 0xd0, 0x62, - 0x0c, 0x82, 0x6a, 0x77, 0x0a, 0x3a, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, - 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, - 0x8b, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xbc, 0xfc, 0x94, 0x54, - 0x43, 0x03, 0x43, 0xdd, 0xcc, 0x7c, 0x7d, 0x88, 0x3d, 0xba, 0x10, 0x47, 0x57, 0xa0, 0x39, 0xbb, - 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xec, 0x66, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x17, 0x6f, 0x86, 0x72, 0x53, 0x01, 0x00, 0x00, + 0xb9, 0x50, 0x1b, 0xa5, 0x34, 0xf0, 0x2a, 0x2d, 0xa9, 0x2c, 0x48, 0x85, 0xaa, 0x54, 0xda, 0xca, + 0xc8, 0xc5, 0xe3, 0x0e, 0x71, 0x6d, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x3b, 0x17, 0x1b, 0xc4, + 0x28, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x15, 0x3d, 0x7c, 0xae, 0xd7, 0x0b, 0x00, 0xab, + 0x75, 0xe2, 0x3c, 0x71, 0x4f, 0x9e, 0x61, 0xc5, 0xf3, 0x0d, 0x5a, 0x8c, 0x41, 0x50, 0xed, 0x42, + 0x31, 0x5c, 0x7c, 0x60, 0xd5, 0xf1, 0x30, 0xe5, 0x12, 0x4c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0xfa, + 0xf8, 0x0d, 0x0c, 0x06, 0x09, 0x38, 0x42, 0x04, 0x5c, 0xf3, 0x4a, 0x8a, 0x2a, 0x9d, 0x58, 0x40, + 0x66, 0x07, 0xf1, 0x16, 0x23, 0x49, 0x14, 0x2b, 0x55, 0x73, 0x09, 0x62, 0xa8, 0x14, 0x92, 0xe2, + 0xe2, 0xc8, 0x4c, 0x49, 0xcd, 0x2b, 0xc9, 0x2c, 0xa9, 0x04, 0xbb, 0x9e, 0x27, 0x08, 0xce, 0x17, + 0xf2, 0xe2, 0x62, 0x87, 0x5a, 0x23, 0xc1, 0x04, 0xf6, 0x98, 0x16, 0xf1, 0xee, 0x80, 0x3a, 0x01, + 0x66, 0x80, 0x53, 0xd0, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, + 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x59, 0xa4, + 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xe7, 0xe5, 0xa7, 0xa4, 0x1a, 0x1a, + 0x18, 0xea, 0x66, 0xe6, 0xeb, 0x43, 0x6c, 0xd2, 0x85, 0xc4, 0x47, 0x05, 0x5a, 0x8c, 0x80, 0xa3, + 0x23, 0x89, 0x0d, 0x1c, 0x1f, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7d, 0x27, 0x85, 0xd5, + 0x59, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -117,6 +185,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.SmartAccounts) > 0 { + for iNdEx := len(m.SmartAccounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SmartAccounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } { size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -130,6 +212,46 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *SmartAccountEntry) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SmartAccountEntry) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SmartAccountEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { offset -= sovGenesis(v) base := offset @@ -149,6 +271,27 @@ func (m *GenesisState) Size() (n int) { _ = l l = m.Params.Size() n += 1 + l + sovGenesis(uint64(l)) + if len(m.SmartAccounts) > 0 { + for _, e := range m.SmartAccounts { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *SmartAccountEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = m.Account.Size() + n += 1 + l + sovGenesis(uint64(l)) return n } @@ -220,6 +363,157 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SmartAccounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SmartAccounts = append(m.SmartAccounts, SmartAccountEntry{}) + if err := m.SmartAccounts[len(m.SmartAccounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SmartAccountEntry) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SmartAccountEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SmartAccountEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) + if m.Identity == nil { + m.Identity = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/smartaccounts/types/genesis_test.go b/x/smartaccounts/types/genesis_test.go index 6faa6151..ac358810 100644 --- a/x/smartaccounts/types/genesis_test.go +++ b/x/smartaccounts/types/genesis_test.go @@ -21,9 +21,20 @@ func TestGenesisState_Validate(t *testing.T) { }, { desc: "valid genesis state", - genState: &types.GenesisState{Params: types.NewParams( - bytes.Repeat([]byte{0x01}, types.VerificationKeyHashSize), - )}, + genState: &types.GenesisState{ + Params: types.NewParams(bytes.Repeat([]byte{0x01}, types.VerificationKeyHashSize)), + SmartAccounts: []types.SmartAccountEntry{ + { + Identity: bytes.Repeat([]byte{0x02}, types.IdentitySize), + Account: types.SmartAccount{SessionKeys: []types.SessionKey{ + { + PublicKey: bytes.Repeat([]byte{0x03}, types.SessionPublicKeySize), + ExpiresAtHeight: 100, + }, + }}, + }, + }, + }, valid: true, }, { @@ -31,6 +42,42 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{}, valid: false, }, + { + desc: "invalid smart account identity", + genState: &types.GenesisState{ + Params: types.NewParams(bytes.Repeat([]byte{0x01}, types.VerificationKeyHashSize)), + SmartAccounts: []types.SmartAccountEntry{ + {Identity: []byte{0x01}}, + }, + }, + valid: false, + }, + { + desc: "duplicate smart account identity", + genState: &types.GenesisState{ + Params: types.NewParams(bytes.Repeat([]byte{0x01}, types.VerificationKeyHashSize)), + SmartAccounts: []types.SmartAccountEntry{ + {Identity: bytes.Repeat([]byte{0x02}, types.IdentitySize)}, + {Identity: bytes.Repeat([]byte{0x02}, types.IdentitySize)}, + }, + }, + valid: false, + }, + { + desc: "invalid session key", + genState: &types.GenesisState{ + Params: types.NewParams(bytes.Repeat([]byte{0x01}, types.VerificationKeyHashSize)), + SmartAccounts: []types.SmartAccountEntry{ + { + Identity: bytes.Repeat([]byte{0x02}, types.IdentitySize), + Account: types.SmartAccount{SessionKeys: []types.SessionKey{ + {PublicKey: []byte{0x03}, ExpiresAtHeight: 100}, + }}, + }, + }, + }, + valid: false, + }, } for _, tc := range tests { t.Run(tc.desc, func(t *testing.T) { From 77b7cc6680978f3e072ea0494797640d95093385 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 15:59:07 +0300 Subject: [PATCH 20/51] feat(antehandler): introduce smart account auth mode --- app/ante/tx_mode.go | 3 +++ app/ante/tx_mode_test.go | 16 ++++++++++++ app/ante/types/tx_auth.pb.go | 33 ++++++++++++++----------- proto/pulsarchain/ante/v1/tx_auth.proto | 2 ++ 4 files changed, 40 insertions(+), 14 deletions(-) diff --git a/app/ante/tx_mode.go b/app/ante/tx_mode.go index f3e76744..c630c175 100644 --- a/app/ante/tx_mode.go +++ b/app/ante/tx_mode.go @@ -22,6 +22,7 @@ type TxAuthMode uint8 const ( TxAuthModeCosmos TxAuthMode = iota TxAuthModeMina + TxAuthModeSmartAccount ) // RegisterInterfaces registers ante extension interfaces. @@ -111,6 +112,8 @@ func ResolveTxAuthMode(tx sdk.Tx) (TxAuthMode, error) { return TxAuthModeCosmos, nil case antetypes.TX_AUTH_MODE_MINA: return TxAuthModeMina, nil + case antetypes.TX_AUTH_MODE_SMART_ACCOUNT: + return TxAuthModeSmartAccount, nil default: return TxAuthModeCosmos, errorsmod.Wrapf( sdkerrors.ErrInvalidRequest, diff --git a/app/ante/tx_mode_test.go b/app/ante/tx_mode_test.go index 1c16d2b0..0709a83d 100644 --- a/app/ante/tx_mode_test.go +++ b/app/ante/tx_mode_test.go @@ -50,6 +50,22 @@ func TestResolveTxAuthModeDefaultsToCosmos(t *testing.T) { require.Equal(t, TxAuthModeCosmos, mode) } +func TestResolveTxAuthModeReadsSmartAccountExtension(t *testing.T) { + t.Parallel() + + mode, err := ResolveTxAuthMode(stubExtensionTx{ + extensionOptions: []*codectypes.Any{ + mustTxAuthModeExtensionAny( + t, + antetypes.TX_AUTH_MODE_SMART_ACCOUNT, + ), + }, + }) + + require.NoError(t, err) + require.Equal(t, TxAuthModeSmartAccount, mode) +} + // A Mina extension must flip resolution into Mina mode. // This is the primary positive branch for custom auth-mode routing. func TestResolveTxAuthModeReadsMinaExtension(t *testing.T) { diff --git a/app/ante/types/tx_auth.pb.go b/app/ante/types/tx_auth.pb.go index 03c7af3b..60fe0b91 100644 --- a/app/ante/types/tx_auth.pb.go +++ b/app/ante/types/tx_auth.pb.go @@ -33,18 +33,22 @@ const ( TX_AUTH_MODE_COSMOS TxAuthMode = 1 // TX_AUTH_MODE_MINA selects verification with the signer's registered Mina key. TX_AUTH_MODE_MINA TxAuthMode = 2 + // TX_AUTH_MODE_SMART_ACCOUNT selects verification with the registered Session key. + TX_AUTH_MODE_SMART_ACCOUNT TxAuthMode = 3 ) var TxAuthMode_name = map[int32]string{ 0: "TX_AUTH_MODE_UNSPECIFIED", 1: "TX_AUTH_MODE_COSMOS", 2: "TX_AUTH_MODE_MINA", + 3: "TX_AUTH_MODE_SMART_ACCOUNT", } var TxAuthMode_value = map[string]int32{ - "TX_AUTH_MODE_UNSPECIFIED": 0, - "TX_AUTH_MODE_COSMOS": 1, - "TX_AUTH_MODE_MINA": 2, + "TX_AUTH_MODE_UNSPECIFIED": 0, + "TX_AUTH_MODE_COSMOS": 1, + "TX_AUTH_MODE_MINA": 2, + "TX_AUTH_MODE_SMART_ACCOUNT": 3, } func (x TxAuthMode) String() string { @@ -101,7 +105,7 @@ func init() { func init() { proto.RegisterFile("pulsarchain/ante/v1/tx_auth.proto", fileDescriptor_5c6991cd595ed7d3) } var fileDescriptor_5c6991cd595ed7d3 = []byte{ - // 281 bytes of a gzipped FileDescriptorProto + // 303 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2c, 0x28, 0xcd, 0x29, 0x4e, 0x2c, 0x4a, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x4f, 0xcc, 0x2b, 0x49, 0xd5, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0x88, 0x4f, 0x2c, 0x2d, 0xc9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x46, @@ -110,16 +114,17 @@ var fileDescriptor_5c6991cd595ed7d3 = []byte{ 0x53, 0x52, 0x5d, 0x2b, 0x4a, 0x52, 0xf3, 0x8a, 0x33, 0xf3, 0xf3, 0x84, 0x1c, 0xb9, 0x78, 0xa0, 0x46, 0xc6, 0xe7, 0xe6, 0xa7, 0xa4, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x19, 0xc9, 0xeb, 0x61, 0x31, 0x58, 0x0f, 0xa1, 0x3f, 0x88, 0xab, 0x04, 0xce, 0xb6, 0x62, 0xe9, 0x58, 0x20, 0xcf, 0xa0, - 0x95, 0xc0, 0xc5, 0x85, 0x90, 0x17, 0x92, 0xe1, 0x92, 0x08, 0x89, 0x88, 0x77, 0x0c, 0x0d, 0xf1, - 0x88, 0xf7, 0xf5, 0x77, 0x71, 0x8d, 0x0f, 0xf5, 0x0b, 0x0e, 0x70, 0x75, 0xf6, 0x74, 0xf3, 0x74, - 0x75, 0x11, 0x60, 0x10, 0x12, 0xe7, 0x12, 0x46, 0x91, 0x75, 0xf6, 0x0f, 0xf6, 0xf5, 0x0f, 0x16, - 0x60, 0x14, 0x12, 0xe5, 0x12, 0x44, 0x91, 0xf0, 0xf5, 0xf4, 0x73, 0x14, 0x60, 0x92, 0x62, 0xe9, - 0x58, 0x2c, 0xc7, 0xe0, 0xe4, 0x7d, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, - 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, - 0x86, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x79, 0xf9, 0x29, 0xa9, - 0x86, 0x06, 0x86, 0xba, 0x99, 0xf9, 0xfa, 0x10, 0x3f, 0xe8, 0x42, 0x03, 0xb0, 0xa0, 0x00, 0x12, - 0x88, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0xe0, 0x50, 0x31, 0x06, 0x04, 0x00, 0x00, 0xff, - 0xff, 0x15, 0x7c, 0x5e, 0x70, 0x65, 0x01, 0x00, 0x00, + 0xd5, 0xc0, 0xc8, 0xc5, 0x85, 0x50, 0x20, 0x24, 0xc3, 0x25, 0x11, 0x12, 0x11, 0xef, 0x18, 0x1a, + 0xe2, 0x11, 0xef, 0xeb, 0xef, 0xe2, 0x1a, 0x1f, 0xea, 0x17, 0x1c, 0xe0, 0xea, 0xec, 0xe9, 0xe6, + 0xe9, 0xea, 0x22, 0xc0, 0x20, 0x24, 0xce, 0x25, 0x8c, 0x22, 0xeb, 0xec, 0x1f, 0xec, 0xeb, 0x1f, + 0x2c, 0xc0, 0x28, 0x24, 0xca, 0x25, 0x88, 0x22, 0xe1, 0xeb, 0xe9, 0xe7, 0x28, 0xc0, 0x24, 0x24, + 0xc7, 0x25, 0x85, 0x22, 0x1c, 0xec, 0xeb, 0x18, 0x14, 0x12, 0xef, 0xe8, 0xec, 0xec, 0x1f, 0xea, + 0x17, 0x22, 0xc0, 0x2c, 0xc5, 0xd2, 0xb1, 0x58, 0x8e, 0xc1, 0xc9, 0xfb, 0xc4, 0x23, 0x39, 0xc6, + 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, + 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x0c, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, + 0x73, 0xf5, 0xf3, 0xf2, 0x53, 0x52, 0x0d, 0x0d, 0x0c, 0x75, 0x33, 0xf3, 0xf5, 0x21, 0x9e, 0xd4, + 0x85, 0x86, 0x70, 0x41, 0x01, 0x24, 0x94, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xc1, + 0x66, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x2a, 0xe5, 0x78, 0x93, 0x86, 0x01, 0x00, 0x00, } func (m *TxAuthModeExtension) Marshal() (dAtA []byte, err error) { diff --git a/proto/pulsarchain/ante/v1/tx_auth.proto b/proto/pulsarchain/ante/v1/tx_auth.proto index 953462ce..cb431157 100644 --- a/proto/pulsarchain/ante/v1/tx_auth.proto +++ b/proto/pulsarchain/ante/v1/tx_auth.proto @@ -16,6 +16,8 @@ enum TxAuthMode { TX_AUTH_MODE_COSMOS = 1; // TX_AUTH_MODE_MINA selects verification with the signer's registered Mina key. TX_AUTH_MODE_MINA = 2; + // TX_AUTH_MODE_SMART_ACCOUNT selects verification with the registered Session key. + TX_AUTH_MODE_SMART_ACCOUNT = 3; } // TxAuthModeExtension marks the authentication mode of a transaction. From eb476bb0404fb329ff4b7413bd605d9fda357012 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 16:00:13 +0300 Subject: [PATCH 21/51] refactor(antehandler): route setpubkey and siggascost for smart accounts --- app/ante/routed_setpubkey.go | 2 +- app/ante/routed_setpubkey_test.go | 30 ++++++++++++++++++++++++++++ app/ante/routed_siggascost.go | 29 ++++++++++++++++++++++++++- app/ante/routed_validate_sigcount.go | 30 +++++++++++++++++++++++++++- 4 files changed, 88 insertions(+), 3 deletions(-) diff --git a/app/ante/routed_setpubkey.go b/app/ante/routed_setpubkey.go index 92857652..e54eed1b 100644 --- a/app/ante/routed_setpubkey.go +++ b/app/ante/routed_setpubkey.go @@ -24,7 +24,7 @@ func (d RoutedSetPubKeyDecorator) AnteHandle( return ctx, err } - if mode == TxAuthModeMina { + if mode == TxAuthModeMina || mode == TxAuthModeSmartAccount { return next(ctx, tx, simulate) } diff --git a/app/ante/routed_setpubkey_test.go b/app/ante/routed_setpubkey_test.go index a65ba2a5..a2a939eb 100644 --- a/app/ante/routed_setpubkey_test.go +++ b/app/ante/routed_setpubkey_test.go @@ -31,6 +31,36 @@ func TestRoutedSetPubKeyDecoratorRoutesToCosmosDecorator(t *testing.T) { require.True(t, nextCalled) } +func TestRoutedSetPubKeyDecoratorSkipsForSmartAccount(t *testing.T) { + t.Parallel() + + ctx := setTxAuthMode( + newTestSDKContext(t), + TxAuthModeSmartAccount, + ) + + delegate := &recordingDecorator{} + nextCalled := false + + _, err := NewRoutedSetPubKeyDecorator(delegate).AnteHandle( + ctx, + nil, + false, + func( + nextCtx sdk.Context, + tx sdk.Tx, + simulate bool, + ) (sdk.Context, error) { + nextCalled = true + return nextCtx, nil + }, + ) + + require.NoError(t, err) + require.Zero(t, delegate.calls) + require.True(t, nextCalled) +} + // Mina-auth txs intentionally skip Cosmos pubkey population. // The decorator should fall through directly to the next handler. func TestRoutedSetPubKeyDecoratorSkipsForMina(t *testing.T) { diff --git a/app/ante/routed_siggascost.go b/app/ante/routed_siggascost.go index a5d4e822..b44220d7 100644 --- a/app/ante/routed_siggascost.go +++ b/app/ante/routed_siggascost.go @@ -39,7 +39,7 @@ func (d RoutedSigGasConsumeDecorator) AnteHandle( return ctx, err } - if mode != TxAuthModeMina { + if mode == TxAuthModeCosmos { return d.cosmosDecorator.AnteHandle(ctx, tx, simulate, next) } @@ -54,6 +54,33 @@ func (d RoutedSigGasConsumeDecorator) AnteHandle( return ctx, err } + if mode == TxAuthModeSmartAccount { + for _, sig := range sigs { + switch sig.Data.(type) { + case *signing.SingleSignatureData: + ctx.GasMeter().ConsumeGas( + params.SigVerifyCostED25519, + "ante verify: smart account", + ) + + case *signing.MultiSignatureData: + return ctx, errorsmod.Wrap( + sdkerrors.ErrInvalidType, + "smart-account transactions do not support multisig signatures", + ) + + default: + return ctx, errorsmod.Wrapf( + sdkerrors.ErrInvalidType, + "unexpected signature data type %T", + sig.Data, + ) + } + } + + return next(ctx, tx, simulate) + } + for _, sig := range sigs { switch sig.Data.(type) { case *signing.SingleSignatureData: diff --git a/app/ante/routed_validate_sigcount.go b/app/ante/routed_validate_sigcount.go index 806ce959..ad44e6b7 100644 --- a/app/ante/routed_validate_sigcount.go +++ b/app/ante/routed_validate_sigcount.go @@ -39,7 +39,7 @@ func (d RoutedValidateSigCountDecorator) AnteHandle( return ctx, err } - if mode != TxAuthModeMina { + if mode == TxAuthModeCosmos { return d.cosmosDecorator.AnteHandle(ctx, tx, simulate, next) } @@ -54,6 +54,34 @@ func (d RoutedValidateSigCountDecorator) AnteHandle( return ctx, err } + if mode == TxAuthModeSmartAccount { + if len(sigs) != 1 { + return ctx, errorsmod.Wrapf( + sdkerrors.ErrUnauthorized, + "smart-account transactions require exactly one signature: got %d", + len(sigs), + ) + } + + switch sigs[0].Data.(type) { + case *signing.SingleSignatureData: + return next(ctx, tx, simulate) + + case *signing.MultiSignatureData: + return ctx, errorsmod.Wrap( + sdkerrors.ErrInvalidType, + "smart-account transactions do not support multisig signatures", + ) + + default: + return ctx, errorsmod.Wrapf( + sdkerrors.ErrInvalidType, + "unexpected signature data type %T", + sigs[0].Data, + ) + } + } + sigCount := 0 for _, sig := range sigs { switch sig.Data.(type) { From 4c0e5b5d2ce192f7f36a12d3d46ed3f369274ac6 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 17:02:05 +0300 Subject: [PATCH 22/51] feat(smartaccounts): add a field for authorised cosmos addr to use session keys --- .../pulsarchain/smartaccounts/v1/types.proto | 3 +- x/smartaccounts/keeper/genesis_test.go | 14 ++- x/smartaccounts/keeper/keeper.go | 26 +++-- .../keeper/msg_server_add_public_key.go | 8 +- .../keeper/msg_server_add_public_key_test.go | 23 ++++ x/smartaccounts/keeper/smart_accounts_test.go | 56 +++++++++- x/smartaccounts/types/errors.go | 3 + x/smartaccounts/types/genesis.go | 10 +- x/smartaccounts/types/genesis_test.go | 42 +++++-- x/smartaccounts/types/types.pb.go | 103 ++++++++++++++---- 10 files changed, 229 insertions(+), 59 deletions(-) diff --git a/proto/pulsarchain/smartaccounts/v1/types.proto b/proto/pulsarchain/smartaccounts/v1/types.proto index 73526096..d6bd263d 100644 --- a/proto/pulsarchain/smartaccounts/v1/types.proto +++ b/proto/pulsarchain/smartaccounts/v1/types.proto @@ -7,7 +7,8 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/node101-io/pulsar-chain/x/smartaccounts/types"; message SmartAccount { - repeated SessionKey session_keys = 1 [(gogoproto.nullable) = false]; + bytes account_address = 1; + repeated SessionKey session_keys = 2 [(gogoproto.nullable) = false]; } message SessionKey { diff --git a/x/smartaccounts/keeper/genesis_test.go b/x/smartaccounts/keeper/genesis_test.go index f6ded277..e6e957ef 100644 --- a/x/smartaccounts/keeper/genesis_test.go +++ b/x/smartaccounts/keeper/genesis_test.go @@ -16,12 +16,14 @@ func TestGenesis(t *testing.T) { SmartAccounts: []types.SmartAccountEntry{ { Identity: identity, - Account: types.SmartAccount{SessionKeys: []types.SessionKey{ - { - PublicKey: bytes.Repeat([]byte{0x03}, types.SessionPublicKeySize), - ExpiresAtHeight: 100, - }, - }}, + Account: types.SmartAccount{ + AccountAddress: bytes.Repeat([]byte{0x04}, 20), + SessionKeys: []types.SessionKey{ + { + PublicKey: bytes.Repeat([]byte{0x03}, types.SessionPublicKeySize), + ExpiresAtHeight: 100, + }, + }}, }, }, } diff --git a/x/smartaccounts/keeper/keeper.go b/x/smartaccounts/keeper/keeper.go index e660df0a..29e4a1f6 100644 --- a/x/smartaccounts/keeper/keeper.go +++ b/x/smartaccounts/keeper/keeper.go @@ -8,6 +8,7 @@ import ( "cosmossdk.io/collections" "cosmossdk.io/core/address" corestore "cosmossdk.io/core/store" + errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/node101-io/pulsar-chain/x/smartaccounts/types" @@ -23,7 +24,7 @@ type Keeper struct { // Typically, this should be the x/gov module account. authority []byte - smartAccounts collections.Map[[]byte, types.SmartAccount] // account_id --> session keys + smartAccounts collections.Map[[]byte, types.SmartAccount] // identity -> smart account verificationKeeper types.VerificationKeeper @@ -93,7 +94,7 @@ func (k Keeper) HasSmartAccount(ctx context.Context, identity []byte) (bool, err return k.smartAccounts.Has(ctx, identity) } -func (k Keeper) AppendSessionKeyToSmartAccount(ctx context.Context, identity []byte, key types.SessionKey) error { +func (k Keeper) AppendSessionKeyToSmartAccount(ctx context.Context, identity, accountAddress []byte, key types.SessionKey) error { if identity == nil { return types.ErrNilIdentity @@ -119,6 +120,14 @@ func (k Keeper) AppendSessionKeyToSmartAccount(ctx context.Context, identity []b return types.ErrInvalidExpirationHeight } + if len(accountAddress) == 0 { + return types.ErrNilAccountAddress + } + + if err := sdk.VerifyAddressFormat(accountAddress); err != nil { + return errorsmod.Wrap(types.ErrInvalidAccountAddress, err.Error()) + } + exists, err := k.HasSmartAccount(ctx, identity) if err != nil { return err @@ -126,6 +135,7 @@ func (k Keeper) AppendSessionKeyToSmartAccount(ctx context.Context, identity []b if !exists { err := k.smartAccounts.Set(ctx, identity, types.SmartAccount{ + AccountAddress: accountAddress, SessionKeys: []types.SessionKey{ key, }, @@ -140,6 +150,9 @@ func (k Keeper) AppendSessionKeyToSmartAccount(ctx context.Context, identity []b if err != nil { return err } + if !bytes.Equal(acc.AccountAddress, accountAddress) { + return types.ErrAccountAddressMismatch + } for _, existingKey := range acc.SessionKeys { if bytes.Equal(existingKey.PublicKey, key.PublicKey) && @@ -150,9 +163,7 @@ func (k Keeper) AppendSessionKeyToSmartAccount(ctx context.Context, identity []b acc.SessionKeys = append(acc.SessionKeys, key) - if err := k.smartAccounts.Set(ctx, identity, types.SmartAccount{ - SessionKeys: acc.SessionKeys, - }); err != nil { + if err := k.smartAccounts.Set(ctx, identity, acc); err != nil { return err } @@ -178,9 +189,8 @@ func (k Keeper) pruneSessionKey(ctx context.Context, identity []byte) error { validSessionKeys = append(validSessionKeys, key) } - if err := k.smartAccounts.Set(ctx, identity, types.SmartAccount{ - SessionKeys: validSessionKeys, - }); err != nil { + smartAcc.SessionKeys = validSessionKeys + if err := k.smartAccounts.Set(ctx, identity, smartAcc); err != nil { return err } diff --git a/x/smartaccounts/keeper/msg_server_add_public_key.go b/x/smartaccounts/keeper/msg_server_add_public_key.go index cbade8df..90335584 100644 --- a/x/smartaccounts/keeper/msg_server_add_public_key.go +++ b/x/smartaccounts/keeper/msg_server_add_public_key.go @@ -11,8 +11,10 @@ import ( ) func (k msgServer) AddPublicKey(ctx context.Context, msg *types.MsgAddPublicKey) (*types.MsgAddPublicKeyResponse, error) { - if _, err := k.addressCodec.StringToBytes(msg.Creator); err != nil { - return nil, errorsmod.Wrap(err, "invalid authority address") + + accountAddr, err := k.addressCodec.StringToBytes(msg.Creator) + if err != nil { + return nil, errorsmod.Wrap(err, "invalid creator address") } if msg.ProofHash == nil { @@ -82,7 +84,7 @@ func (k msgServer) AddPublicKey(ctx context.Context, msg *types.MsgAddPublicKey) return nil, types.ErrInvalidPublicInputsHash } - if err := k.AppendSessionKeyToSmartAccount(ctx, msg.PublicKeyInputs.Identity, types.SessionKey{ + if err := k.AppendSessionKeyToSmartAccount(ctx, msg.PublicKeyInputs.Identity, accountAddr, types.SessionKey{ PublicKey: msg.PublicKeyInputs.SessionPublicKey, ExpiresAtHeight: msg.PublicKeyInputs.ExpiresAtHeight, }); err != nil { diff --git a/x/smartaccounts/keeper/msg_server_add_public_key_test.go b/x/smartaccounts/keeper/msg_server_add_public_key_test.go index 4af7dddc..219eb04e 100644 --- a/x/smartaccounts/keeper/msg_server_add_public_key_test.go +++ b/x/smartaccounts/keeper/msg_server_add_public_key_test.go @@ -25,10 +25,33 @@ func TestAddPublicKey(t *testing.T) { require.NoError(t, err) require.True(t, exists) + accountAddress, err := f.addressCodec.StringToBytes(msg.Creator) + require.NoError(t, err) + genesis, err := f.keeper.ExportGenesis(f.ctx) + require.NoError(t, err) + require.Len(t, genesis.SmartAccounts, 1) + require.Equal(t, accountAddress, genesis.SmartAccounts[0].Account.AccountAddress) + _, err = server.AddPublicKey(f.ctx, msg) require.ErrorIs(t, err, types.ErrSessionKeyAlreadyExists) } +func TestAddPublicKeyRejectsDifferentCreatorForExistingAccount(t *testing.T) { + f := initFixture(t) + msg := validAddPublicKeyMessage(t, f) + server := keeper.NewMsgServerImpl(f.keeper) + + _, err := server.AddPublicKey(f.ctx, msg) + require.NoError(t, err) + + otherCreator, err := f.addressCodec.BytesToString(bytes.Repeat([]byte{0x09}, 20)) + require.NoError(t, err) + msg.Creator = otherCreator + + _, err = server.AddPublicKey(f.ctx, msg) + require.ErrorIs(t, err, types.ErrAccountAddressMismatch) +} + func TestAddPublicKeyRejectsInvalidProofData(t *testing.T) { f := initFixture(t) msg := validAddPublicKeyMessage(t, f) diff --git a/x/smartaccounts/keeper/smart_accounts_test.go b/x/smartaccounts/keeper/smart_accounts_test.go index 52b310e4..ee4400ca 100644 --- a/x/smartaccounts/keeper/smart_accounts_test.go +++ b/x/smartaccounts/keeper/smart_accounts_test.go @@ -13,6 +13,7 @@ import ( func TestAppendSessionKeyToSmartAccount(t *testing.T) { f := initFixture(t) identity := bytes.Repeat([]byte{0x01}, types.IdentitySize) + accountAddress := f.keeper.GetAuthority() key := types.SessionKey{ PublicKey: bytes.Repeat([]byte{0x02}, types.SessionPublicKeySize), ExpiresAtHeight: 10, @@ -22,36 +23,81 @@ func TestAppendSessionKeyToSmartAccount(t *testing.T) { require.NoError(t, err) require.False(t, exists) - require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, key)) + require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, accountAddress, key)) exists, err = f.keeper.HasSmartAccount(f.ctx, identity) require.NoError(t, err) require.True(t, exists) - err = f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, key) + err = f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, accountAddress, key) require.ErrorIs(t, err, types.ErrSessionKeyAlreadyExists) + + genesis, err := f.keeper.ExportGenesis(f.ctx) + require.NoError(t, err) + require.Len(t, genesis.SmartAccounts, 1) + require.Equal(t, accountAddress, genesis.SmartAccounts[0].Account.AccountAddress) } func TestAppendSessionKeyPrunesExpiredKeys(t *testing.T) { f := initFixture(t) identity := bytes.Repeat([]byte{0x01}, types.IdentitySize) + accountAddress := f.keeper.GetAuthority() expiringKey := types.SessionKey{ PublicKey: bytes.Repeat([]byte{0x02}, types.SessionPublicKeySize), ExpiresAtHeight: 2, } f.ctx = sdk.UnwrapSDKContext(f.ctx).WithBlockHeight(1) - require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, expiringKey)) + require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, accountAddress, expiringKey)) f.ctx = sdk.UnwrapSDKContext(f.ctx).WithBlockHeight(2) activeKey := types.SessionKey{ PublicKey: bytes.Repeat([]byte{0x03}, types.SessionPublicKeySize), ExpiresAtHeight: 3, } - require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, activeKey)) + require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, accountAddress, activeKey)) // The first key can be appended again because the previous copy was pruned. - require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, expiringKey)) + require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, accountAddress, expiringKey)) + + genesis, err := f.keeper.ExportGenesis(f.ctx) + require.NoError(t, err) + require.Equal(t, accountAddress, genesis.SmartAccounts[0].Account.AccountAddress) +} + +func TestAppendSessionKeyRejectsDifferentAccountAddress(t *testing.T) { + f := initFixture(t) + identity := bytes.Repeat([]byte{0x01}, types.IdentitySize) + accountAddress := f.keeper.GetAuthority() + key := types.SessionKey{ + PublicKey: bytes.Repeat([]byte{0x02}, types.SessionPublicKeySize), + ExpiresAtHeight: 10, + } + + require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, accountAddress, key)) + + otherAddress := bytes.Repeat([]byte{0x09}, 20) + otherKey := types.SessionKey{ + PublicKey: bytes.Repeat([]byte{0x03}, types.SessionPublicKeySize), + ExpiresAtHeight: 11, + } + err := f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, otherAddress, otherKey) + require.ErrorIs(t, err, types.ErrAccountAddressMismatch) +} + +func TestAppendSessionKeyRejectsInvalidAccountAddress(t *testing.T) { + f := initFixture(t) + identity := bytes.Repeat([]byte{0x01}, types.IdentitySize) + key := types.SessionKey{ + PublicKey: bytes.Repeat([]byte{0x02}, types.SessionPublicKeySize), + ExpiresAtHeight: 10, + } + + err := f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, nil, key) + require.ErrorIs(t, err, types.ErrNilAccountAddress) + + err = f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, bytes.Repeat([]byte{0x03}, 256), key) + require.ErrorIs(t, err, types.ErrInvalidAccountAddress) } func TestHasSmartAccountValidation(t *testing.T) { diff --git a/x/smartaccounts/types/errors.go b/x/smartaccounts/types/errors.go index 33fcc68c..7b6b7ec1 100644 --- a/x/smartaccounts/types/errors.go +++ b/x/smartaccounts/types/errors.go @@ -21,4 +21,7 @@ var ( ErrProofNotValid = errors.Register(ModuleName, 1110, "proof is not valid") ErrVerificationKeyMismatch = errors.Register(ModuleName, 1111, "verification key hash mismatch") ErrInvalidPublicInputsHash = errors.Register(ModuleName, 1112, "invalid public inputs hash") + ErrNilAccountAddress = errors.Register(ModuleName, 1113, "nil account address") + ErrInvalidAccountAddress = errors.Register(ModuleName, 1114, "invalid account address") + ErrAccountAddressMismatch = errors.Register(ModuleName, 1115, "account address mismatch") ) diff --git a/x/smartaccounts/types/genesis.go b/x/smartaccounts/types/genesis.go index 1d7bd8c6..b90aa6e0 100644 --- a/x/smartaccounts/types/genesis.go +++ b/x/smartaccounts/types/genesis.go @@ -1,6 +1,10 @@ package types -import "fmt" +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" +) // DefaultGenesis returns the default genesis state func DefaultGenesis() *GenesisState { @@ -34,6 +38,10 @@ func (gs GenesisState) Validate() error { } identities[identity] = struct{}{} + if err := sdk.VerifyAddressFormat(entry.Account.AccountAddress); err != nil { + return fmt.Errorf("smart account %d has invalid account address: %w", i, err) + } + sessionKeys := make(map[string]map[uint64]struct{}, len(entry.Account.SessionKeys)) for j, key := range entry.Account.SessionKeys { if len(key.PublicKey) != SessionPublicKeySize { diff --git a/x/smartaccounts/types/genesis_test.go b/x/smartaccounts/types/genesis_test.go index ac358810..5c450b9a 100644 --- a/x/smartaccounts/types/genesis_test.go +++ b/x/smartaccounts/types/genesis_test.go @@ -26,12 +26,14 @@ func TestGenesisState_Validate(t *testing.T) { SmartAccounts: []types.SmartAccountEntry{ { Identity: bytes.Repeat([]byte{0x02}, types.IdentitySize), - Account: types.SmartAccount{SessionKeys: []types.SessionKey{ - { - PublicKey: bytes.Repeat([]byte{0x03}, types.SessionPublicKeySize), - ExpiresAtHeight: 100, - }, - }}, + Account: types.SmartAccount{ + AccountAddress: bytes.Repeat([]byte{0x04}, 20), + SessionKeys: []types.SessionKey{ + { + PublicKey: bytes.Repeat([]byte{0x03}, types.SessionPublicKeySize), + ExpiresAtHeight: 100, + }, + }}, }, }, }, @@ -57,8 +59,14 @@ func TestGenesisState_Validate(t *testing.T) { genState: &types.GenesisState{ Params: types.NewParams(bytes.Repeat([]byte{0x01}, types.VerificationKeyHashSize)), SmartAccounts: []types.SmartAccountEntry{ - {Identity: bytes.Repeat([]byte{0x02}, types.IdentitySize)}, - {Identity: bytes.Repeat([]byte{0x02}, types.IdentitySize)}, + { + Identity: bytes.Repeat([]byte{0x02}, types.IdentitySize), + Account: types.SmartAccount{AccountAddress: bytes.Repeat([]byte{0x04}, 20)}, + }, + { + Identity: bytes.Repeat([]byte{0x02}, types.IdentitySize), + Account: types.SmartAccount{AccountAddress: bytes.Repeat([]byte{0x05}, 20)}, + }, }, }, valid: false, @@ -70,14 +78,26 @@ func TestGenesisState_Validate(t *testing.T) { SmartAccounts: []types.SmartAccountEntry{ { Identity: bytes.Repeat([]byte{0x02}, types.IdentitySize), - Account: types.SmartAccount{SessionKeys: []types.SessionKey{ - {PublicKey: []byte{0x03}, ExpiresAtHeight: 100}, - }}, + Account: types.SmartAccount{ + AccountAddress: bytes.Repeat([]byte{0x04}, 20), + SessionKeys: []types.SessionKey{ + {PublicKey: []byte{0x03}, ExpiresAtHeight: 100}, + }}, }, }, }, valid: false, }, + { + desc: "missing account address", + genState: &types.GenesisState{ + Params: types.NewParams(bytes.Repeat([]byte{0x01}, types.VerificationKeyHashSize)), + SmartAccounts: []types.SmartAccountEntry{ + {Identity: bytes.Repeat([]byte{0x02}, types.IdentitySize)}, + }, + }, + valid: false, + }, } for _, tc := range tests { t.Run(tc.desc, func(t *testing.T) { diff --git a/x/smartaccounts/types/types.pb.go b/x/smartaccounts/types/types.pb.go index d6cf182d..8ab934b7 100644 --- a/x/smartaccounts/types/types.pb.go +++ b/x/smartaccounts/types/types.pb.go @@ -25,7 +25,8 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type SmartAccount struct { - SessionKeys []SessionKey `protobuf:"bytes,1,rep,name=session_keys,json=sessionKeys,proto3" json:"session_keys"` + AccountAddress []byte `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + SessionKeys []SessionKey `protobuf:"bytes,2,rep,name=session_keys,json=sessionKeys,proto3" json:"session_keys"` } func (m *SmartAccount) Reset() { *m = SmartAccount{} } @@ -61,6 +62,13 @@ func (m *SmartAccount) XXX_DiscardUnknown() { var xxx_messageInfo_SmartAccount proto.InternalMessageInfo +func (m *SmartAccount) GetAccountAddress() []byte { + if m != nil { + return m.AccountAddress + } + return nil +} + func (m *SmartAccount) GetSessionKeys() []SessionKey { if m != nil { return m.SessionKeys @@ -192,28 +200,30 @@ func init() { } var fileDescriptor_5513da7f29cb5285 = []byte{ - // 334 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x51, 0x3f, 0x4f, 0xfa, 0x40, - 0x18, 0xee, 0xfd, 0x20, 0xbf, 0xe8, 0x41, 0x82, 0x34, 0x0e, 0x0d, 0xd1, 0x4a, 0x98, 0x1a, 0x23, - 0x3d, 0xab, 0x8b, 0x2b, 0x4c, 0x1a, 0x17, 0x2c, 0x83, 0x89, 0x0b, 0x39, 0xca, 0xa5, 0xbd, 0x08, - 0x77, 0x4d, 0xdf, 0x2b, 0xa1, 0x9f, 0xc0, 0xd5, 0x8f, 0xc5, 0xc8, 0xe8, 0x64, 0x0c, 0xfd, 0x22, - 0xa6, 0x3d, 0xc0, 0x7f, 0x89, 0x83, 0xcb, 0xe5, 0xbd, 0xe7, 0xcf, 0xfb, 0x5c, 0xee, 0xc1, 0x4e, - 0x9c, 0x4e, 0x81, 0x26, 0x41, 0x44, 0xb9, 0x20, 0x30, 0xa3, 0x89, 0xa2, 0x41, 0x20, 0x53, 0xa1, - 0x80, 0xcc, 0x3d, 0xa2, 0xb2, 0x98, 0x81, 0x1b, 0x27, 0x52, 0x49, 0xf3, 0xe8, 0x93, 0xd2, 0xfd, - 0xa2, 0x74, 0xe7, 0x5e, 0xab, 0x49, 0x67, 0x5c, 0x48, 0x52, 0x9e, 0xda, 0xd0, 0x3a, 0x0c, 0x65, - 0x28, 0xcb, 0x91, 0x14, 0x93, 0x46, 0x3b, 0x14, 0xd7, 0x87, 0x85, 0xb9, 0xa7, 0xcd, 0xe6, 0x1d, - 0xae, 0x03, 0x03, 0xe0, 0x52, 0x8c, 0x1e, 0x59, 0x06, 0x16, 0x6a, 0x57, 0x9c, 0xda, 0x85, 0xe3, - 0xfe, 0x96, 0xe6, 0x0e, 0xb5, 0xe3, 0x96, 0x65, 0xfd, 0xea, 0xf2, 0xf5, 0xc4, 0xf0, 0x6b, 0xb0, - 0x43, 0xa0, 0x73, 0x8f, 0xf1, 0x87, 0xc0, 0x3c, 0xc6, 0x38, 0x4e, 0xc7, 0x53, 0x1e, 0x14, 0xfb, - 0x2d, 0xd4, 0x46, 0x4e, 0xdd, 0xdf, 0xd7, 0x48, 0x41, 0x9f, 0xe2, 0x26, 0x5b, 0xc4, 0x3c, 0x61, - 0x30, 0xa2, 0x6a, 0x14, 0x31, 0x1e, 0x46, 0xca, 0xfa, 0xd7, 0x46, 0x4e, 0xd5, 0x6f, 0x6c, 0x88, - 0x9e, 0xba, 0x2e, 0xe1, 0xce, 0x13, 0xc2, 0x8d, 0xc1, 0xd6, 0x79, 0x23, 0xe2, 0x54, 0x81, 0x79, - 0x86, 0xcd, 0xed, 0xfb, 0x7f, 0xc4, 0x1c, 0x6c, 0x98, 0xc1, 0x5f, 0xd2, 0xcc, 0x16, 0xde, 0xe3, - 0x13, 0x26, 0x14, 0x57, 0x99, 0x55, 0x29, 0xf7, 0xed, 0xee, 0x7d, 0x7f, 0xb9, 0xb6, 0xd1, 0x6a, - 0x6d, 0xa3, 0xb7, 0xb5, 0x8d, 0x9e, 0x73, 0xdb, 0x58, 0xe5, 0xb6, 0xf1, 0x92, 0xdb, 0xc6, 0xc3, - 0x55, 0xc8, 0x55, 0x94, 0x8e, 0xdd, 0x40, 0xce, 0x88, 0x90, 0x13, 0xe6, 0x9d, 0x7b, 0x5d, 0x2e, - 0x89, 0xfe, 0xce, 0xae, 0xee, 0x79, 0xf1, 0xad, 0xe9, 0xb2, 0xe6, 0xf1, 0xff, 0xb2, 0xa0, 0xcb, - 0xf7, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x6c, 0x34, 0x7f, 0x13, 0x02, 0x00, 0x00, + // 358 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x4f, 0x4f, 0xf2, 0x40, + 0x10, 0xc6, 0xbb, 0x40, 0xde, 0xbc, 0x2e, 0x44, 0xa4, 0xf1, 0xd0, 0x10, 0xad, 0x84, 0x8b, 0x8d, + 0x91, 0xd6, 0xea, 0xc5, 0x2b, 0x9c, 0x34, 0x5e, 0xb0, 0x1c, 0x4c, 0xbc, 0x34, 0xa5, 0xdd, 0xb4, + 0x1b, 0x61, 0xb7, 0xe9, 0x6c, 0x09, 0xfd, 0x04, 0x26, 0x9e, 0xfc, 0x58, 0x1c, 0x39, 0x7a, 0x32, + 0x06, 0xbe, 0x88, 0x69, 0xb7, 0xe0, 0xbf, 0xc4, 0x83, 0x97, 0xcd, 0xec, 0x6f, 0xe6, 0x99, 0x99, + 0xec, 0x3e, 0xd8, 0x88, 0xd3, 0x09, 0x78, 0x89, 0x1f, 0x79, 0x94, 0x59, 0x30, 0xf5, 0x12, 0xe1, + 0xf9, 0x3e, 0x4f, 0x99, 0x00, 0x6b, 0x66, 0x5b, 0x22, 0x8b, 0x09, 0x98, 0x71, 0xc2, 0x05, 0x57, + 0x0f, 0x3e, 0x55, 0x9a, 0x5f, 0x2a, 0xcd, 0x99, 0xdd, 0x6e, 0x79, 0x53, 0xca, 0xb8, 0x55, 0x9c, + 0x52, 0xd0, 0xde, 0x0f, 0x79, 0xc8, 0x8b, 0xd0, 0xca, 0x23, 0x49, 0xbb, 0x4f, 0x08, 0x37, 0x46, + 0xb9, 0xba, 0x2f, 0xd5, 0xea, 0x31, 0x6e, 0x96, 0x8d, 0x5c, 0x2f, 0x08, 0x12, 0x02, 0xa0, 0xa1, + 0x0e, 0x32, 0x1a, 0xce, 0x6e, 0x89, 0xfb, 0x92, 0xaa, 0xb7, 0xb8, 0x01, 0x04, 0x80, 0x72, 0xe6, + 0x3e, 0x90, 0x0c, 0xb4, 0x4a, 0xa7, 0x6a, 0xd4, 0xcf, 0x0d, 0xf3, 0xb7, 0xbd, 0xcc, 0x91, 0x54, + 0xdc, 0x90, 0x6c, 0x50, 0x5b, 0xbc, 0x1e, 0x29, 0x4e, 0x1d, 0xb6, 0x04, 0xba, 0x77, 0x18, 0x7f, + 0x14, 0xa8, 0x87, 0x18, 0xc7, 0xe9, 0x78, 0x42, 0xfd, 0xbc, 0x7f, 0xb9, 0xc4, 0x8e, 0x24, 0x79, + 0xfa, 0x04, 0xb7, 0xc8, 0x3c, 0xa6, 0x09, 0x01, 0xd7, 0x13, 0x6e, 0x44, 0x68, 0x18, 0x09, 0xad, + 0xd2, 0x41, 0x46, 0xcd, 0x69, 0x96, 0x89, 0xbe, 0xb8, 0x2a, 0x70, 0xf7, 0x11, 0xe1, 0xe6, 0x70, + 0xa3, 0xbc, 0x66, 0x71, 0x2a, 0x40, 0x3d, 0xc5, 0xea, 0x66, 0xff, 0x1f, 0x63, 0xf6, 0xca, 0xcc, + 0xf0, 0x2f, 0xd3, 0xd4, 0x36, 0xfe, 0x4f, 0x03, 0xc2, 0x04, 0x15, 0x99, 0x56, 0x2d, 0xfa, 0x6d, + 0xef, 0x03, 0x67, 0xb1, 0xd2, 0xd1, 0x72, 0xa5, 0xa3, 0xb7, 0x95, 0x8e, 0x9e, 0xd7, 0xba, 0xb2, + 0x5c, 0xeb, 0xca, 0xcb, 0x5a, 0x57, 0xee, 0x2f, 0x43, 0x2a, 0xa2, 0x74, 0x6c, 0xfa, 0x7c, 0x6a, + 0x31, 0x1e, 0x10, 0xfb, 0xcc, 0xee, 0x51, 0x6e, 0xc9, 0xe7, 0xec, 0x49, 0x47, 0xcc, 0xbf, 0x79, + 0xa2, 0x30, 0xc4, 0xf8, 0x5f, 0xf1, 0x95, 0x17, 0xef, 0x01, 0x00, 0x00, 0xff, 0xff, 0xea, 0xf9, + 0xd0, 0x6b, 0x3d, 0x02, 0x00, 0x00, } func (m *SmartAccount) Marshal() (dAtA []byte, err error) { @@ -247,9 +257,16 @@ func (m *SmartAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 } } + if len(m.AccountAddress) > 0 { + i -= len(m.AccountAddress) + copy(dAtA[i:], m.AccountAddress) + i = encodeVarintTypes(dAtA, i, uint64(len(m.AccountAddress))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -347,6 +364,10 @@ func (m *SmartAccount) Size() (n int) { } var l int _ = l + l = len(m.AccountAddress) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } if len(m.SessionKeys) > 0 { for _, e := range m.SessionKeys { l = e.Size() @@ -428,6 +449,40 @@ func (m *SmartAccount) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountAddress = append(m.AccountAddress[:0], dAtA[iNdEx:postIndex]...) + if m.AccountAddress == nil { + m.AccountAddress = []byte{} + } + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SessionKeys", wireType) } From ae987dd34ecdfda8341b6a6c41a832847abbb3d5 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 17:16:01 +0300 Subject: [PATCH 23/51] chore: use continue at ExportGenesis rather than iter.Next to make sure loop continues --- x/smartaccounts/keeper/genesis.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/smartaccounts/keeper/genesis.go b/x/smartaccounts/keeper/genesis.go index bab444d2..cddf6218 100644 --- a/x/smartaccounts/keeper/genesis.go +++ b/x/smartaccounts/keeper/genesis.go @@ -41,11 +41,11 @@ func (k Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) acc, err := iter.Value() if err != nil { - iter.Next() + continue } identity, err := iter.Key() if err != nil { - iter.Next() + continue } genesis.SmartAccounts = append(genesis.SmartAccounts, types.SmartAccountEntry{ From ee9c374176d7020ae2ab84239f9d55140d27fc45 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 17:17:22 +0300 Subject: [PATCH 24/51] feat(smartaccounts): add a new method to check for a given identity is authorized to use the session key --- x/smartaccounts/keeper/keeper.go | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/x/smartaccounts/keeper/keeper.go b/x/smartaccounts/keeper/keeper.go index 29e4a1f6..2edcd0a8 100644 --- a/x/smartaccounts/keeper/keeper.go +++ b/x/smartaccounts/keeper/keeper.go @@ -94,6 +94,52 @@ func (k Keeper) HasSmartAccount(ctx context.Context, identity []byte) (bool, err return k.smartAccounts.Has(ctx, identity) } +// IsSessionKeyAuthorized reports whether publicKey is currently authorized +// for identity and accountAddr. +func (k Keeper) IsSessionKeyAuthorized(ctx context.Context, identity, accountAddr, publicKey []byte) (bool, error) { + if len(publicKey) == 0 { + return false, types.ErrNilPublicKey + } + + if len(publicKey) != types.SessionPublicKeySize { + return false, types.ErrPublicKeyInvalidLength + } + + if len(accountAddr) == 0 { + return false, types.ErrNilAccountAddress + } + + if err := sdk.VerifyAddressFormat(accountAddr); err != nil { + return false, errorsmod.Wrap(types.ErrInvalidAccountAddress, err.Error()) + } + + exists, err := k.HasSmartAccount(ctx, identity) + if err != nil { + return false, err + } + if !exists { + return false, nil + } + + account, err := k.smartAccounts.Get(ctx, identity) + if err != nil { + return false, err + } + + if !bytes.Equal(accountAddr, account.AccountAddress) { + return false, types.ErrAccountAddressMismatch + } + + currentHeight := uint64(sdk.UnwrapSDKContext(ctx).BlockHeight()) + for _, key := range account.SessionKeys { + if bytes.Equal(key.PublicKey, publicKey) && currentHeight < key.ExpiresAtHeight { + return true, nil + } + } + + return false, nil +} + func (k Keeper) AppendSessionKeyToSmartAccount(ctx context.Context, identity, accountAddress []byte, key types.SessionKey) error { if identity == nil { From e63c1c05f53caf282faf945eeb5d16c53e9a51ff Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 18:18:04 +0300 Subject: [PATCH 25/51] feat(antehandler): introduce Smart Account Verifier to authorize transactions with session keys --- app/ante/handler.go | 13 +- app/ante/handler_test.go | 116 +++++++---- app/ante/routed_sigverify.go | 42 +++- app/ante/routed_sigverify_test.go | 79 +++++++- app/ante/smart_account_verifier.go | 252 ++++++++++++++++++++++++ app/ante/test_helpers_test.go | 2 +- app/ante/types/tx_auth.pb.go | 83 ++++++-- app/app.go | 17 +- proto/pulsarchain/ante/v1/tx_auth.proto | 2 + 9 files changed, 523 insertions(+), 83 deletions(-) create mode 100644 app/ante/smart_account_verifier.go diff --git a/app/ante/handler.go b/app/ante/handler.go index 5c49854c..9f5cb153 100644 --- a/app/ante/handler.go +++ b/app/ante/handler.go @@ -19,6 +19,7 @@ import ( type HandlerOptions struct { AccountKeeper authante.AccountKeeper BankKeeper authtypes.BankKeeper + SmartAccountKeeper SmartAccountKeeper ExtensionOptionChecker authante.ExtensionOptionChecker FeegrantKeeper authante.FeegrantKeeper SignModeHandler *txsigning.HandlerMap @@ -48,6 +49,10 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "keyregistry keeper is required for ante builder") } + if options.SmartAccountKeeper == nil { + return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "smart account keeper is required for ante builder") + } + if options.MinaNetworkID == "" { return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "mina network ID is required for ante builder") } @@ -77,6 +82,12 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { options.Logger, ) + smartAccountVerifier := NewSmartAccountVerifier( + options.SmartAccountKeeper, + options.AccountKeeper, + options.SignModeHandler, + ) + anteDecorators := []sdk.AnteDecorator{ authante.NewSetUpContextDecorator(), authante.NewExtensionOptionsDecorator(NewTxAuthExtensionOptionChecker(options.ExtensionOptionChecker)), @@ -89,7 +100,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { NewRoutedSetPubKeyDecorator(cosmosSetPubKey), NewRoutedValidateSigCountDecorator(options.AccountKeeper, cosmosValidateSigCount), NewRoutedSigGasConsumeDecorator(options.AccountKeeper, cosmosSigGasConsume), - NewRoutedSigVerificationDecorator(cosmosSigVerify, minaVerifier), + NewRoutedSigVerificationDecorator(cosmosSigVerify, minaVerifier, smartAccountVerifier), NewStakingDecorator(options.KeyregistryKeeper), authante.NewIncrementSequenceDecorator(options.AccountKeeper), } diff --git a/app/ante/handler_test.go b/app/ante/handler_test.go index e55e4e4f..9b93904d 100644 --- a/app/ante/handler_test.go +++ b/app/ante/handler_test.go @@ -64,9 +64,21 @@ func (stubBankKeeper) SendCoinsFromAccountToModule(context.Context, sdk.AccAddre return nil } +type stubSmartAccountKeeper struct{} + +func (stubSmartAccountKeeper) IsSessionKeyAuthorized( + context.Context, + []byte, + []byte, + []byte, +) (bool, error) { + return false, nil +} + var ( - _ authante.AccountKeeper = stubAccountKeeper{} - _ authtypes.BankKeeper = stubBankKeeper{} + _ authante.AccountKeeper = stubAccountKeeper{} + _ authtypes.BankKeeper = stubBankKeeper{} + _ appante.SmartAccountKeeper = stubSmartAccountKeeper{} ) var stubKeyregistryKeeper = &keyregistrykeeper.Keeper{} @@ -77,12 +89,13 @@ func TestNewAnteHandler(t *testing.T) { t.Parallel() anteHandler, err := appante.NewAnteHandler(appante.HandlerOptions{ - AccountKeeper: stubAccountKeeper{}, - BankKeeper: stubBankKeeper{}, - SignModeHandler: &txsigning.HandlerMap{}, - KeyregistryKeeper: stubKeyregistryKeeper, - MinaNetworkID: appante.DefaultMinaNetworkID, - Logger: log.NewNopLogger(), + AccountKeeper: stubAccountKeeper{}, + BankKeeper: stubBankKeeper{}, + SignModeHandler: &txsigning.HandlerMap{}, + KeyregistryKeeper: stubKeyregistryKeeper, + SmartAccountKeeper: stubSmartAccountKeeper{}, + MinaNetworkID: appante.DefaultMinaNetworkID, + Logger: log.NewNopLogger(), }) require.NoError(t, err) @@ -95,11 +108,12 @@ func TestNewAnteHandlerRequiresAccountKeeper(t *testing.T) { t.Parallel() anteHandler, err := appante.NewAnteHandler(appante.HandlerOptions{ - BankKeeper: stubBankKeeper{}, - SignModeHandler: &txsigning.HandlerMap{}, - KeyregistryKeeper: stubKeyregistryKeeper, - MinaNetworkID: appante.DefaultMinaNetworkID, - Logger: log.NewNopLogger(), + BankKeeper: stubBankKeeper{}, + SignModeHandler: &txsigning.HandlerMap{}, + KeyregistryKeeper: stubKeyregistryKeeper, + SmartAccountKeeper: stubSmartAccountKeeper{}, + MinaNetworkID: appante.DefaultMinaNetworkID, + Logger: log.NewNopLogger(), }) require.ErrorContains(t, err, "account keeper is required for ante builder") @@ -112,11 +126,12 @@ func TestNewAnteHandlerRequiresBankKeeper(t *testing.T) { t.Parallel() anteHandler, err := appante.NewAnteHandler(appante.HandlerOptions{ - AccountKeeper: stubAccountKeeper{}, - SignModeHandler: &txsigning.HandlerMap{}, - KeyregistryKeeper: stubKeyregistryKeeper, - MinaNetworkID: appante.DefaultMinaNetworkID, - Logger: log.NewNopLogger(), + AccountKeeper: stubAccountKeeper{}, + SignModeHandler: &txsigning.HandlerMap{}, + KeyregistryKeeper: stubKeyregistryKeeper, + SmartAccountKeeper: stubSmartAccountKeeper{}, + MinaNetworkID: appante.DefaultMinaNetworkID, + Logger: log.NewNopLogger(), }) require.ErrorContains(t, err, "bank keeper is required for ante builder") @@ -129,11 +144,12 @@ func TestNewAnteHandlerRequiresSignModeHandler(t *testing.T) { t.Parallel() anteHandler, err := appante.NewAnteHandler(appante.HandlerOptions{ - AccountKeeper: stubAccountKeeper{}, - BankKeeper: stubBankKeeper{}, - KeyregistryKeeper: stubKeyregistryKeeper, - MinaNetworkID: appante.DefaultMinaNetworkID, - Logger: log.NewNopLogger(), + AccountKeeper: stubAccountKeeper{}, + BankKeeper: stubBankKeeper{}, + KeyregistryKeeper: stubKeyregistryKeeper, + SmartAccountKeeper: stubSmartAccountKeeper{}, + MinaNetworkID: appante.DefaultMinaNetworkID, + Logger: log.NewNopLogger(), }) require.ErrorContains(t, err, "sign mode handler is required for ante builder") @@ -146,11 +162,12 @@ func TestNewAnteHandlerRequiresKeyregistryKeeper(t *testing.T) { t.Parallel() anteHandler, err := appante.NewAnteHandler(appante.HandlerOptions{ - AccountKeeper: stubAccountKeeper{}, - BankKeeper: stubBankKeeper{}, - SignModeHandler: &txsigning.HandlerMap{}, - MinaNetworkID: appante.DefaultMinaNetworkID, - Logger: log.NewNopLogger(), + AccountKeeper: stubAccountKeeper{}, + BankKeeper: stubBankKeeper{}, + SignModeHandler: &txsigning.HandlerMap{}, + SmartAccountKeeper: stubSmartAccountKeeper{}, + MinaNetworkID: appante.DefaultMinaNetworkID, + Logger: log.NewNopLogger(), }) require.ErrorContains(t, err, "keyregistry keeper is required for ante builder") @@ -163,11 +180,12 @@ func TestNewAnteHandlerRequiresMinaNetworkID(t *testing.T) { t.Parallel() anteHandler, err := appante.NewAnteHandler(appante.HandlerOptions{ - AccountKeeper: stubAccountKeeper{}, - BankKeeper: stubBankKeeper{}, - SignModeHandler: &txsigning.HandlerMap{}, - KeyregistryKeeper: stubKeyregistryKeeper, - Logger: log.NewNopLogger(), + AccountKeeper: stubAccountKeeper{}, + BankKeeper: stubBankKeeper{}, + SignModeHandler: &txsigning.HandlerMap{}, + KeyregistryKeeper: stubKeyregistryKeeper, + SmartAccountKeeper: stubSmartAccountKeeper{}, + Logger: log.NewNopLogger(), }) require.ErrorContains(t, err, "mina network ID is required for ante builder") @@ -180,12 +198,13 @@ func TestNewAnteHandlerRejectsUnsupportedMinaNetworkID(t *testing.T) { t.Parallel() anteHandler, err := appante.NewAnteHandler(appante.HandlerOptions{ - AccountKeeper: stubAccountKeeper{}, - BankKeeper: stubBankKeeper{}, - SignModeHandler: &txsigning.HandlerMap{}, - KeyregistryKeeper: stubKeyregistryKeeper, - MinaNetworkID: "unsupported", - Logger: log.NewNopLogger(), + AccountKeeper: stubAccountKeeper{}, + BankKeeper: stubBankKeeper{}, + SignModeHandler: &txsigning.HandlerMap{}, + KeyregistryKeeper: stubKeyregistryKeeper, + SmartAccountKeeper: stubSmartAccountKeeper{}, + MinaNetworkID: "unsupported", + Logger: log.NewNopLogger(), }) require.ErrorIs(t, err, sdkerrors.ErrLogic) @@ -198,14 +217,31 @@ func TestNewAnteHandlerRejectsUnsupportedMinaNetworkID(t *testing.T) { func TestNewAnteHandlerRequiresLogger(t *testing.T) { t.Parallel() + anteHandler, err := appante.NewAnteHandler(appante.HandlerOptions{ + AccountKeeper: stubAccountKeeper{}, + BankKeeper: stubBankKeeper{}, + SignModeHandler: &txsigning.HandlerMap{}, + KeyregistryKeeper: stubKeyregistryKeeper, + SmartAccountKeeper: stubSmartAccountKeeper{}, + MinaNetworkID: appante.DefaultMinaNetworkID, + }) + + require.ErrorContains(t, err, "logger is required for ante builder") + require.Nil(t, anteHandler) +} + +func TestNewAnteHandlerRequiresSmartAccountKeeper(t *testing.T) { + t.Parallel() + anteHandler, err := appante.NewAnteHandler(appante.HandlerOptions{ AccountKeeper: stubAccountKeeper{}, BankKeeper: stubBankKeeper{}, SignModeHandler: &txsigning.HandlerMap{}, KeyregistryKeeper: stubKeyregistryKeeper, MinaNetworkID: appante.DefaultMinaNetworkID, + Logger: log.NewNopLogger(), }) - require.ErrorContains(t, err, "logger is required for ante builder") + require.ErrorContains(t, err, "smart account keeper is required for ante builder") require.Nil(t, anteHandler) } diff --git a/app/ante/routed_sigverify.go b/app/ante/routed_sigverify.go index cbbfb804..aa32ff8d 100644 --- a/app/ante/routed_sigverify.go +++ b/app/ante/routed_sigverify.go @@ -1,26 +1,38 @@ package ante -import sdk "github.com/cosmos/cosmos-sdk/types" +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) // MinaSignatureVerifier verifies Mina-authenticated tx signatures. type MinaSignatureVerifier interface { VerifySignatures(ctx sdk.Context, tx sdk.Tx, simulate bool) error } +// SmartAccountSignatureVerifier verifies smart-account-authenticated tx signatures. +type SmartAccountSignatureVerifier interface { + VerifySignatures(ctx sdk.Context, tx sdk.Tx, simulate bool) error +} + // RoutedSigVerificationDecorator routes signature verification based on tx auth mode. type RoutedSigVerificationDecorator struct { - cosmosDecorator sdk.AnteDecorator - minaVerifier MinaSignatureVerifier + cosmosDecorator sdk.AnteDecorator + minaVerifier MinaSignatureVerifier + smartAccountVerifier SmartAccountSignatureVerifier } // NewRoutedSigVerificationDecorator creates a routed signature verification decorator. func NewRoutedSigVerificationDecorator( cosmosDecorator sdk.AnteDecorator, minaVerifier MinaSignatureVerifier, + smartAccountVerifier SmartAccountSignatureVerifier, ) RoutedSigVerificationDecorator { return RoutedSigVerificationDecorator{ - cosmosDecorator: cosmosDecorator, - minaVerifier: minaVerifier, + cosmosDecorator: cosmosDecorator, + minaVerifier: minaVerifier, + smartAccountVerifier: smartAccountVerifier, } } @@ -36,12 +48,24 @@ func (d RoutedSigVerificationDecorator) AnteHandle( return ctx, err } - if mode != TxAuthModeMina { + switch mode { + case TxAuthModeCosmos: return d.cosmosDecorator.AnteHandle(ctx, tx, simulate, next) - } + case TxAuthModeMina: + if err := d.minaVerifier.VerifySignatures(ctx, tx, simulate); err != nil { + return ctx, err + } - if err := d.minaVerifier.VerifySignatures(ctx, tx, simulate); err != nil { - return ctx, err + case TxAuthModeSmartAccount: + if err := d.smartAccountVerifier.VerifySignatures(ctx, tx, simulate); err != nil { + return ctx, err + } + + default: + return ctx, errorsmod.Wrap( + sdkerrors.ErrInvalidRequest, + "unsupported transaction authentication mode", + ) } return next(ctx, tx, simulate) diff --git a/app/ante/routed_sigverify_test.go b/app/ante/routed_sigverify_test.go index 6a8227dd..332838b9 100644 --- a/app/ante/routed_sigverify_test.go +++ b/app/ante/routed_sigverify_test.go @@ -14,10 +14,15 @@ func TestRoutedSigVerificationDecoratorRoutesToCosmosDecorator(t *testing.T) { ctx := setTxAuthMode(newTestSDKContext(t), TxAuthModeCosmos) delegate := &recordingDecorator{} - verifier := &recordingVerifier{} + minaVerifier := &recordingVerifier{} + smartAccountVerifier := &recordingVerifier{} nextCalled := false - _, err := NewRoutedSigVerificationDecorator(delegate, verifier).AnteHandle( + _, err := NewRoutedSigVerificationDecorator( + delegate, + minaVerifier, + smartAccountVerifier, + ).AnteHandle( ctx, nil, false, @@ -29,7 +34,8 @@ func TestRoutedSigVerificationDecoratorRoutesToCosmosDecorator(t *testing.T) { require.NoError(t, err) require.Equal(t, 1, delegate.calls) - require.Zero(t, verifier.calls) + require.Zero(t, minaVerifier.calls) + require.Zero(t, smartAccountVerifier.calls) require.True(t, nextCalled) } @@ -40,10 +46,15 @@ func TestRoutedSigVerificationDecoratorRoutesToMinaVerifier(t *testing.T) { ctx := setTxAuthMode(newTestSDKContext(t), TxAuthModeMina) delegate := &recordingDecorator{} - verifier := &recordingVerifier{} + minaVerifier := &recordingVerifier{} + smartAccountVerifier := &recordingVerifier{} nextCalled := false - _, err := NewRoutedSigVerificationDecorator(delegate, verifier).AnteHandle( + _, err := NewRoutedSigVerificationDecorator( + delegate, + minaVerifier, + smartAccountVerifier, + ).AnteHandle( ctx, nil, false, @@ -55,13 +66,14 @@ func TestRoutedSigVerificationDecoratorRoutesToMinaVerifier(t *testing.T) { require.NoError(t, err) require.Zero(t, delegate.calls) - require.Equal(t, 1, verifier.calls) + require.Equal(t, 1, minaVerifier.calls) + require.Zero(t, smartAccountVerifier.calls) require.True(t, nextCalled) } // Mina verifier failures must abort the ante chain immediately. // This preserves the verifier error rather than masking it in routing code. -func TestRoutedSigVerificationDecoratorPropagatesVerifierErrors(t *testing.T) { +func TestRoutedSigVerificationDecoratorPropagatesMinaVerifierErrors(t *testing.T) { t.Parallel() ctx := setTxAuthMode(newTestSDKContext(t), TxAuthModeMina) @@ -69,6 +81,59 @@ func TestRoutedSigVerificationDecoratorPropagatesVerifierErrors(t *testing.T) { _, err := NewRoutedSigVerificationDecorator( &recordingDecorator{}, &recordingVerifier{err: errVerifyFailed}, + &recordingVerifier{}, + ).AnteHandle( + ctx, + nil, + false, + func(nextCtx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { + t.Fatal("next handler should not be called when verifier fails") + return nextCtx, nil + }, + ) + + require.ErrorIs(t, err, errVerifyFailed) +} + +func TestRoutedSigVerificationDecoratorRoutesToSmartAccountVerifier(t *testing.T) { + t.Parallel() + + ctx := setTxAuthMode(newTestSDKContext(t), TxAuthModeSmartAccount) + delegate := &recordingDecorator{} + minaVerifier := &recordingVerifier{} + smartAccountVerifier := &recordingVerifier{} + nextCalled := false + + _, err := NewRoutedSigVerificationDecorator( + delegate, + minaVerifier, + smartAccountVerifier, + ).AnteHandle( + ctx, + nil, + false, + func(nextCtx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { + nextCalled = true + return nextCtx, nil + }, + ) + + require.NoError(t, err) + require.Zero(t, delegate.calls) + require.Zero(t, minaVerifier.calls) + require.Equal(t, 1, smartAccountVerifier.calls) + require.True(t, nextCalled) +} + +func TestRoutedSigVerificationDecoratorPropagatesSmartAccountVerifierErrors(t *testing.T) { + t.Parallel() + + ctx := setTxAuthMode(newTestSDKContext(t), TxAuthModeSmartAccount) + + _, err := NewRoutedSigVerificationDecorator( + &recordingDecorator{}, + &recordingVerifier{}, + &recordingVerifier{err: errVerifyFailed}, ).AnteHandle( ctx, nil, diff --git a/app/ante/smart_account_verifier.go b/app/ante/smart_account_verifier.go new file mode 100644 index 00000000..795a9e37 --- /dev/null +++ b/app/ante/smart_account_verifier.go @@ -0,0 +1,252 @@ +package ante + +import ( + "context" + + errorsmod "cosmossdk.io/errors" + txsigning "cosmossdk.io/x/tx/signing" + + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + signing "github.com/cosmos/cosmos-sdk/types/tx/signing" + authante "github.com/cosmos/cosmos-sdk/x/auth/ante" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" + gogoproto "github.com/cosmos/gogoproto/proto" + + antetypes "github.com/node101-io/pulsar-chain/app/ante/types" + smartaccountstypes "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +type SmartAccountKeeper interface { + IsSessionKeyAuthorized(ctx context.Context, identity, accountAddr, publicKey []byte) (bool, error) +} + +// SmartAccountVerifier verifies smart-account transaction signatures. +type SmartAccountVerifier struct { + smartAccountsKeeper SmartAccountKeeper + accountKeeper authante.AccountKeeper + signModeHandler *txsigning.HandlerMap +} + +// NewSmartAccountVerifier creates a smart-account signature verifier. +func NewSmartAccountVerifier( + smartAccountsKeeper SmartAccountKeeper, + accountKeeper authante.AccountKeeper, + signModeHandler *txsigning.HandlerMap, +) SmartAccountVerifier { + return SmartAccountVerifier{ + smartAccountsKeeper: smartAccountsKeeper, + accountKeeper: accountKeeper, + signModeHandler: signModeHandler, + } +} + +// VerifySignatures verifies a smart-account transaction. +func (v SmartAccountVerifier) VerifySignatures( + ctx sdk.Context, + tx sdk.Tx, + simulate bool, +) error { + sigTx, ok := tx.(authsigning.Tx) + if !ok { + return errorsmod.Wrap( + sdkerrors.ErrTxDecode, + "invalid smart-account transaction type", + ) + } + + if sigTx.GetUnordered() { + return errorsmod.Wrap( + sdkerrors.ErrNotSupported, + "unordered smart-account transactions are not supported", + ) + } + + signatures, err := sigTx.GetSignaturesV2() + if err != nil { + return err + } + + signers, err := sigTx.GetSigners() + if err != nil { + return err + } + + if len(signatures) != 1 || len(signers) != 1 { + return errorsmod.Wrapf( + sdkerrors.ErrUnauthorized, + "smart-account transactions require one signer and one signature: signers %d, signatures %d", + len(signers), + len(signatures), + ) + } + + signature := signatures[0] + + sessionPublicKey, ok := signature.PubKey.(*ed25519.PubKey) + if !ok { + return errorsmod.Wrap( + sdkerrors.ErrInvalidPubKey, + "smart-account transactions require an Ed25519 session public key", + ) + } + + signatureData, ok := signature.Data.(*signing.SingleSignatureData) + if !ok { + return errorsmod.Wrap( + sdkerrors.ErrInvalidType, + "smart-account transactions require single signature data", + ) + } + + if signatureData.SignMode != signing.SignMode_SIGN_MODE_DIRECT { + return errorsmod.Wrapf( + sdkerrors.ErrNotSupported, + "unsupported smart-account sign mode: %s", + signatureData.SignMode, + ) + } + + identity, err := smartAccountIdentityFromTx(tx) + if err != nil { + return err + } + + accountAddress := signers[0] + + authorized, err := v.smartAccountsKeeper.IsSessionKeyAuthorized( + ctx, + identity, + accountAddress, + sessionPublicKey.Bytes(), + ) + if err != nil { + return err + } + if !authorized { + return errorsmod.Wrap( + sdkerrors.ErrUnauthorized, + "session public key is not authorized for smart account", + ) + } + + account, err := authante.GetSignerAcc( + ctx, + v.accountKeeper, + accountAddress, + ) + if err != nil { + return err + } + + if signature.Sequence != account.GetSequence() { + return errorsmod.Wrapf( + sdkerrors.ErrWrongSequence, + "account sequence mismatch, expected %d, got %d", + account.GetSequence(), + signature.Sequence, + ) + } + + if simulate || ctx.IsReCheckTx() || !ctx.IsSigverifyTx() { + return nil + } + + accountNumber := account.GetAccountNumber() + + signBytes, err := authsigning.GetSignBytesAdapter( + ctx, + v.signModeHandler, + signatureData.SignMode, + authsigning.SignerData{ + Address: account.GetAddress().String(), + ChainID: ctx.ChainID(), + AccountNumber: accountNumber, + Sequence: signature.Sequence, + }, + tx, + ) + if err != nil { + return errorsmod.Wrapf( + sdkerrors.ErrInvalidType, + "generate smart-account sign bytes: %v", + err, + ) + } + + if !sessionPublicKey.VerifySignature( + signBytes, + signatureData.Signature, + ) { + return errorsmod.Wrap( + sdkerrors.ErrUnauthorized, + "smart-account signature verification failed", + ) + } + + return nil +} + +func smartAccountIdentityFromTx(tx sdk.Tx) ([]byte, error) { + txWithExtensions, ok := tx.(HasExtensionOptionsTx) + if !ok { + return nil, errorsmod.Wrap( + sdkerrors.ErrInvalidRequest, + "smart-account transaction has no extension options", + ) + } + + var identity []byte + found := false + + for _, option := range txWithExtensions.GetExtensionOptions() { + if option == nil || option.TypeUrl != txAuthModeExtensionTypeURL { + continue + } + + if found { + return nil, errorsmod.Wrap( + sdkerrors.ErrInvalidRequest, + "multiple tx auth mode extensions found", + ) + } + found = true + + extension := &antetypes.TxAuthModeExtension{} + if err := gogoproto.Unmarshal(option.Value, extension); err != nil { + return nil, errorsmod.Wrapf( + sdkerrors.ErrTxDecode, + "invalid tx auth mode extension: %v", + err, + ) + } + + if extension.TxAuthMode != antetypes.TX_AUTH_MODE_SMART_ACCOUNT { + return nil, errorsmod.Wrap( + sdkerrors.ErrInvalidRequest, + "smart-account verifier received a non-smart-account extension", + ) + } + + identity = extension.SmartAccountIdentity + } + + if !found { + return nil, errorsmod.Wrap( + sdkerrors.ErrInvalidRequest, + "smart-account auth mode extension not found", + ) + } + + if len(identity) != smartaccountstypes.IdentitySize { + return nil, errorsmod.Wrapf( + sdkerrors.ErrInvalidRequest, + "smart-account identity must be %d bytes: got %d", + smartaccountstypes.IdentitySize, + len(identity), + ) + } + + return identity, nil +} diff --git a/app/ante/test_helpers_test.go b/app/ante/test_helpers_test.go index 4c789408..38ebdd57 100644 --- a/app/ante/test_helpers_test.go +++ b/app/ante/test_helpers_test.go @@ -35,7 +35,7 @@ func (d *recordingDecorator) AnteHandle( return next(ctx, tx, simulate) } -// recordingVerifier tracks whether the Mina verification branch was invoked. +// recordingVerifier tracks whether a custom signature-verification branch was invoked. type recordingVerifier struct { calls int err error diff --git a/app/ante/types/tx_auth.pb.go b/app/ante/types/tx_auth.pb.go index 60fe0b91..ba12c805 100644 --- a/app/ante/types/tx_auth.pb.go +++ b/app/ante/types/tx_auth.pb.go @@ -61,7 +61,8 @@ func (TxAuthMode) EnumDescriptor() ([]byte, []int) { // TxAuthModeExtension marks the authentication mode of a transaction. type TxAuthModeExtension struct { - TxAuthMode TxAuthMode `protobuf:"varint,1,opt,name=tx_auth_mode,json=txAuthMode,proto3,enum=pulsarchain.ante.v1.TxAuthMode" json:"tx_auth_mode,omitempty"` + TxAuthMode TxAuthMode `protobuf:"varint,1,opt,name=tx_auth_mode,json=txAuthMode,proto3,enum=pulsarchain.ante.v1.TxAuthMode" json:"tx_auth_mode,omitempty"` + SmartAccountIdentity []byte `protobuf:"bytes,2,opt,name=smart_account_identity,json=smartAccountIdentity,proto3" json:"smart_account_identity,omitempty"` } func (m *TxAuthModeExtension) Reset() { *m = TxAuthModeExtension{} } @@ -105,26 +106,29 @@ func init() { func init() { proto.RegisterFile("pulsarchain/ante/v1/tx_auth.proto", fileDescriptor_5c6991cd595ed7d3) } var fileDescriptor_5c6991cd595ed7d3 = []byte{ - // 303 bytes of a gzipped FileDescriptorProto + // 346 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2c, 0x28, 0xcd, 0x29, 0x4e, 0x2c, 0x4a, 0xce, 0x48, 0xcc, 0xcc, 0xd3, 0x4f, 0xcc, 0x2b, 0x49, 0xd5, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0x88, 0x4f, 0x2c, 0x2d, 0xc9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x46, 0x52, 0xa2, 0x07, 0x52, 0xa2, 0x57, 0x66, 0x28, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x96, 0xd7, - 0x07, 0xb1, 0x20, 0x4a, 0x95, 0xe2, 0xb8, 0x84, 0x43, 0x2a, 0x1c, 0x4b, 0x4b, 0x32, 0x7c, 0xf3, - 0x53, 0x52, 0x5d, 0x2b, 0x4a, 0x52, 0xf3, 0x8a, 0x33, 0xf3, 0xf3, 0x84, 0x1c, 0xb9, 0x78, 0xa0, - 0x46, 0xc6, 0xe7, 0xe6, 0xa7, 0xa4, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x19, 0xc9, 0xeb, 0x61, - 0x31, 0x58, 0x0f, 0xa1, 0x3f, 0x88, 0xab, 0x04, 0xce, 0xb6, 0x62, 0xe9, 0x58, 0x20, 0xcf, 0xa0, - 0xd5, 0xc0, 0xc8, 0xc5, 0x85, 0x50, 0x20, 0x24, 0xc3, 0x25, 0x11, 0x12, 0x11, 0xef, 0x18, 0x1a, - 0xe2, 0x11, 0xef, 0xeb, 0xef, 0xe2, 0x1a, 0x1f, 0xea, 0x17, 0x1c, 0xe0, 0xea, 0xec, 0xe9, 0xe6, - 0xe9, 0xea, 0x22, 0xc0, 0x20, 0x24, 0xce, 0x25, 0x8c, 0x22, 0xeb, 0xec, 0x1f, 0xec, 0xeb, 0x1f, - 0x2c, 0xc0, 0x28, 0x24, 0xca, 0x25, 0x88, 0x22, 0xe1, 0xeb, 0xe9, 0xe7, 0x28, 0xc0, 0x24, 0x24, - 0xc7, 0x25, 0x85, 0x22, 0x1c, 0xec, 0xeb, 0x18, 0x14, 0x12, 0xef, 0xe8, 0xec, 0xec, 0x1f, 0xea, - 0x17, 0x22, 0xc0, 0x2c, 0xc5, 0xd2, 0xb1, 0x58, 0x8e, 0xc1, 0xc9, 0xfb, 0xc4, 0x23, 0x39, 0xc6, - 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, - 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x0c, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, - 0x73, 0xf5, 0xf3, 0xf2, 0x53, 0x52, 0x0d, 0x0d, 0x0c, 0x75, 0x33, 0xf3, 0xf5, 0x21, 0x9e, 0xd4, - 0x85, 0x86, 0x70, 0x41, 0x01, 0x24, 0x94, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xc1, - 0x66, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x2a, 0xe5, 0x78, 0x93, 0x86, 0x01, 0x00, 0x00, + 0x07, 0xb1, 0x20, 0x4a, 0x95, 0xa6, 0x30, 0x72, 0x09, 0x87, 0x54, 0x38, 0x96, 0x96, 0x64, 0xf8, + 0xe6, 0xa7, 0xa4, 0xba, 0x56, 0x94, 0xa4, 0xe6, 0x15, 0x67, 0xe6, 0xe7, 0x09, 0x39, 0x72, 0xf1, + 0x40, 0xcd, 0x8c, 0xcf, 0xcd, 0x4f, 0x49, 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x33, 0x92, 0xd7, + 0xc3, 0x62, 0xb2, 0x1e, 0x42, 0x7f, 0x10, 0x57, 0x09, 0x9c, 0x2d, 0x64, 0xc2, 0x25, 0x56, 0x9c, + 0x9b, 0x58, 0x54, 0x12, 0x9f, 0x98, 0x9c, 0x9c, 0x5f, 0x9a, 0x57, 0x12, 0x9f, 0x99, 0x92, 0x9a, + 0x57, 0x92, 0x59, 0x52, 0x29, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x13, 0x24, 0x02, 0x96, 0x75, 0x84, + 0x48, 0x7a, 0x42, 0xe5, 0xac, 0x58, 0x3a, 0x16, 0xc8, 0x33, 0x68, 0x35, 0x30, 0x72, 0x71, 0x21, + 0x8c, 0x15, 0x92, 0xe1, 0x92, 0x08, 0x89, 0x88, 0x77, 0x0c, 0x0d, 0xf1, 0x88, 0xf7, 0xf5, 0x77, + 0x71, 0x8d, 0x0f, 0xf5, 0x0b, 0x0e, 0x70, 0x75, 0xf6, 0x74, 0xf3, 0x74, 0x75, 0x11, 0x60, 0x10, + 0x12, 0xe7, 0x12, 0x46, 0x91, 0x75, 0xf6, 0x0f, 0xf6, 0xf5, 0x0f, 0x16, 0x60, 0x14, 0x12, 0xe5, + 0x12, 0x44, 0x91, 0xf0, 0xf5, 0xf4, 0x73, 0x14, 0x60, 0x12, 0x92, 0xe3, 0x92, 0x42, 0x11, 0x0e, + 0xf6, 0x75, 0x0c, 0x0a, 0x89, 0x77, 0x74, 0x76, 0xf6, 0x0f, 0xf5, 0x0b, 0x11, 0x60, 0x96, 0x62, + 0xe9, 0x58, 0x2c, 0xc7, 0xe0, 0xe4, 0x7d, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, + 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, + 0x51, 0x86, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x79, 0xf9, 0x29, + 0xa9, 0x86, 0x06, 0x86, 0xba, 0x99, 0xf9, 0xfa, 0x90, 0xa0, 0xd1, 0x85, 0x46, 0x4c, 0x41, 0x01, + 0x24, 0x72, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xa1, 0x6d, 0x0c, 0x08, 0x00, 0x00, + 0xff, 0xff, 0xee, 0x91, 0x21, 0x47, 0xbd, 0x01, 0x00, 0x00, } func (m *TxAuthModeExtension) Marshal() (dAtA []byte, err error) { @@ -147,6 +151,13 @@ func (m *TxAuthModeExtension) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.SmartAccountIdentity) > 0 { + i -= len(m.SmartAccountIdentity) + copy(dAtA[i:], m.SmartAccountIdentity) + i = encodeVarintTxAuth(dAtA, i, uint64(len(m.SmartAccountIdentity))) + i-- + dAtA[i] = 0x12 + } if m.TxAuthMode != 0 { i = encodeVarintTxAuth(dAtA, i, uint64(m.TxAuthMode)) i-- @@ -175,6 +186,10 @@ func (m *TxAuthModeExtension) Size() (n int) { if m.TxAuthMode != 0 { n += 1 + sovTxAuth(uint64(m.TxAuthMode)) } + l = len(m.SmartAccountIdentity) + if l > 0 { + n += 1 + l + sovTxAuth(uint64(l)) + } return n } @@ -232,6 +247,40 @@ func (m *TxAuthModeExtension) Unmarshal(dAtA []byte) error { break } } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SmartAccountIdentity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTxAuth + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTxAuth + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTxAuth + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SmartAccountIdentity = append(m.SmartAccountIdentity[:0], dAtA[iNdEx:postIndex]...) + if m.SmartAccountIdentity == nil { + m.SmartAccountIdentity = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTxAuth(dAtA[iNdEx:]) diff --git a/app/app.go b/app/app.go index f6192b46..465e189c 100644 --- a/app/app.go +++ b/app/app.go @@ -294,14 +294,15 @@ func New( baseapp.SetOptimisticExecution(), func(bApp *baseapp.BaseApp) { anteHandler, err := appante.NewAnteHandler(appante.HandlerOptions{ - AccountKeeper: app.AuthKeeper, - BankKeeper: app.BankKeeper, - FeegrantKeeper: app.FeeGrantKeeper, - SignModeHandler: app.txConfig.SignModeHandler(), - SigGasConsumer: authante.DefaultSigVerificationGasConsumer, - KeyregistryKeeper: &app.KeyregistryKeeper, - MinaNetworkID: string(minaNetworkID), - Logger: logger, + AccountKeeper: app.AuthKeeper, + BankKeeper: app.BankKeeper, + FeegrantKeeper: app.FeeGrantKeeper, + SignModeHandler: app.txConfig.SignModeHandler(), + SigGasConsumer: authante.DefaultSigVerificationGasConsumer, + KeyregistryKeeper: &app.KeyregistryKeeper, + SmartAccountKeeper: &app.SmartaccountsKeeper, + MinaNetworkID: string(minaNetworkID), + Logger: logger, }) if err != nil { panic(err) diff --git a/proto/pulsarchain/ante/v1/tx_auth.proto b/proto/pulsarchain/ante/v1/tx_auth.proto index cb431157..40fc6237 100644 --- a/proto/pulsarchain/ante/v1/tx_auth.proto +++ b/proto/pulsarchain/ante/v1/tx_auth.proto @@ -25,4 +25,6 @@ message TxAuthModeExtension { option (gogoproto.goproto_getters) = false; TxAuthMode tx_auth_mode = 1; + + bytes smart_account_identity = 2; } From 20929666eb85ee34ad562564bc0b3031b55f91e1 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 18:26:42 +0300 Subject: [PATCH 26/51] test(antehandler): add tests for smart account verifier --- app/ante/smart_account_verifier_test.go | 473 ++++++++++++++++++++++++ 1 file changed, 473 insertions(+) create mode 100644 app/ante/smart_account_verifier_test.go diff --git a/app/ante/smart_account_verifier_test.go b/app/ante/smart_account_verifier_test.go new file mode 100644 index 00000000..9a2a3f41 --- /dev/null +++ b/app/ante/smart_account_verifier_test.go @@ -0,0 +1,473 @@ +package ante + +import ( + "bytes" + "context" + "errors" + "testing" + + txsigning "cosmossdk.io/x/tx/signing" + "github.com/cosmos/cosmos-sdk/client" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + gogoproto "github.com/cosmos/gogoproto/proto" + "github.com/stretchr/testify/require" + + antetypes "github.com/node101-io/pulsar-chain/app/ante/types" + smartaccountstypes "github.com/node101-io/pulsar-chain/x/smartaccounts/types" +) + +type recordingSmartAccountKeeper struct { + authorized bool + err error + calls int + identity []byte + accountAddress []byte + publicKey []byte +} + +func (k *recordingSmartAccountKeeper) IsSessionKeyAuthorized( + _ context.Context, + identity, accountAddress, publicKey []byte, +) (bool, error) { + k.calls++ + k.identity = append([]byte(nil), identity...) + k.accountAddress = append([]byte(nil), accountAddress...) + k.publicKey = append([]byte(nil), publicKey...) + + return k.authorized, k.err +} + +type stubSmartAccountTx struct { + stubAuthTx + extensionOptions []*codectypes.Any +} + +func (tx stubSmartAccountTx) GetExtensionOptions() []*codectypes.Any { + return tx.extensionOptions +} + +func mustSmartAccountExtensionAny(t *testing.T, identity []byte) *codectypes.Any { + t.Helper() + + bz, err := gogoproto.Marshal(&antetypes.TxAuthModeExtension{ + TxAuthMode: antetypes.TX_AUTH_MODE_SMART_ACCOUNT, + SmartAccountIdentity: identity, + }) + require.NoError(t, err) + + return &codectypes.Any{ + TypeUrl: txAuthModeExtensionTypeURL, + Value: bz, + } +} + +func buildSmartAccountVerifierTestTx( + t *testing.T, + txConfig client.TxConfig, + from sdk.AccAddress, + pubKey cryptotypes.PubKey, + identity []byte, + sequence uint64, + signature []byte, +) sdk.Tx { + t.Helper() + + builder := txConfig.NewTxBuilder() + to := sdk.AccAddress([]byte("smart-account-recipient")) + + err := builder.SetMsgs(banktypes.NewMsgSend( + from, + to, + sdk.NewCoins(sdk.NewInt64Coin("pmina", 1)), + )) + require.NoError(t, err) + + builder.SetGasLimit(200000) + builder.SetFeeAmount(sdk.NewCoins(sdk.NewInt64Coin("pmina", 1))) + builder.SetMemo("smart-account-verifier-test") + + extendedBuilder, ok := builder.(client.ExtendedTxBuilder) + require.True(t, ok) + extendedBuilder.SetExtensionOptions(mustSmartAccountExtensionAny(t, identity)) + + err = builder.SetSignatures(signingtypes.SignatureV2{ + PubKey: pubKey, + Data: &signingtypes.SingleSignatureData{ + SignMode: signingtypes.SignMode_SIGN_MODE_DIRECT, + Signature: signature, + }, + Sequence: sequence, + }) + require.NoError(t, err) + + return builder.GetTx() +} + +func newStubSmartAccountTx( + t *testing.T, + accountAddress, identity []byte, + pubKey cryptotypes.PubKey, + sequence uint64, +) stubSmartAccountTx { + t.Helper() + + return stubSmartAccountTx{ + stubAuthTx: stubAuthTx{ + signers: [][]byte{accountAddress}, + sigs: []signingtypes.SignatureV2{ + { + PubKey: pubKey, + Sequence: sequence, + Data: &signingtypes.SingleSignatureData{ + SignMode: signingtypes.SignMode_SIGN_MODE_DIRECT, + Signature: []byte{1}, + }, + }, + }, + }, + extensionOptions: []*codectypes.Any{ + mustSmartAccountExtensionAny(t, identity), + }, + } +} + +func TestSmartAccountVerifierAcceptsValidSignature(t *testing.T) { + t.Parallel() + + _, account := newVerifierAccount(t, 7, 11) + sessionPrivateKey := ed25519.GenPrivKey() + identity := bytes.Repeat([]byte{1}, smartaccountstypes.IdentitySize) + keeper := &recordingSmartAccountKeeper{authorized: true} + encoding := newVerifierEncodingConfig(t) + verifier := NewSmartAccountVerifier( + keeper, + verifierAccountKeeper{account: account}, + encoding.TxConfig.SignModeHandler(), + ) + ctx := newTestSDKContext(t).WithIsSigverifyTx(true) + + unsignedTx := buildSmartAccountVerifierTestTx( + t, + encoding.TxConfig, + account.GetAddress(), + sessionPrivateKey.PubKey(), + identity, + account.GetSequence(), + nil, + ) + signBytes := buildVerifierSignBytes( + t, + ctx, + encoding.TxConfig, + unsignedTx, + account, + account.GetSequence(), + signingtypes.SignMode_SIGN_MODE_DIRECT, + ) + signature, err := sessionPrivateKey.Sign(signBytes) + require.NoError(t, err) + + signedTx := buildSmartAccountVerifierTestTx( + t, + encoding.TxConfig, + account.GetAddress(), + sessionPrivateKey.PubKey(), + identity, + account.GetSequence(), + signature, + ) + + err = verifier.VerifySignatures(ctx, signedTx, false) + + require.NoError(t, err) + require.Equal(t, 1, keeper.calls) + require.Equal(t, identity, keeper.identity) + require.Equal(t, []byte(account.GetAddress()), keeper.accountAddress) + require.Equal(t, sessionPrivateKey.PubKey().Bytes(), keeper.publicKey) +} + +func TestSmartAccountVerifierRejectsUnauthorizedSessionKey(t *testing.T) { + t.Parallel() + + _, account := newVerifierAccount(t, 1, 4) + sessionPrivateKey := ed25519.GenPrivKey() + identity := bytes.Repeat([]byte{2}, smartaccountstypes.IdentitySize) + keeper := &recordingSmartAccountKeeper{authorized: false} + verifier := NewSmartAccountVerifier( + keeper, + verifierAccountKeeper{account: account}, + &txsigning.HandlerMap{}, + ) + tx := newStubSmartAccountTx( + t, + account.GetAddress(), + identity, + sessionPrivateKey.PubKey(), + account.GetSequence(), + ) + + err := verifier.VerifySignatures(newTestSDKContext(t).WithIsSigverifyTx(true), tx, false) + + require.ErrorIs(t, err, sdkerrors.ErrUnauthorized) + require.Equal(t, 1, keeper.calls) +} + +func TestSmartAccountVerifierPropagatesKeeperError(t *testing.T) { + t.Parallel() + + _, account := newVerifierAccount(t, 1, 4) + sessionPrivateKey := ed25519.GenPrivKey() + identity := bytes.Repeat([]byte{3}, smartaccountstypes.IdentitySize) + expectedErr := errors.New("smart account state unavailable") + keeper := &recordingSmartAccountKeeper{err: expectedErr} + verifier := NewSmartAccountVerifier( + keeper, + verifierAccountKeeper{account: account}, + &txsigning.HandlerMap{}, + ) + tx := newStubSmartAccountTx( + t, + account.GetAddress(), + identity, + sessionPrivateKey.PubKey(), + account.GetSequence(), + ) + + err := verifier.VerifySignatures(newTestSDKContext(t).WithIsSigverifyTx(true), tx, false) + + require.ErrorIs(t, err, expectedErr) +} + +func TestSmartAccountVerifierRejectsWrongSequence(t *testing.T) { + t.Parallel() + + _, account := newVerifierAccount(t, 1, 4) + sessionPrivateKey := ed25519.GenPrivKey() + identity := bytes.Repeat([]byte{4}, smartaccountstypes.IdentitySize) + keeper := &recordingSmartAccountKeeper{authorized: true} + verifier := NewSmartAccountVerifier( + keeper, + verifierAccountKeeper{account: account}, + &txsigning.HandlerMap{}, + ) + tx := newStubSmartAccountTx( + t, + account.GetAddress(), + identity, + sessionPrivateKey.PubKey(), + account.GetSequence()+1, + ) + + err := verifier.VerifySignatures(newTestSDKContext(t).WithIsSigverifyTx(true), tx, false) + + require.ErrorIs(t, err, sdkerrors.ErrWrongSequence) +} + +func TestSmartAccountVerifierRejectsInvalidSignature(t *testing.T) { + t.Parallel() + + _, account := newVerifierAccount(t, 5, 8) + sessionPrivateKey := ed25519.GenPrivKey() + identity := bytes.Repeat([]byte{5}, smartaccountstypes.IdentitySize) + keeper := &recordingSmartAccountKeeper{authorized: true} + encoding := newVerifierEncodingConfig(t) + verifier := NewSmartAccountVerifier( + keeper, + verifierAccountKeeper{account: account}, + encoding.TxConfig.SignModeHandler(), + ) + tx := buildSmartAccountVerifierTestTx( + t, + encoding.TxConfig, + account.GetAddress(), + sessionPrivateKey.PubKey(), + identity, + account.GetSequence(), + make([]byte, ed25519.SignatureSize), + ) + + err := verifier.VerifySignatures(newTestSDKContext(t).WithIsSigverifyTx(true), tx, false) + + require.ErrorIs(t, err, sdkerrors.ErrUnauthorized) + require.ErrorContains(t, err, "signature verification failed") +} + +func TestSmartAccountVerifierSkipsCryptoVerificationDuringSimulation(t *testing.T) { + t.Parallel() + + _, account := newVerifierAccount(t, 1, 4) + sessionPrivateKey := ed25519.GenPrivKey() + identity := bytes.Repeat([]byte{6}, smartaccountstypes.IdentitySize) + keeper := &recordingSmartAccountKeeper{authorized: true} + verifier := NewSmartAccountVerifier( + keeper, + verifierAccountKeeper{account: account}, + &txsigning.HandlerMap{}, + ) + tx := newStubSmartAccountTx( + t, + account.GetAddress(), + identity, + sessionPrivateKey.PubKey(), + account.GetSequence(), + ) + + err := verifier.VerifySignatures(newTestSDKContext(t).WithIsSigverifyTx(true), tx, true) + + require.NoError(t, err) +} + +func TestSmartAccountVerifierRejectsInvalidEnvelope(t *testing.T) { + t.Parallel() + + identity := bytes.Repeat([]byte{7}, smartaccountstypes.IdentitySize) + accountAddress := sdk.AccAddress([]byte("smart-account-signer")) + account := authtypes.NewBaseAccount(accountAddress, nil, 1, 4) + sessionPrivateKey := ed25519.GenPrivKey() + keeper := &recordingSmartAccountKeeper{authorized: true} + verifier := NewSmartAccountVerifier( + keeper, + verifierAccountKeeper{account: account}, + &txsigning.HandlerMap{}, + ) + + tests := []struct { + name string + tx sdk.Tx + want error + }{ + { + name: "invalid tx type", + tx: stubBasicTx{}, + want: sdkerrors.ErrTxDecode, + }, + { + name: "unordered tx", + tx: stubSmartAccountTx{stubAuthTx: stubAuthTx{ + unordered: true, + }}, + want: sdkerrors.ErrNotSupported, + }, + { + name: "missing signature", + tx: stubSmartAccountTx{ + stubAuthTx: stubAuthTx{signers: [][]byte{accountAddress}}, + }, + want: sdkerrors.ErrUnauthorized, + }, + { + name: "non ed25519 public key", + tx: newStubSmartAccountTx( + t, + accountAddress, + identity, + secp256k1.GenPrivKey().PubKey(), + account.GetSequence(), + ), + want: sdkerrors.ErrInvalidPubKey, + }, + { + name: "unsupported sign mode", + tx: stubSmartAccountTx{ + stubAuthTx: stubAuthTx{ + signers: [][]byte{accountAddress}, + sigs: []signingtypes.SignatureV2{ + { + PubKey: sessionPrivateKey.PubKey(), + Sequence: account.GetSequence(), + Data: &signingtypes.SingleSignatureData{ + SignMode: signingtypes.SignMode_SIGN_MODE_DIRECT_AUX, + }, + }, + }, + }, + extensionOptions: []*codectypes.Any{ + mustSmartAccountExtensionAny(t, identity), + }, + }, + want: sdkerrors.ErrNotSupported, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + err := verifier.VerifySignatures(newTestSDKContext(t).WithIsSigverifyTx(true), test.tx, false) + require.ErrorIs(t, err, test.want) + }) + } +} + +func TestSmartAccountIdentityFromTx(t *testing.T) { + t.Parallel() + + identity := bytes.Repeat([]byte{8}, smartaccountstypes.IdentitySize) + minaExtension := mustTxAuthModeExtensionAny(t, antetypes.TX_AUTH_MODE_MINA) + + tests := []struct { + name string + tx sdk.Tx + want []byte + wantErr error + }{ + { + name: "valid identity", + tx: stubSmartAccountTx{extensionOptions: []*codectypes.Any{ + mustSmartAccountExtensionAny(t, identity), + }}, + want: identity, + }, + { + name: "tx without extension support", + tx: stubAuthTx{}, + wantErr: sdkerrors.ErrInvalidRequest, + }, + { + name: "missing auth extension", + tx: stubSmartAccountTx{}, + wantErr: sdkerrors.ErrInvalidRequest, + }, + { + name: "wrong auth mode", + tx: stubSmartAccountTx{extensionOptions: []*codectypes.Any{ + minaExtension, + }}, + wantErr: sdkerrors.ErrInvalidRequest, + }, + { + name: "invalid identity length", + tx: stubSmartAccountTx{extensionOptions: []*codectypes.Any{ + mustSmartAccountExtensionAny(t, identity[:len(identity)-1]), + }}, + wantErr: sdkerrors.ErrInvalidRequest, + }, + { + name: "duplicate auth extension", + tx: stubSmartAccountTx{extensionOptions: []*codectypes.Any{ + mustSmartAccountExtensionAny(t, identity), + mustSmartAccountExtensionAny(t, identity), + }}, + wantErr: sdkerrors.ErrInvalidRequest, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + actual, err := smartAccountIdentityFromTx(test.tx) + if test.wantErr != nil { + require.ErrorIs(t, err, test.wantErr) + return + } + + require.NoError(t, err) + require.Equal(t, test.want, actual) + }) + } +} From 0be09f0d65e187a83edb791e4c9d0c908b4e09c7 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 18:45:48 +0300 Subject: [PATCH 27/51] fix: reject session keys with ExpiresAtHeight smaller than currentHeight --- x/smartaccounts/keeper/keeper.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/x/smartaccounts/keeper/keeper.go b/x/smartaccounts/keeper/keeper.go index 2edcd0a8..10e98cb1 100644 --- a/x/smartaccounts/keeper/keeper.go +++ b/x/smartaccounts/keeper/keeper.go @@ -166,6 +166,11 @@ func (k Keeper) AppendSessionKeyToSmartAccount(ctx context.Context, identity, ac return types.ErrInvalidExpirationHeight } + currentHeight := uint64(sdk.UnwrapSDKContext(ctx).BlockHeight()) + if key.ExpiresAtHeight <= currentHeight { + return types.ErrInvalidExpirationHeight + } + if len(accountAddress) == 0 { return types.ErrNilAccountAddress } From 73e7e96b5f8ad238321963ca7d5e23c3593c38ab Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 18:46:19 +0300 Subject: [PATCH 28/51] fix: return TxAuthModeCosmos for unspecified tx auth mode --- app/ante/tx_mode.go | 3 ++- app/ante/tx_mode_test.go | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/ante/tx_mode.go b/app/ante/tx_mode.go index c630c175..ee1beab8 100644 --- a/app/ante/tx_mode.go +++ b/app/ante/tx_mode.go @@ -108,7 +108,8 @@ func ResolveTxAuthMode(tx sdk.Tx) (TxAuthMode, error) { } switch found.TxAuthMode { - case antetypes.TX_AUTH_MODE_COSMOS: + case antetypes.TX_AUTH_MODE_UNSPECIFIED, + antetypes.TX_AUTH_MODE_COSMOS: return TxAuthModeCosmos, nil case antetypes.TX_AUTH_MODE_MINA: return TxAuthModeMina, nil diff --git a/app/ante/tx_mode_test.go b/app/ante/tx_mode_test.go index 0709a83d..70a0fcf0 100644 --- a/app/ante/tx_mode_test.go +++ b/app/ante/tx_mode_test.go @@ -50,6 +50,19 @@ func TestResolveTxAuthModeDefaultsToCosmos(t *testing.T) { require.Equal(t, TxAuthModeCosmos, mode) } +func TestResolveTxAuthModeTreatsUnspecifiedAsCosmos(t *testing.T) { + t.Parallel() + + mode, err := ResolveTxAuthMode(stubExtensionTx{ + extensionOptions: []*codectypes.Any{ + mustTxAuthModeExtensionAny(t, antetypes.TX_AUTH_MODE_UNSPECIFIED), + }, + }) + + require.NoError(t, err) + require.Equal(t, TxAuthModeCosmos, mode) +} + func TestResolveTxAuthModeReadsSmartAccountExtension(t *testing.T) { t.Parallel() From 9db43bc972de81d6024b55bfe2b61d73cb75f458 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 18:56:24 +0300 Subject: [PATCH 29/51] chore: add comment lines to define certain structs and interfaces --- proto/pulsarchain/smartaccounts/v1/types.proto | 2 ++ x/smartaccounts/keeper/keeper.go | 3 +++ x/smartaccounts/types/expected_keepers.go | 1 + x/smartaccounts/types/types.pb.go | 2 ++ 4 files changed, 8 insertions(+) diff --git a/proto/pulsarchain/smartaccounts/v1/types.proto b/proto/pulsarchain/smartaccounts/v1/types.proto index d6bd263d..82fab9b0 100644 --- a/proto/pulsarchain/smartaccounts/v1/types.proto +++ b/proto/pulsarchain/smartaccounts/v1/types.proto @@ -6,11 +6,13 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/node101-io/pulsar-chain/x/smartaccounts/types"; +// SmartAccount binds a Cosmos account address to its authorized session keys. message SmartAccount { bytes account_address = 1; repeated SessionKey session_keys = 2 [(gogoproto.nullable) = false]; } +// SessionKey defines an Ed25519 public key and its exclusive expiration height. message SessionKey { bytes public_key = 1; uint64 expires_at_height = 2; diff --git a/x/smartaccounts/keeper/keeper.go b/x/smartaccounts/keeper/keeper.go index 10e98cb1..b3a306dd 100644 --- a/x/smartaccounts/keeper/keeper.go +++ b/x/smartaccounts/keeper/keeper.go @@ -14,6 +14,7 @@ import ( "github.com/node101-io/pulsar-chain/x/smartaccounts/types" ) +// SmartAccountsMapName is the collections schema name for smart-account state. const SmartAccountsMapName = "smart_accounts_map" type Keeper struct { @@ -77,6 +78,7 @@ func (k Keeper) GetAuthority() []byte { return k.authority } +// HasSmartAccount reports whether smart-account state exists for identity. func (k Keeper) HasSmartAccount(ctx context.Context, identity []byte) (bool, error) { if identity == nil { @@ -140,6 +142,7 @@ func (k Keeper) IsSessionKeyAuthorized(ctx context.Context, identity, accountAdd return false, nil } +// AppendSessionKeyToSmartAccount adds an active session key to the smart account identified by identity. func (k Keeper) AppendSessionKeyToSmartAccount(ctx context.Context, identity, accountAddress []byte, key types.SessionKey) error { if identity == nil { diff --git a/x/smartaccounts/types/expected_keepers.go b/x/smartaccounts/types/expected_keepers.go index 4c125c64..b8429018 100644 --- a/x/smartaccounts/types/expected_keepers.go +++ b/x/smartaccounts/types/expected_keepers.go @@ -28,6 +28,7 @@ type ParamSubspace interface { Set(context.Context, []byte, interface{}) } +// VerificationKeeper defines the proof-result lookup required by smartaccounts. type VerificationKeeper interface { FinalProofResultByProofHash(ctx context.Context, proofHash []byte) (verificationtypes.FinalProofResult, error) } diff --git a/x/smartaccounts/types/types.pb.go b/x/smartaccounts/types/types.pb.go index 8ab934b7..d964a1df 100644 --- a/x/smartaccounts/types/types.pb.go +++ b/x/smartaccounts/types/types.pb.go @@ -24,6 +24,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// SmartAccount binds a Cosmos account address to its authorized session keys. type SmartAccount struct { AccountAddress []byte `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` SessionKeys []SessionKey `protobuf:"bytes,2,rep,name=session_keys,json=sessionKeys,proto3" json:"session_keys"` @@ -76,6 +77,7 @@ func (m *SmartAccount) GetSessionKeys() []SessionKey { return nil } +// SessionKey defines an Ed25519 public key and its exclusive expiration height. type SessionKey struct { PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` ExpiresAtHeight uint64 `protobuf:"varint,2,opt,name=expires_at_height,json=expiresAtHeight,proto3" json:"expires_at_height,omitempty"` From beb89dc96d6f6eb03b239c0871e29831721cebc0 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 18:57:17 +0300 Subject: [PATCH 30/51] test(antehandler): add more tests to smart account verifier for more coverage --- app/ante/mina_verifier_test.go | 7 +- app/ante/routed_siggascost_test.go | 57 +++++++++++ app/ante/routed_validate_sigcount_test.go | 91 ++++++++++++++++++ app/ante/smart_account_verifier.go | 53 ++++++----- app/ante/smart_account_verifier_test.go | 95 ++++++++++++++++++- x/smartaccounts/keeper/smart_accounts_test.go | 37 +++++++- 6 files changed, 306 insertions(+), 34 deletions(-) diff --git a/app/ante/mina_verifier_test.go b/app/ante/mina_verifier_test.go index 6678108e..dafb4e2e 100644 --- a/app/ante/mina_verifier_test.go +++ b/app/ante/mina_verifier_test.go @@ -78,8 +78,9 @@ func TestResolveAuroFieldSignatureNetworkID(t *testing.T) { } type verifierAccountKeeper struct { - account sdk.AccountI - params authtypes.Params + account sdk.AccountI + params authtypes.Params + moduleAddress sdk.AccAddress } func (k verifierAccountKeeper) GetParams(context.Context) authtypes.Params { @@ -96,7 +97,7 @@ func (k verifierAccountKeeper) GetAccount(context.Context, sdk.AccAddress) sdk.A func (k verifierAccountKeeper) SetAccount(context.Context, sdk.AccountI) {} -func (k verifierAccountKeeper) GetModuleAddress(string) sdk.AccAddress { return nil } +func (k verifierAccountKeeper) GetModuleAddress(string) sdk.AccAddress { return k.moduleAddress } func (k verifierAccountKeeper) AddressCodec() address.Codec { return nil } diff --git a/app/ante/routed_siggascost_test.go b/app/ante/routed_siggascost_test.go index 082480bc..6608510f 100644 --- a/app/ante/routed_siggascost_test.go +++ b/app/ante/routed_siggascost_test.go @@ -226,3 +226,60 @@ func TestRoutedSigGasConsumeDecoratorStopsGasAccountingAtFirstInvalidSignature(t // The second signature is invalid, so only the first one should have consumed verification gas. require.Equal(t, uint64(params.SigVerifyCostSecp256k1), ctx.GasMeter().GasConsumed()-before) } + +func TestRoutedSigGasConsumeDecoratorConsumesEd25519GasForSmartAccount(t *testing.T) { + t.Parallel() + + ctx := setTxAuthMode(newGasMeteredContext(t), TxAuthModeSmartAccount) + params := authtypes.DefaultParams() + params.SigVerifyCostED25519 = 43 + before := ctx.GasMeter().GasConsumed() + nextCalled := false + + _, err := NewRoutedSigGasConsumeDecorator( + validateSigCountAccountKeeper{params: params}, + &recordingDecorator{}, + ).AnteHandle( + ctx, + stubSigVerifiableTx{ + sigs: []signingtypes.SignatureV2{ + {Data: &signingtypes.SingleSignatureData{}}, + }, + }, + false, + func(nextCtx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { + nextCalled = true + return nextCtx, nil + }, + ) + + require.NoError(t, err) + require.True(t, nextCalled) + require.Equal(t, uint64(params.SigVerifyCostED25519), ctx.GasMeter().GasConsumed()-before) +} + +func TestRoutedSigGasConsumeDecoratorRejectsSmartAccountMultisig(t *testing.T) { + t.Parallel() + + ctx := setTxAuthMode(newGasMeteredContext(t), TxAuthModeSmartAccount) + + _, err := NewRoutedSigGasConsumeDecorator( + validateSigCountAccountKeeper{}, + &recordingDecorator{}, + ).AnteHandle( + ctx, + stubSigVerifiableTx{ + sigs: []signingtypes.SignatureV2{ + {Data: &signingtypes.MultiSignatureData{}}, + }, + }, + false, + func(nextCtx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { + t.Fatal("next handler should not be called for smart-account multisig") + return nextCtx, nil + }, + ) + + require.ErrorIs(t, err, sdkerrors.ErrInvalidType) + require.Zero(t, ctx.GasMeter().GasConsumed()) +} diff --git a/app/ante/routed_validate_sigcount_test.go b/app/ante/routed_validate_sigcount_test.go index 3997cc0a..70f3f27a 100644 --- a/app/ante/routed_validate_sigcount_test.go +++ b/app/ante/routed_validate_sigcount_test.go @@ -241,3 +241,94 @@ func TestRoutedValidateSigCountDecoratorRejectsSignatureCountAboveLimit(t *testi require.ErrorIs(t, err, sdkerrors.ErrTooManySignatures) require.ErrorContains(t, err, "signatures: 2, limit: 1") } + +func TestRoutedValidateSigCountDecoratorAllowsSingleSmartAccountSignature(t *testing.T) { + t.Parallel() + + ctx := setTxAuthMode(newTestSDKContext(t), TxAuthModeSmartAccount) + nextCalled := false + + _, err := NewRoutedValidateSigCountDecorator( + validateSigCountAccountKeeper{}, + &recordingDecorator{}, + ).AnteHandle( + ctx, + stubSigVerifiableTx{ + sigs: []signingtypes.SignatureV2{ + {Data: &signingtypes.SingleSignatureData{}}, + }, + }, + false, + func(nextCtx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { + nextCalled = true + return nextCtx, nil + }, + ) + + require.NoError(t, err) + require.True(t, nextCalled) +} + +func TestRoutedValidateSigCountDecoratorRejectsInvalidSmartAccountSignatureCount(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + signatures []signingtypes.SignatureV2 + }{ + {name: "missing signature"}, + { + name: "multiple signatures", + signatures: []signingtypes.SignatureV2{ + {Data: &signingtypes.SingleSignatureData{}}, + {Data: &signingtypes.SingleSignatureData{}}, + }, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + ctx := setTxAuthMode(newTestSDKContext(t), TxAuthModeSmartAccount) + + _, err := NewRoutedValidateSigCountDecorator( + validateSigCountAccountKeeper{}, + &recordingDecorator{}, + ).AnteHandle( + ctx, + stubSigVerifiableTx{sigs: test.signatures}, + false, + func(nextCtx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { + t.Fatal("next handler should not be called for an invalid signature count") + return nextCtx, nil + }, + ) + + require.ErrorIs(t, err, sdkerrors.ErrUnauthorized) + }) + } +} + +func TestRoutedValidateSigCountDecoratorRejectsSmartAccountMultisig(t *testing.T) { + t.Parallel() + + ctx := setTxAuthMode(newTestSDKContext(t), TxAuthModeSmartAccount) + + _, err := NewRoutedValidateSigCountDecorator( + validateSigCountAccountKeeper{}, + &recordingDecorator{}, + ).AnteHandle( + ctx, + stubSigVerifiableTx{ + sigs: []signingtypes.SignatureV2{ + {Data: &signingtypes.MultiSignatureData{}}, + }, + }, + false, + func(nextCtx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { + t.Fatal("next handler should not be called for smart-account multisig") + return nextCtx, nil + }, + ) + + require.ErrorIs(t, err, sdkerrors.ErrInvalidType) +} diff --git a/app/ante/smart_account_verifier.go b/app/ante/smart_account_verifier.go index 795a9e37..1e60840a 100644 --- a/app/ante/smart_account_verifier.go +++ b/app/ante/smart_account_verifier.go @@ -84,14 +84,6 @@ func (v SmartAccountVerifier) VerifySignatures( signature := signatures[0] - sessionPublicKey, ok := signature.PubKey.(*ed25519.PubKey) - if !ok { - return errorsmod.Wrap( - sdkerrors.ErrInvalidPubKey, - "smart-account transactions require an Ed25519 session public key", - ) - } - signatureData, ok := signature.Data.(*signing.SingleSignatureData) if !ok { return errorsmod.Wrap( @@ -114,42 +106,53 @@ func (v SmartAccountVerifier) VerifySignatures( } accountAddress := signers[0] - - authorized, err := v.smartAccountsKeeper.IsSessionKeyAuthorized( + account, err := authante.GetSignerAcc( ctx, - identity, + v.accountKeeper, accountAddress, - sessionPublicKey.Bytes(), ) if err != nil { return err } - if !authorized { + + if signature.Sequence != account.GetSequence() { + return errorsmod.Wrapf( + sdkerrors.ErrWrongSequence, + "account sequence mismatch, expected %d, got %d", + account.GetSequence(), + signature.Sequence, + ) + } + + if simulate { + return nil + } + + sessionPublicKey, ok := signature.PubKey.(*ed25519.PubKey) + if !ok { return errorsmod.Wrap( - sdkerrors.ErrUnauthorized, - "session public key is not authorized for smart account", + sdkerrors.ErrInvalidPubKey, + "smart-account transactions require an Ed25519 session public key", ) } - account, err := authante.GetSignerAcc( + authorized, err := v.smartAccountsKeeper.IsSessionKeyAuthorized( ctx, - v.accountKeeper, + identity, accountAddress, + sessionPublicKey.Bytes(), ) if err != nil { return err } - - if signature.Sequence != account.GetSequence() { - return errorsmod.Wrapf( - sdkerrors.ErrWrongSequence, - "account sequence mismatch, expected %d, got %d", - account.GetSequence(), - signature.Sequence, + if !authorized { + return errorsmod.Wrap( + sdkerrors.ErrUnauthorized, + "session public key is not authorized for smart account", ) } - if simulate || ctx.IsReCheckTx() || !ctx.IsSigverifyTx() { + if ctx.IsReCheckTx() || !ctx.IsSigverifyTx() { return nil } diff --git a/app/ante/smart_account_verifier_test.go b/app/ante/smart_account_verifier_test.go index 9a2a3f41..2c1bc078 100644 --- a/app/ante/smart_account_verifier_test.go +++ b/app/ante/smart_account_verifier_test.go @@ -6,6 +6,7 @@ import ( "errors" "testing" + "cosmossdk.io/log" txsigning "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/client" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -15,12 +16,14 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" + authante "github.com/cosmos/cosmos-sdk/x/auth/ante" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" gogoproto "github.com/cosmos/gogoproto/proto" "github.com/stretchr/testify/require" antetypes "github.com/node101-io/pulsar-chain/app/ante/types" + keyregistrykeeper "github.com/node101-io/pulsar-chain/x/keyregistry/keeper" smartaccountstypes "github.com/node101-io/pulsar-chain/x/smartaccounts/types" ) @@ -33,6 +36,30 @@ type recordingSmartAccountKeeper struct { publicKey []byte } +type smartAccountVerifierBankKeeper struct{} + +func (smartAccountVerifierBankKeeper) IsSendEnabledCoins(context.Context, ...sdk.Coin) error { + return nil +} + +func (smartAccountVerifierBankKeeper) SendCoins( + context.Context, + sdk.AccAddress, + sdk.AccAddress, + sdk.Coins, +) error { + return nil +} + +func (smartAccountVerifierBankKeeper) SendCoinsFromAccountToModule( + context.Context, + sdk.AccAddress, + string, + sdk.Coins, +) error { + return nil +} + func (k *recordingSmartAccountKeeper) IsSessionKeyAuthorized( _ context.Context, identity, accountAddress, publicKey []byte, @@ -194,6 +221,68 @@ func TestSmartAccountVerifierAcceptsValidSignature(t *testing.T) { require.Equal(t, sessionPrivateKey.PubKey().Bytes(), keeper.publicKey) } +func TestAnteHandlerAcceptsSmartAccountTransaction(t *testing.T) { + t.Parallel() + + _, account := newVerifierAccount(t, 9, 12) + sessionPrivateKey := ed25519.GenPrivKey() + identity := bytes.Repeat([]byte{9}, smartaccountstypes.IdentitySize) + smartAccountKeeper := &recordingSmartAccountKeeper{authorized: true} + encoding := newVerifierEncodingConfig(t) + ctx := newTestSDKContext(t).WithIsSigverifyTx(true) + + unsignedTx := buildSmartAccountVerifierTestTx( + t, + encoding.TxConfig, + account.GetAddress(), + sessionPrivateKey.PubKey(), + identity, + account.GetSequence(), + nil, + ) + signBytes := buildVerifierSignBytes( + t, + ctx, + encoding.TxConfig, + unsignedTx, + account, + account.GetSequence(), + signingtypes.SignMode_SIGN_MODE_DIRECT, + ) + signature, err := sessionPrivateKey.Sign(signBytes) + require.NoError(t, err) + + signedTx := buildSmartAccountVerifierTestTx( + t, + encoding.TxConfig, + account.GetAddress(), + sessionPrivateKey.PubKey(), + identity, + account.GetSequence(), + signature, + ) + anteHandler, err := NewAnteHandler(HandlerOptions{ + AccountKeeper: verifierAccountKeeper{ + account: account, + moduleAddress: sdk.AccAddress([]byte("fee-collector-address")), + }, + BankKeeper: smartAccountVerifierBankKeeper{}, + SignModeHandler: encoding.TxConfig.SignModeHandler(), + SigGasConsumer: authante.DefaultSigVerificationGasConsumer, + KeyregistryKeeper: &keyregistrykeeper.Keeper{}, + SmartAccountKeeper: smartAccountKeeper, + MinaNetworkID: DefaultMinaNetworkID, + Logger: log.NewNopLogger(), + }) + require.NoError(t, err) + + _, err = anteHandler(ctx, signedTx, false) + + require.NoError(t, err) + require.Equal(t, 1, smartAccountKeeper.calls) + require.Equal(t, uint64(13), account.GetSequence()) +} + func TestSmartAccountVerifierRejectsUnauthorizedSessionKey(t *testing.T) { t.Parallel() @@ -304,9 +393,8 @@ func TestSmartAccountVerifierSkipsCryptoVerificationDuringSimulation(t *testing. t.Parallel() _, account := newVerifierAccount(t, 1, 4) - sessionPrivateKey := ed25519.GenPrivKey() identity := bytes.Repeat([]byte{6}, smartaccountstypes.IdentitySize) - keeper := &recordingSmartAccountKeeper{authorized: true} + keeper := &recordingSmartAccountKeeper{} verifier := NewSmartAccountVerifier( keeper, verifierAccountKeeper{account: account}, @@ -316,13 +404,14 @@ func TestSmartAccountVerifierSkipsCryptoVerificationDuringSimulation(t *testing. t, account.GetAddress(), identity, - sessionPrivateKey.PubKey(), + secp256k1.GenPrivKey().PubKey(), account.GetSequence(), ) err := verifier.VerifySignatures(newTestSDKContext(t).WithIsSigverifyTx(true), tx, true) require.NoError(t, err) + require.Zero(t, keeper.calls) } func TestSmartAccountVerifierRejectsInvalidEnvelope(t *testing.T) { diff --git a/x/smartaccounts/keeper/smart_accounts_test.go b/x/smartaccounts/keeper/smart_accounts_test.go index ee4400ca..ba3c4a9e 100644 --- a/x/smartaccounts/keeper/smart_accounts_test.go +++ b/x/smartaccounts/keeper/smart_accounts_test.go @@ -57,12 +57,43 @@ func TestAppendSessionKeyPrunesExpiredKeys(t *testing.T) { } require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, accountAddress, activeKey)) - // The first key can be appended again because the previous copy was pruned. - require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, accountAddress, expiringKey)) - genesis, err := f.keeper.ExportGenesis(f.ctx) require.NoError(t, err) + require.Len(t, genesis.SmartAccounts, 1) require.Equal(t, accountAddress, genesis.SmartAccounts[0].Account.AccountAddress) + require.Equal(t, []types.SessionKey{activeKey}, genesis.SmartAccounts[0].Account.SessionKeys) +} + +func TestIsSessionKeyAuthorized(t *testing.T) { + f := initFixture(t) + identity := bytes.Repeat([]byte{0x01}, types.IdentitySize) + unknownIdentity := bytes.Repeat([]byte{0x02}, types.IdentitySize) + accountAddress := f.keeper.GetAuthority() + publicKey := bytes.Repeat([]byte{0x03}, types.SessionPublicKeySize) + key := types.SessionKey{ + PublicKey: publicKey, + ExpiresAtHeight: 3, + } + + f.ctx = sdk.UnwrapSDKContext(f.ctx).WithBlockHeight(1) + require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount(f.ctx, identity, accountAddress, key)) + + authorized, err := f.keeper.IsSessionKeyAuthorized(f.ctx, identity, accountAddress, publicKey) + require.NoError(t, err) + require.True(t, authorized) + + authorized, err = f.keeper.IsSessionKeyAuthorized(f.ctx, unknownIdentity, accountAddress, publicKey) + require.NoError(t, err) + require.False(t, authorized) + + otherAddress := bytes.Repeat([]byte{0x09}, 20) + _, err = f.keeper.IsSessionKeyAuthorized(f.ctx, identity, otherAddress, publicKey) + require.ErrorIs(t, err, types.ErrAccountAddressMismatch) + + f.ctx = sdk.UnwrapSDKContext(f.ctx).WithBlockHeight(3) + authorized, err = f.keeper.IsSessionKeyAuthorized(f.ctx, identity, accountAddress, publicKey) + require.NoError(t, err) + require.False(t, authorized) } func TestAppendSessionKeyRejectsDifferentAccountAddress(t *testing.T) { From 64119294eaecfbc8da34b1f53b8b7eb2de82e058 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 19:35:34 +0300 Subject: [PATCH 31/51] fix: update script to read verification key hash --- scripts/deploy_local_lightnet.sh | 3 + scripts/docker_testnet.sh | 9 +- scripts/render_docker_testnet.py | 1 + scripts/setup_local_testnet.sh | 37 ++++++ scripts/setup_local_testnet_helper.py | 134 +++++++++++++++++++++ scripts/test_render_docker_testnet.py | 6 + scripts/test_setup_local_testnet_helper.py | 88 ++++++++++++++ 7 files changed, 273 insertions(+), 5 deletions(-) diff --git a/scripts/deploy_local_lightnet.sh b/scripts/deploy_local_lightnet.sh index 5984310d..1e123ba7 100755 --- a/scripts/deploy_local_lightnet.sh +++ b/scripts/deploy_local_lightnet.sh @@ -69,6 +69,9 @@ Optional environment variables: BRIDGE_CONFIRMATION_DEPTH local bridge confirmation depth (default: 3) BRIDGE_START_BLOCK_HEIGHT local bridge start height (default: 1) BRIDGE_MAX_BLOCK_RANGE local bridge query range (default: 1000) + SMART_ACCOUNTS_VERIFICATION_KEY_HASH + 32-byte smartaccounts verification-key hash in hex + or base64 (default: value from config.yml) Default Mina Lightnet image: o1labs/mina-local-network@sha256:33e349241f5f3e8d336e5de9b35de2d4339fd8713b309e2b1b5fc375c2605b58 diff --git a/scripts/docker_testnet.sh b/scripts/docker_testnet.sh index 72e17183..cd9757fa 100755 --- a/scripts/docker_testnet.sh +++ b/scripts/docker_testnet.sh @@ -200,12 +200,11 @@ run_compose() { docker compose --project-name "$PROJECT_NAME" -f "$COMPOSE_FILE" "$@" } -declare -a VALIDATOR_SERVICES=() -declare -a VERIFIER_SERVICES=() +declare -a START_SERVICES=() for ((i = 1; i <= VALIDATOR_COUNT; i++)); do - VALIDATOR_SERVICES+=("validator${i}") + START_SERVICES+=("validator${i}") if [[ -n "${PULSAR_VERIFIER_IMAGE:-}" ]]; then - VERIFIER_SERVICES+=("verifier${i}") + START_SERVICES+=("verifier${i}") fi done @@ -226,7 +225,7 @@ case "$COMMAND" in fi if ! run_compose up --no-build -d --wait \ --wait-timeout "$VALIDATOR_STARTUP_TIMEOUT" \ - "${VALIDATOR_SERVICES[@]}" "${VERIFIER_SERVICES[@]}"; then + "${START_SERVICES[@]}"; then cleanup_partial_environment exit 1 fi diff --git a/scripts/render_docker_testnet.py b/scripts/render_docker_testnet.py index 40253235..00b96913 100755 --- a/scripts/render_docker_testnet.py +++ b/scripts/render_docker_testnet.py @@ -175,6 +175,7 @@ def render_compose(args: argparse.Namespace) -> dict: "MAX_BLOCK_RANGE": "${BRIDGE_MAX_BLOCK_RANGE:-}", "E2E_USER_MINA_PRIV_KEY": "${E2E_USER_MINA_PRIV_KEY:-}", "MIN_GAS_PRICE": "${E2E_MIN_GAS_PRICE:-}", + "SMART_ACCOUNTS_VERIFICATION_KEY_HASH": "${SMART_ACCOUNTS_VERIFICATION_KEY_HASH:-}", "ENABLE_VERIFIER_SIDECARS": "1" if args.verifier_image else "0", } ) diff --git a/scripts/setup_local_testnet.sh b/scripts/setup_local_testnet.sh index 3658054c..91cdfab9 100755 --- a/scripts/setup_local_testnet.sh +++ b/scripts/setup_local_testnet.sh @@ -130,6 +130,10 @@ read_bridge_genesis_param() { python3 "$PYTHON_HELPER" read-bridge-genesis-param --config "$1" --key "$2" } +read_smartaccounts_verification_key_hash() { + python3 "$PYTHON_HELPER" read-smartaccounts-verification-key-hash --config "$1" +} + generate_default_mina_priv_key() { python3 "$PYTHON_HELPER" generate-default-mina-priv-key --index "$1" } @@ -204,6 +208,25 @@ resolve_default_bridge_param() { printf '%s\n' "$fallback" } +resolve_smartaccounts_verification_key_hash() { + if [[ -n "${SMART_ACCOUNTS_VERIFICATION_KEY_HASH:-}" ]]; then + printf '%s\n' "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" + return + fi + + if [[ -f "$CHAIN_CONFIG_PATH" ]]; then + local config_value + config_value="$(read_smartaccounts_verification_key_hash "$CHAIN_CONFIG_PATH")" + if [[ -n "$config_value" ]]; then + printf '%s\n' "$config_value" + return + fi + fi + + echo "smartaccounts verification key hash is required; set SMART_ACCOUNTS_VERIFICATION_KEY_HASH or genesis.app_state.smartaccounts.params.verification_key_hash in $CHAIN_CONFIG_PATH" >&2 + return 1 +} + validate_mina_network_id() { local index="$1" local mina_network_id="$2" @@ -506,6 +529,7 @@ BRIDGE_CONTRACT_ADDRESS="$(resolve_default_bridge_param "CONTRACT_ADDRESS" "cont BRIDGE_START_BLOCK_HEIGHT="$(resolve_default_bridge_param "START_BLOCK_HEIGHT" "start_block_height" "1")" BRIDGE_MAX_BLOCK_RANGE="$(resolve_default_bridge_param "MAX_BLOCK_RANGE" "max_block_range" "1000")" BRIDGE_ACTIONS_REDUCED_ROOT_SNAPSHOT_WINDOW_SIZE="$(resolve_default_bridge_param "ACTIONS_REDUCED_ROOT_SNAPSHOT_WINDOW_SIZE" "actions_reduced_root_snapshot_window_size" "4")" +SMART_ACCOUNTS_VERIFICATION_KEY_HASH="$(resolve_smartaccounts_verification_key_hash)" validate_positive_int "confirmation depth" "$BRIDGE_CONFIRMATION_DEPTH" validate_non_empty "contract address" "$BRIDGE_CONTRACT_ADDRESS" @@ -631,6 +655,19 @@ python3 "$PYTHON_HELPER" patch-bridge-genesis \ --max-block-range "$BRIDGE_MAX_BLOCK_RANGE" \ --actions-reduced-root-snapshot-window-size "$BRIDGE_ACTIONS_REDUCED_ROOT_SNAPSHOT_WINDOW_SIZE" +echo "==> Setting smartaccounts genesis params..." +python3 "$PYTHON_HELPER" patch-smartaccounts-genesis \ + --genesis "$PRIMARY_GENESIS_FILE" \ + --verification-key-hash "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" + +LOCAL_SMART_ACCOUNT_FIXTURE="$PRIMARY_HOME/config/local-smart-account-fixture.json" +"$DEVTOOLS_BINARY_PATH" smart-account-fixture \ + --verification-key-hash "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" \ + >"$LOCAL_SMART_ACCOUNT_FIXTURE" +python3 "$PYTHON_HELPER" patch-local-smartaccount-proof-fixture \ + --genesis "$PRIMARY_GENESIS_FILE" \ + --fixture "$LOCAL_SMART_ACCOUNT_FIXTURE" + echo "==> Creating validator keys..." for ((i = 1; i <= VALIDATOR_COUNT; i++)); do "$BINARY_PATH" keys add "${NODE_KEY_NAMES[i]}" --home "${NODE_HOMES[i]}" --keyring-backend "$KEYRING_BACKEND" >/dev/null 2>&1 diff --git a/scripts/setup_local_testnet_helper.py b/scripts/setup_local_testnet_helper.py index f9ab7c01..e5b1bbb6 100644 --- a/scripts/setup_local_testnet_helper.py +++ b/scripts/setup_local_testnet_helper.py @@ -284,6 +284,21 @@ def read_bridge_genesis_param(config_path: str, key_name: str) -> int: return 0 +def read_smartaccounts_verification_key_hash(config_path: str) -> int: + value = read_config_path_value( + config_path, + [ + "genesis", + "app_state", + "smartaccounts", + "params", + "verification_key_hash", + ], + ) + print(value or "") + return 0 + + def read_mina_network_id(config_path: str) -> int: content = read_text(config_path) print( @@ -766,6 +781,98 @@ def patch_bridge_genesis( return 0 +def patch_smartaccounts_genesis( + genesis_path: str, + verification_key_hash: str, +) -> int: + encoded_hash = verification_key_hash.strip() + hex_hash = encoded_hash[2:] if encoded_hash.startswith("0x") else encoded_hash + + if re.fullmatch(r"[0-9a-fA-F]{64}", hex_hash): + hash_bytes = bytes.fromhex(hex_hash) + else: + try: + hash_bytes = base64.b64decode(encoded_hash, validate=True) + except ValueError as exc: + raise SystemExit( + "smartaccounts verification key hash must be valid hex or base64" + ) from exc + + if len(hash_bytes) != 32: + raise SystemExit( + "smartaccounts verification key hash must be 32 bytes: " + f"got {len(hash_bytes)}" + ) + + genesis = read_json(genesis_path) + smartaccounts = genesis.setdefault("app_state", {}).setdefault( + "smartaccounts", {} + ) + smartaccounts["params"] = { + "verification_key_hash": base64.b64encode(hash_bytes).decode("ascii") + } + smartaccounts.setdefault("smart_accounts", []) + + write_json(genesis_path, genesis) + return 0 + + +def patch_local_smartaccount_proof_fixture( + genesis_path: str, + fixture_path: str, +) -> int: + fixture = read_json(fixture_path) + required_fields = ( + "proof_hash_base64", + "public_inputs_hash_base64", + "verification_key_hash_base64", + "verification_id_base64", + ) + for field in required_fields: + try: + value = base64.b64decode(fixture[field], validate=True) + except (KeyError, ValueError) as exc: + raise SystemExit(f"invalid local smart-account fixture field: {field}") from exc + if len(value) != 32: + raise SystemExit(f"local smart-account fixture field {field} must be 32 bytes") + + proof_key = {"submission_height": "1", "index_in_block": 0} + genesis = read_json(genesis_path) + verification = genesis.setdefault("app_state", {}).setdefault( + "verification", {} + ) + verification["seen_verification_ids"] = [ + { + "verification_id": fixture["verification_id_base64"], + "proof_key": proof_key, + } + ] + verification["final_proof_results"] = [ + { + "proof_key": proof_key, + "result": { + "proof_hash": fixture["proof_hash_base64"], + "proof_type": "PROOF_TYPE_MINA_PICKLES", + "status": "PROOF_STATUS_VALID", + "valid_voting_power": "1", + "invalid_voting_power": "0", + "total_voting_power": "1", + "voting_power_threshold": "1", + "submission_height": "1", + "finalized_height": "6", + "public_inputs_hash": fixture["public_inputs_hash_base64"], + "verification_key_hash": fixture[ + "verification_key_hash_base64" + ], + "verification_id": fixture["verification_id_base64"], + }, + } + ] + + write_json(genesis_path, genesis) + return 0 + + def upsert_toml_key( app_toml: str, table_name: str, @@ -919,6 +1026,11 @@ def build_parser() -> argparse.ArgumentParser: read_bridge_param_cmd.add_argument("--config", required=True) read_bridge_param_cmd.add_argument("--key", required=True) + read_smartaccounts_hash = subparsers.add_parser( + "read-smartaccounts-verification-key-hash" + ) + read_smartaccounts_hash.add_argument("--config", required=True) + read_gas_price = subparsers.add_parser("read-min-gas-price") read_gas_price.add_argument("--app", required=True) @@ -975,6 +1087,16 @@ def build_parser() -> argparse.ArgumentParser: "--actions-reduced-root-snapshot-window-size", required=True ) + patch_smartaccounts = subparsers.add_parser("patch-smartaccounts-genesis") + patch_smartaccounts.add_argument("--genesis", required=True) + patch_smartaccounts.add_argument("--verification-key-hash", required=True) + + patch_local_smartaccount = subparsers.add_parser( + "patch-local-smartaccount-proof-fixture" + ) + patch_local_smartaccount.add_argument("--genesis", required=True) + patch_local_smartaccount.add_argument("--fixture", required=True) + verify_registry = subparsers.add_parser("verify-validator-key-pairs") verify_registry.add_argument("--genesis", required=True) verify_registry.add_argument("--cosmos-key", action="append", required=True) @@ -1016,6 +1138,8 @@ def main() -> int: return read_app_toml_string(args.app, "bridge", args.key) if args.command == "read-bridge-genesis-param": return read_bridge_genesis_param(args.config, args.key) + if args.command == "read-smartaccounts-verification-key-hash": + return read_smartaccounts_verification_key_hash(args.config) if args.command == "read-mina-network-id": return read_mina_network_id(args.config) if args.command == "read-min-gas-price": @@ -1062,6 +1186,16 @@ def main() -> int: args.max_block_range, args.actions_reduced_root_snapshot_window_size, ) + if args.command == "patch-smartaccounts-genesis": + return patch_smartaccounts_genesis( + args.genesis, + args.verification_key_hash, + ) + if args.command == "patch-local-smartaccount-proof-fixture": + return patch_local_smartaccount_proof_fixture( + args.genesis, + args.fixture, + ) if args.command == "verify-validator-key-pairs": return verify_validator_key_pairs(args.genesis, args.cosmos_key) if args.command == "check-validator-status": diff --git a/scripts/test_render_docker_testnet.py b/scripts/test_render_docker_testnet.py index 11095cc7..e680cb9d 100644 --- a/scripts/test_render_docker_testnet.py +++ b/scripts/test_render_docker_testnet.py @@ -54,6 +54,12 @@ def test_shared_topology_has_one_wrapper_and_one_data_volume(self): "${POSTGRES_URI:-}", compose["services"]["archive-wrapper"]["environment"]["POSTGRES_URI"], ) + self.assertEqual( + "${SMART_ACCOUNTS_VERIFICATION_KEY_HASH:-}", + compose["services"]["setup"]["environment"][ + "SMART_ACCOUNTS_VERIFICATION_KEY_HASH" + ], + ) for index in range(1, 4): self.assertEqual( diff --git a/scripts/test_setup_local_testnet_helper.py b/scripts/test_setup_local_testnet_helper.py index 2946ac63..fd25a329 100644 --- a/scripts/test_setup_local_testnet_helper.py +++ b/scripts/test_setup_local_testnet_helper.py @@ -1,5 +1,8 @@ #!/usr/bin/env python3 +import base64 +import contextlib +import io import json import subprocess import sys @@ -437,6 +440,91 @@ def test_patch_bridge_genesis_sets_initial_bridge_state_fields(self): bridge["bridge_state"], ) + def test_patch_smartaccounts_genesis_sets_verification_key_hash(self): + genesis = self.write_temp("genesis.json", json.dumps({"app_state": {}})) + verification_key_hash = bytes(range(32)) + + self.assertEqual( + 0, + helper.patch_smartaccounts_genesis( + str(genesis), + base64.b64encode(verification_key_hash).decode("ascii"), + ), + ) + + payload = json.loads(genesis.read_text(encoding="utf-8")) + smartaccounts = payload["app_state"]["smartaccounts"] + self.assertEqual( + base64.b64encode(verification_key_hash).decode("ascii"), + smartaccounts["params"]["verification_key_hash"], + ) + self.assertEqual([], smartaccounts["smart_accounts"]) + + def test_reads_smartaccounts_verification_key_hash_from_config(self): + expected = "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE=" + config = self.write_temp( + "config.yml", + """genesis: + app_state: + smartaccounts: + params: + verification_key_hash: "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE=" +""", + ) + + output = io.StringIO() + with contextlib.redirect_stdout(output): + self.assertEqual( + 0, + helper.read_smartaccounts_verification_key_hash(str(config)), + ) + self.assertEqual(expected, output.getvalue().strip()) + + def test_patch_smartaccounts_genesis_rejects_invalid_hash(self): + genesis = self.write_temp("genesis.json", json.dumps({"app_state": {}})) + + for value in ("not-hex", "01" * 31, "01" * 33): + with self.subTest(value=value): + with self.assertRaises(SystemExit): + helper.patch_smartaccounts_genesis(str(genesis), value) + + def test_patch_local_smartaccount_proof_fixture(self): + genesis = self.write_temp( + "genesis.json", + json.dumps({"app_state": {"verification": {"params": {}}}}), + ) + encoded = base64.b64encode(bytes(range(32))).decode("ascii") + fixture = self.write_temp( + "fixture.json", + json.dumps( + { + "proof_hash_base64": encoded, + "public_inputs_hash_base64": encoded, + "verification_key_hash_base64": encoded, + "verification_id_base64": encoded, + } + ), + ) + + self.assertEqual( + 0, + helper.patch_local_smartaccount_proof_fixture( + str(genesis), str(fixture) + ), + ) + + verification = json.loads(genesis.read_text(encoding="utf-8"))[ + "app_state" + ]["verification"] + self.assertEqual({}, verification["params"]) + self.assertEqual( + encoded, + verification["seen_verification_ids"][0]["verification_id"], + ) + result = verification["final_proof_results"][0]["result"] + self.assertEqual("PROOF_STATUS_VALID", result["status"]) + self.assertEqual(encoded, result["public_inputs_hash"]) + def test_render_e2e_seed_replaces_exactly_one_placeholder(self): template = self.write_temp( "seed.sql.tmpl", "fee_payer = '__E2E_MINA_PUBLIC_KEY__';\n" From f06a32f86143fad90576dbc6e9a987ed80dd081c Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 22:29:11 +0300 Subject: [PATCH 32/51] fix: update script to simplify the genesis params read flow --- scripts/setup_local_testnet.sh | 61 ++++------ scripts/setup_local_testnet_helper.py | 126 +++++++++++---------- scripts/test_setup_local_testnet_helper.py | 54 +++++---- 3 files changed, 119 insertions(+), 122 deletions(-) diff --git a/scripts/setup_local_testnet.sh b/scripts/setup_local_testnet.sh index 91cdfab9..1b0bab17 100755 --- a/scripts/setup_local_testnet.sh +++ b/scripts/setup_local_testnet.sh @@ -126,12 +126,11 @@ read_app_wrapper_config() { python3 "$PYTHON_HELPER" read-app-wrapper-config --app "$1" --key "$2" } -read_bridge_genesis_param() { - python3 "$PYTHON_HELPER" read-bridge-genesis-param --config "$1" --key "$2" -} - -read_smartaccounts_verification_key_hash() { - python3 "$PYTHON_HELPER" read-smartaccounts-verification-key-hash --config "$1" +read_genesis_param() { + python3 "$PYTHON_HELPER" read-genesis-param \ + --config "$1" \ + --module "$2" \ + --key "$3" } generate_default_mina_priv_key() { @@ -186,10 +185,11 @@ resolve_default_mina_network_id() { printf '%s\n' "devnet" } -resolve_default_bridge_param() { +resolve_default_genesis_param() { local env_var_name="$1" - local config_key="$2" - local fallback="$3" + local module_name="$2" + local config_key="$3" + local fallback="$4" if [[ -n "${!env_var_name:-}" ]]; then printf '%s\n' "${!env_var_name}" @@ -198,7 +198,7 @@ resolve_default_bridge_param() { if [[ -f "$CHAIN_CONFIG_PATH" ]]; then local config_value - config_value="$(read_bridge_genesis_param "$CHAIN_CONFIG_PATH" "$config_key")" + config_value="$(read_genesis_param "$CHAIN_CONFIG_PATH" "$module_name" "$config_key")" if [[ -n "$config_value" ]]; then printf '%s\n' "$config_value" return @@ -208,25 +208,6 @@ resolve_default_bridge_param() { printf '%s\n' "$fallback" } -resolve_smartaccounts_verification_key_hash() { - if [[ -n "${SMART_ACCOUNTS_VERIFICATION_KEY_HASH:-}" ]]; then - printf '%s\n' "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" - return - fi - - if [[ -f "$CHAIN_CONFIG_PATH" ]]; then - local config_value - config_value="$(read_smartaccounts_verification_key_hash "$CHAIN_CONFIG_PATH")" - if [[ -n "$config_value" ]]; then - printf '%s\n' "$config_value" - return - fi - fi - - echo "smartaccounts verification key hash is required; set SMART_ACCOUNTS_VERIFICATION_KEY_HASH or genesis.app_state.smartaccounts.params.verification_key_hash in $CHAIN_CONFIG_PATH" >&2 - return 1 -} - validate_mina_network_id() { local index="$1" local mina_network_id="$2" @@ -524,12 +505,16 @@ declare -a NODE_GENESIS_FILES NODE_ADDRS NODE_COSMOS_PUB_KEYS NODE_IDS NODE_VERI declare -a NODE_WRAPPER_GRPC_ADDRESSES NODE_WRAPPER_GRPC_TRANSPORT_MODES DEFAULT_MINA_NETWORK_ID="$(resolve_default_mina_network_id)" -BRIDGE_CONFIRMATION_DEPTH="$(resolve_default_bridge_param "CONFIRMATION_DEPTH" "confirmation_depth" "32")" -BRIDGE_CONTRACT_ADDRESS="$(resolve_default_bridge_param "CONTRACT_ADDRESS" "contract_address" "B62qjRDirGFRf5dvNcGzMs5oWzQ2VyNcygnoKM2MkxB9PFUp7Utdraf")" -BRIDGE_START_BLOCK_HEIGHT="$(resolve_default_bridge_param "START_BLOCK_HEIGHT" "start_block_height" "1")" -BRIDGE_MAX_BLOCK_RANGE="$(resolve_default_bridge_param "MAX_BLOCK_RANGE" "max_block_range" "1000")" -BRIDGE_ACTIONS_REDUCED_ROOT_SNAPSHOT_WINDOW_SIZE="$(resolve_default_bridge_param "ACTIONS_REDUCED_ROOT_SNAPSHOT_WINDOW_SIZE" "actions_reduced_root_snapshot_window_size" "4")" -SMART_ACCOUNTS_VERIFICATION_KEY_HASH="$(resolve_smartaccounts_verification_key_hash)" +BRIDGE_CONFIRMATION_DEPTH="$(resolve_default_genesis_param "CONFIRMATION_DEPTH" "bridge" "confirmation_depth" "32")" +BRIDGE_CONTRACT_ADDRESS="$(resolve_default_genesis_param "CONTRACT_ADDRESS" "bridge" "contract_address" "B62qjRDirGFRf5dvNcGzMs5oWzQ2VyNcygnoKM2MkxB9PFUp7Utdraf")" +BRIDGE_START_BLOCK_HEIGHT="$(resolve_default_genesis_param "START_BLOCK_HEIGHT" "bridge" "start_block_height" "1")" +BRIDGE_MAX_BLOCK_RANGE="$(resolve_default_genesis_param "MAX_BLOCK_RANGE" "bridge" "max_block_range" "1000")" +BRIDGE_ACTIONS_REDUCED_ROOT_SNAPSHOT_WINDOW_SIZE="$(resolve_default_genesis_param "ACTIONS_REDUCED_ROOT_SNAPSHOT_WINDOW_SIZE" "bridge" "actions_reduced_root_snapshot_window_size" "4")" +SMART_ACCOUNTS_VERIFICATION_KEY_HASH="$(resolve_default_genesis_param "SMART_ACCOUNTS_VERIFICATION_KEY_HASH" "smartaccounts" "verification_key_hash" "")" +if [[ -z "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" ]]; then + echo "smartaccounts verification key hash is required; set SMART_ACCOUNTS_VERIFICATION_KEY_HASH or genesis.app_state.smartaccounts.params.verification_key_hash in $CHAIN_CONFIG_PATH" >&2 + exit 1 +fi validate_positive_int "confirmation depth" "$BRIDGE_CONFIRMATION_DEPTH" validate_non_empty "contract address" "$BRIDGE_CONTRACT_ADDRESS" @@ -660,13 +645,9 @@ python3 "$PYTHON_HELPER" patch-smartaccounts-genesis \ --genesis "$PRIMARY_GENESIS_FILE" \ --verification-key-hash "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" -LOCAL_SMART_ACCOUNT_FIXTURE="$PRIMARY_HOME/config/local-smart-account-fixture.json" -"$DEVTOOLS_BINARY_PATH" smart-account-fixture \ - --verification-key-hash "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" \ - >"$LOCAL_SMART_ACCOUNT_FIXTURE" python3 "$PYTHON_HELPER" patch-local-smartaccount-proof-fixture \ --genesis "$PRIMARY_GENESIS_FILE" \ - --fixture "$LOCAL_SMART_ACCOUNT_FIXTURE" + --verification-key-hash "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" echo "==> Creating validator keys..." for ((i = 1; i <= VALIDATOR_COUNT; i++)); do diff --git a/scripts/setup_local_testnet_helper.py b/scripts/setup_local_testnet_helper.py index e5b1bbb6..ec930a2b 100644 --- a/scripts/setup_local_testnet_helper.py +++ b/scripts/setup_local_testnet_helper.py @@ -271,10 +271,14 @@ def read_config_path_value(config_path: str, path: list[str]) -> Optional[str]: return read_scalar_in_block(lines, start_index, end_index, parent_indent, path[-1]) -def read_bridge_genesis_param(config_path: str, key_name: str) -> int: +def read_genesis_param( + config_path: str, + module_name: str, + key_name: str, +) -> int: value = read_config_path_value( config_path, - ["genesis", "app_state", "bridge", "params", key_name], + ["genesis", "app_state", module_name, "params", key_name], ) if value is None: print("") @@ -282,23 +286,6 @@ def read_bridge_genesis_param(config_path: str, key_name: str) -> int: print(value) return 0 - - -def read_smartaccounts_verification_key_hash(config_path: str) -> int: - value = read_config_path_value( - config_path, - [ - "genesis", - "app_state", - "smartaccounts", - "params", - "verification_key_hash", - ], - ) - print(value or "") - return 0 - - def read_mina_network_id(config_path: str) -> int: content = read_text(config_path) print( @@ -781,10 +768,7 @@ def patch_bridge_genesis( return 0 -def patch_smartaccounts_genesis( - genesis_path: str, - verification_key_hash: str, -) -> int: +def decode_smartaccounts_verification_key_hash(verification_key_hash: str) -> bytes: encoded_hash = verification_key_hash.strip() hex_hash = encoded_hash[2:] if encoded_hash.startswith("0x") else encoded_hash @@ -804,6 +788,17 @@ def patch_smartaccounts_genesis( f"got {len(hash_bytes)}" ) + return hash_bytes + + +def patch_smartaccounts_genesis( + genesis_path: str, + verification_key_hash: str, +) -> int: + hash_bytes = decode_smartaccounts_verification_key_hash( + verification_key_hash + ) + genesis = read_json(genesis_path) smartaccounts = genesis.setdefault("app_state", {}).setdefault( "smartaccounts", {} @@ -819,22 +814,43 @@ def patch_smartaccounts_genesis( def patch_local_smartaccount_proof_fixture( genesis_path: str, - fixture_path: str, + verification_key_hash: str, ) -> int: - fixture = read_json(fixture_path) - required_fields = ( - "proof_hash_base64", - "public_inputs_hash_base64", - "verification_key_hash_base64", - "verification_id_base64", + identity = bytes.fromhex( + "a0e18e9725f34a4d055830f724af1f42bc57942ad0a38875b4b991851d999dcb" ) - for field in required_fields: - try: - value = base64.b64decode(fixture[field], validate=True) - except (KeyError, ValueError) as exc: - raise SystemExit(f"invalid local smart-account fixture field: {field}") from exc - if len(value) != 32: - raise SystemExit(f"local smart-account fixture field {field} must be 32 bytes") + session_public_key = bytes.fromhex( + "6e1f9218c4a7fbce1262a5d586d7511d1b2ec5201d96ab621753c239ebab045b" + ) + proof_hash = bytes.fromhex( + "09b26eb3d86c4fd415838c2d9bd8bebc01cbb0fe78e270a4ea643e81075ac210" + ) + verification_key_hash_bytes = decode_smartaccounts_verification_key_hash( + verification_key_hash + ) + expires_at_height = 1_000_000 + public_inputs = ( + session_public_key + + expires_at_height.to_bytes(32, byteorder="big") + + identity + ) + public_inputs_hash = hashlib.sha256(public_inputs).digest() + verification_id = hashlib.sha256( + b"pulsar/verification/v1\x00" + + (1).to_bytes(4, byteorder="big") + + proof_hash + + public_inputs_hash + + verification_key_hash_bytes + ).digest() + + proof_hash_base64 = base64.b64encode(proof_hash).decode("ascii") + public_inputs_hash_base64 = base64.b64encode(public_inputs_hash).decode( + "ascii" + ) + verification_key_hash_base64 = base64.b64encode( + verification_key_hash_bytes + ).decode("ascii") + verification_id_base64 = base64.b64encode(verification_id).decode("ascii") proof_key = {"submission_height": "1", "index_in_block": 0} genesis = read_json(genesis_path) @@ -843,7 +859,7 @@ def patch_local_smartaccount_proof_fixture( ) verification["seen_verification_ids"] = [ { - "verification_id": fixture["verification_id_base64"], + "verification_id": verification_id_base64, "proof_key": proof_key, } ] @@ -851,7 +867,7 @@ def patch_local_smartaccount_proof_fixture( { "proof_key": proof_key, "result": { - "proof_hash": fixture["proof_hash_base64"], + "proof_hash": proof_hash_base64, "proof_type": "PROOF_TYPE_MINA_PICKLES", "status": "PROOF_STATUS_VALID", "valid_voting_power": "1", @@ -860,11 +876,9 @@ def patch_local_smartaccount_proof_fixture( "voting_power_threshold": "1", "submission_height": "1", "finalized_height": "6", - "public_inputs_hash": fixture["public_inputs_hash_base64"], - "verification_key_hash": fixture[ - "verification_key_hash_base64" - ], - "verification_id": fixture["verification_id_base64"], + "public_inputs_hash": public_inputs_hash_base64, + "verification_key_hash": verification_key_hash_base64, + "verification_id": verification_id_base64, }, } ] @@ -1022,14 +1036,10 @@ def build_parser() -> argparse.ArgumentParser: choices=("wrapper_grpc_address", "wrapper_grpc_transport_mode"), ) - read_bridge_param_cmd = subparsers.add_parser("read-bridge-genesis-param") - read_bridge_param_cmd.add_argument("--config", required=True) - read_bridge_param_cmd.add_argument("--key", required=True) - - read_smartaccounts_hash = subparsers.add_parser( - "read-smartaccounts-verification-key-hash" - ) - read_smartaccounts_hash.add_argument("--config", required=True) + read_genesis_param_cmd = subparsers.add_parser("read-genesis-param") + read_genesis_param_cmd.add_argument("--config", required=True) + read_genesis_param_cmd.add_argument("--module", required=True) + read_genesis_param_cmd.add_argument("--key", required=True) read_gas_price = subparsers.add_parser("read-min-gas-price") read_gas_price.add_argument("--app", required=True) @@ -1095,7 +1105,9 @@ def build_parser() -> argparse.ArgumentParser: "patch-local-smartaccount-proof-fixture" ) patch_local_smartaccount.add_argument("--genesis", required=True) - patch_local_smartaccount.add_argument("--fixture", required=True) + patch_local_smartaccount.add_argument( + "--verification-key-hash", required=True + ) verify_registry = subparsers.add_parser("verify-validator-key-pairs") verify_registry.add_argument("--genesis", required=True) @@ -1136,10 +1148,8 @@ def main() -> int: ) if args.command == "read-app-wrapper-config": return read_app_toml_string(args.app, "bridge", args.key) - if args.command == "read-bridge-genesis-param": - return read_bridge_genesis_param(args.config, args.key) - if args.command == "read-smartaccounts-verification-key-hash": - return read_smartaccounts_verification_key_hash(args.config) + if args.command == "read-genesis-param": + return read_genesis_param(args.config, args.module, args.key) if args.command == "read-mina-network-id": return read_mina_network_id(args.config) if args.command == "read-min-gas-price": @@ -1194,7 +1204,7 @@ def main() -> int: if args.command == "patch-local-smartaccount-proof-fixture": return patch_local_smartaccount_proof_fixture( args.genesis, - args.fixture, + args.verification_key_hash, ) if args.command == "verify-validator-key-pairs": return verify_validator_key_pairs(args.genesis, args.cosmos_key) diff --git a/scripts/test_setup_local_testnet_helper.py b/scripts/test_setup_local_testnet_helper.py index fd25a329..b5663e45 100644 --- a/scripts/test_setup_local_testnet_helper.py +++ b/scripts/test_setup_local_testnet_helper.py @@ -460,25 +460,39 @@ def test_patch_smartaccounts_genesis_sets_verification_key_hash(self): ) self.assertEqual([], smartaccounts["smart_accounts"]) - def test_reads_smartaccounts_verification_key_hash_from_config(self): - expected = "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE=" + def test_reads_module_params_through_the_same_generic_path(self): config = self.write_temp( "config.yml", """genesis: app_state: + bridge: + params: + confirmation_depth: "32" smartaccounts: params: verification_key_hash: "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE=" """, ) - output = io.StringIO() - with contextlib.redirect_stdout(output): - self.assertEqual( - 0, - helper.read_smartaccounts_verification_key_hash(str(config)), - ) - self.assertEqual(expected, output.getvalue().strip()) + cases = ( + ("bridge", "confirmation_depth", "32"), + ( + "smartaccounts", + "verification_key_hash", + "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE=", + ), + ) + for module_name, key_name, expected in cases: + with self.subTest(module=module_name, key=key_name): + output = io.StringIO() + with contextlib.redirect_stdout(output): + self.assertEqual( + 0, + helper.read_genesis_param( + str(config), module_name, key_name + ), + ) + self.assertEqual(expected, output.getvalue().strip()) def test_patch_smartaccounts_genesis_rejects_invalid_hash(self): genesis = self.write_temp("genesis.json", json.dumps({"app_state": {}})) @@ -493,23 +507,12 @@ def test_patch_local_smartaccount_proof_fixture(self): "genesis.json", json.dumps({"app_state": {"verification": {"params": {}}}}), ) - encoded = base64.b64encode(bytes(range(32))).decode("ascii") - fixture = self.write_temp( - "fixture.json", - json.dumps( - { - "proof_hash_base64": encoded, - "public_inputs_hash_base64": encoded, - "verification_key_hash_base64": encoded, - "verification_id_base64": encoded, - } - ), - ) + verification_key_hash = "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE=" self.assertEqual( 0, helper.patch_local_smartaccount_proof_fixture( - str(genesis), str(fixture) + str(genesis), verification_key_hash ), ) @@ -518,12 +521,15 @@ def test_patch_local_smartaccount_proof_fixture(self): ]["verification"] self.assertEqual({}, verification["params"]) self.assertEqual( - encoded, + "hrZ/3dUCYGrO3ofkc69c4NAVvF/3/olEoj5pN0fhJhY=", verification["seen_verification_ids"][0]["verification_id"], ) result = verification["final_proof_results"][0]["result"] self.assertEqual("PROOF_STATUS_VALID", result["status"]) - self.assertEqual(encoded, result["public_inputs_hash"]) + self.assertEqual( + "R/Za9xWb5udbVYiQ2rs8REB4+qhK5lfKhuhmK2fDgaA=", + result["public_inputs_hash"], + ) def test_render_e2e_seed_replaces_exactly_one_placeholder(self): template = self.write_temp( From ce938dc4cb29d75272ef0ea8134b1d9cc117fdb1 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Tue, 25 Aug 2026 23:02:53 +0300 Subject: [PATCH 33/51] chore: add nolint tag and remove deprecated func usage in tests to pass linter --- x/smartaccounts/keeper/msg_server_add_public_key_test.go | 3 +-- x/smartaccounts/module/module.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/x/smartaccounts/keeper/msg_server_add_public_key_test.go b/x/smartaccounts/keeper/msg_server_add_public_key_test.go index 219eb04e..92533263 100644 --- a/x/smartaccounts/keeper/msg_server_add_public_key_test.go +++ b/x/smartaccounts/keeper/msg_server_add_public_key_test.go @@ -211,9 +211,8 @@ func TestAddPublicKeyRejectsExpiredSessionKey(t *testing.T) { msg := validAddPublicKeyMessage(t, f) sdkCtx := sdk.UnwrapSDKContext(f.ctx).WithBlockHeight(int64(msg.PublicKeyInputs.ExpiresAtHeight)) - f.ctx = sdk.WrapSDKContext(sdkCtx) - _, err := keeper.NewMsgServerImpl(f.keeper).AddPublicKey(f.ctx, msg) + _, err := keeper.NewMsgServerImpl(f.keeper).AddPublicKey(sdkCtx, msg) require.ErrorIs(t, err, types.ErrInvalidExpirationHeight) } diff --git a/x/smartaccounts/module/module.go b/x/smartaccounts/module/module.go index e4b4bd14..012795da 100644 --- a/x/smartaccounts/module/module.go +++ b/x/smartaccounts/module/module.go @@ -20,7 +20,7 @@ import ( var ( _ module.AppModuleBasic = (*AppModule)(nil) - _ module.AppModule = (*AppModule)(nil) + _ module.AppModule = (*AppModule)(nil) //nolint:staticcheck // Legacy Cosmos SDK module interface is still required by the scaffold. _ module.HasGenesis = (*AppModule)(nil) _ appmodule.AppModule = (*AppModule)(nil) From 53045ce198ea1975f493e04a799cf3311823a420 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Wed, 26 Aug 2026 15:13:11 +0300 Subject: [PATCH 34/51] chore: remove whitespace from tx_auth.proto --- proto/pulsarchain/ante/v1/tx_auth.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/pulsarchain/ante/v1/tx_auth.proto b/proto/pulsarchain/ante/v1/tx_auth.proto index 40fc6237..4346816b 100644 --- a/proto/pulsarchain/ante/v1/tx_auth.proto +++ b/proto/pulsarchain/ante/v1/tx_auth.proto @@ -16,7 +16,7 @@ enum TxAuthMode { TX_AUTH_MODE_COSMOS = 1; // TX_AUTH_MODE_MINA selects verification with the signer's registered Mina key. TX_AUTH_MODE_MINA = 2; - // TX_AUTH_MODE_SMART_ACCOUNT selects verification with the registered Session key. + // TX_AUTH_MODE_SMART_ACCOUNT selects verification with the registered Session key. TX_AUTH_MODE_SMART_ACCOUNT = 3; } From b2af2da53189e8d84ca7f7ebfddfe048457838ac Mon Sep 17 00:00:00 2001 From: Yusuf Date: Wed, 26 Aug 2026 15:30:11 +0300 Subject: [PATCH 35/51] fix: update public input hash to include accountAddress --- .../keeper/msg_server_add_public_key.go | 2 +- .../keeper/msg_server_add_public_key_test.go | 23 ++++++--- x/smartaccounts/types/public_input_hash.go | 14 +++++- .../types/public_input_hash_test.go | 50 +++++++++++++------ x/smartaccounts/types/types.go | 1 + 5 files changed, 67 insertions(+), 23 deletions(-) diff --git a/x/smartaccounts/keeper/msg_server_add_public_key.go b/x/smartaccounts/keeper/msg_server_add_public_key.go index 90335584..c9cd4f1c 100644 --- a/x/smartaccounts/keeper/msg_server_add_public_key.go +++ b/x/smartaccounts/keeper/msg_server_add_public_key.go @@ -74,7 +74,7 @@ func (k msgServer) AddPublicKey(ctx context.Context, msg *types.MsgAddPublicKey) return nil, types.ErrVerificationKeyMismatch } - publicKeyInputsHash, err := types.ComputePublicInputsHash(msg.PublicKeyInputs) + publicKeyInputsHash, err := types.ComputePublicInputsHash(msg.PublicKeyInputs, accountAddr) if err != nil { return nil, err } diff --git a/x/smartaccounts/keeper/msg_server_add_public_key_test.go b/x/smartaccounts/keeper/msg_server_add_public_key_test.go index 92533263..7e200c4b 100644 --- a/x/smartaccounts/keeper/msg_server_add_public_key_test.go +++ b/x/smartaccounts/keeper/msg_server_add_public_key_test.go @@ -36,20 +36,29 @@ func TestAddPublicKey(t *testing.T) { require.ErrorIs(t, err, types.ErrSessionKeyAlreadyExists) } -func TestAddPublicKeyRejectsDifferentCreatorForExistingAccount(t *testing.T) { +func TestAddPublicKeyRejectsCreatorNotBoundByProof(t *testing.T) { f := initFixture(t) msg := validAddPublicKeyMessage(t, f) server := keeper.NewMsgServerImpl(f.keeper) - _, err := server.AddPublicKey(f.ctx, msg) - require.NoError(t, err) - otherCreator, err := f.addressCodec.BytesToString(bytes.Repeat([]byte{0x09}, 20)) require.NoError(t, err) msg.Creator = otherCreator _, err = server.AddPublicKey(f.ctx, msg) - require.ErrorIs(t, err, types.ErrAccountAddressMismatch) + require.ErrorIs(t, err, types.ErrInvalidPublicInputsHash) + + originalCreator, err := f.addressCodec.BytesToString(f.keeper.GetAuthority()) + require.NoError(t, err) + msg.Creator = originalCreator + + _, err = server.AddPublicKey(f.ctx, msg) + require.NoError(t, err) + + genesis, err := f.keeper.ExportGenesis(f.ctx) + require.NoError(t, err) + require.Len(t, genesis.SmartAccounts, 1) + require.Equal(t, f.keeper.GetAuthority(), genesis.SmartAccounts[0].Account.AccountAddress) } func TestAddPublicKeyRejectsInvalidProofData(t *testing.T) { @@ -221,6 +230,8 @@ func validAddPublicKeyMessage(t *testing.T, f *fixture) *types.MsgAddPublicKey { creator, err := f.addressCodec.BytesToString(f.keeper.GetAuthority()) require.NoError(t, err) + accountAddress, err := f.addressCodec.StringToBytes(creator) + require.NoError(t, err) currentHeight := sdk.UnwrapSDKContext(f.ctx).BlockHeight() inputs := &types.PublicKeyInputs{ @@ -228,7 +239,7 @@ func validAddPublicKeyMessage(t *testing.T, f *fixture) *types.MsgAddPublicKey { ExpiresAtHeight: uint64(currentHeight) + 10, Identity: bytes.Repeat([]byte{0x03}, types.IdentitySize), } - publicInputsHash, err := types.ComputePublicInputsHash(inputs) + publicInputsHash, err := types.ComputePublicInputsHash(inputs, accountAddress) require.NoError(t, err) proofHash := bytes.Repeat([]byte{0x04}, verificationtypes.ProofHashSize) diff --git a/x/smartaccounts/types/public_input_hash.go b/x/smartaccounts/types/public_input_hash.go index a8f2b366..b176b7e1 100644 --- a/x/smartaccounts/types/public_input_hash.go +++ b/x/smartaccounts/types/public_input_hash.go @@ -8,7 +8,7 @@ import ( const publicInputFieldSize = 32 // ComputePublicInputsHash encodes and hashes the smart-account public inputs. -func ComputePublicInputsHash(inputs *PublicKeyInputs) ([]byte, error) { +func ComputePublicInputsHash(inputs *PublicKeyInputs, accountAddress []byte) ([]byte, error) { if inputs == nil { return nil, ErrNilPublicKeyInputs } @@ -27,8 +27,14 @@ func ComputePublicInputsHash(inputs *PublicKeyInputs) ([]byte, error) { if len(inputs.Identity) != IdentitySize { return nil, ErrIdentityInvalidLength } + if len(accountAddress) == 0 { + return nil, ErrNilAccountAddress + } + if len(accountAddress) != AccountAddressSize { + return nil, ErrInvalidAccountAddress + } - rawPublicInputs := make([]byte, 0, SessionPublicKeySize+publicInputFieldSize+IdentitySize) + rawPublicInputs := make([]byte, 0, 4*publicInputFieldSize) rawPublicInputs = append(rawPublicInputs, inputs.SessionPublicKey...) var expiresAtHeight [publicInputFieldSize]byte @@ -39,6 +45,10 @@ func ComputePublicInputsHash(inputs *PublicKeyInputs) ([]byte, error) { rawPublicInputs = append(rawPublicInputs, expiresAtHeight[:]...) rawPublicInputs = append(rawPublicInputs, inputs.Identity...) + var accountAddressField [publicInputFieldSize]byte + copy(accountAddressField[publicInputFieldSize-len(accountAddress):], accountAddress) + rawPublicInputs = append(rawPublicInputs, accountAddressField[:]...) + hash := sha256.Sum256(rawPublicInputs) return hash[:], nil } diff --git a/x/smartaccounts/types/public_input_hash_test.go b/x/smartaccounts/types/public_input_hash_test.go index 0d984dda..6efa95b6 100644 --- a/x/smartaccounts/types/public_input_hash_test.go +++ b/x/smartaccounts/types/public_input_hash_test.go @@ -13,14 +13,16 @@ import ( func TestComputePublicInputsHash(t *testing.T) { inputs := validPublicKeyInputs() + accountAddress := bytes.Repeat([]byte{0x33}, types.AccountAddressSize) - rawPublicInputs := make([]byte, 96) + rawPublicInputs := make([]byte, 128) copy(rawPublicInputs[:32], inputs.SessionPublicKey) binary.BigEndian.PutUint64(rawPublicInputs[56:64], inputs.ExpiresAtHeight) - copy(rawPublicInputs[64:], inputs.Identity) + copy(rawPublicInputs[64:96], inputs.Identity) + copy(rawPublicInputs[128-types.AccountAddressSize:], accountAddress) expected := sha256.Sum256(rawPublicInputs) - actual, err := types.ComputePublicInputsHash(inputs) + actual, err := types.ComputePublicInputsHash(inputs, accountAddress) require.NoError(t, err) require.Equal(t, expected[:], actual) } @@ -28,15 +30,18 @@ func TestComputePublicInputsHash(t *testing.T) { func TestComputePublicInputsHashValidation(t *testing.T) { validPublicKeyInputs := validPublicKeyInputs() + validAccountAddress := bytes.Repeat([]byte{0x33}, types.AccountAddressSize) tests := []struct { - name string - inputs *types.PublicKeyInputs - want error + name string + inputs *types.PublicKeyInputs + accountAddress []byte + want error }{ { - name: "nil inputs", - want: types.ErrNilPublicKeyInputs, + name: "nil inputs", + accountAddress: validAccountAddress, + want: types.ErrNilPublicKeyInputs, }, { name: "nil public key", @@ -44,7 +49,8 @@ func TestComputePublicInputsHashValidation(t *testing.T) { ExpiresAtHeight: validPublicKeyInputs.ExpiresAtHeight, Identity: validPublicKeyInputs.Identity, }, - want: types.ErrNilPublicKey, + accountAddress: validAccountAddress, + want: types.ErrNilPublicKey, }, { name: "invalid public key length", @@ -53,7 +59,8 @@ func TestComputePublicInputsHashValidation(t *testing.T) { ExpiresAtHeight: validPublicKeyInputs.ExpiresAtHeight, Identity: validPublicKeyInputs.Identity, }, - want: types.ErrPublicKeyInvalidLength, + accountAddress: validAccountAddress, + want: types.ErrPublicKeyInvalidLength, }, { name: "zero expiration height", @@ -62,7 +69,8 @@ func TestComputePublicInputsHashValidation(t *testing.T) { ExpiresAtHeight: 0, Identity: validPublicKeyInputs.Identity, }, - want: types.ErrInvalidExpirationHeight, + accountAddress: validAccountAddress, + want: types.ErrInvalidExpirationHeight, }, { name: "nil identity", @@ -70,7 +78,8 @@ func TestComputePublicInputsHashValidation(t *testing.T) { SessionPublicKey: validPublicKeyInputs.SessionPublicKey, ExpiresAtHeight: validPublicKeyInputs.ExpiresAtHeight, }, - want: types.ErrNilIdentity, + accountAddress: validAccountAddress, + want: types.ErrNilIdentity, }, { name: "invalid identity length", @@ -79,13 +88,26 @@ func TestComputePublicInputsHashValidation(t *testing.T) { ExpiresAtHeight: validPublicKeyInputs.ExpiresAtHeight, Identity: validPublicKeyInputs.Identity[:types.IdentitySize-1], }, - want: types.ErrIdentityInvalidLength, + accountAddress: validAccountAddress, + want: types.ErrIdentityInvalidLength, + }, + { + name: "nil account address", + inputs: validPublicKeyInputs, + accountAddress: nil, + want: types.ErrNilAccountAddress, + }, + { + name: "invalid account address length", + inputs: validPublicKeyInputs, + accountAddress: validAccountAddress[:types.AccountAddressSize-1], + want: types.ErrInvalidAccountAddress, }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { - _, err := types.ComputePublicInputsHash(test.inputs) + _, err := types.ComputePublicInputsHash(test.inputs, test.accountAddress) require.ErrorIs(t, err, test.want) }) } diff --git a/x/smartaccounts/types/types.go b/x/smartaccounts/types/types.go index 05ccd482..96c57bc8 100644 --- a/x/smartaccounts/types/types.go +++ b/x/smartaccounts/types/types.go @@ -3,5 +3,6 @@ package types const ( SessionPublicKeySize = 32 IdentitySize = 32 + AccountAddressSize = 20 PublicInputsHashSize = 32 ) From 451f63f766c547814117da560f97d30f0e968f1c Mon Sep 17 00:00:00 2001 From: Yusuf Date: Wed, 26 Aug 2026 15:44:09 +0300 Subject: [PATCH 36/51] fix: use verification_id instead of proof hash to enforce uniqueness --- proto/pulsarchain/smartaccounts/v1/tx.proto | 2 +- x/smartaccounts/keeper/keeper_test.go | 12 +-- .../keeper/msg_server_add_public_key.go | 12 +-- .../keeper/msg_server_add_public_key_test.go | 55 +++++++----- x/smartaccounts/module/autocli.go | 4 +- x/smartaccounts/types/errors.go | 32 +++---- x/smartaccounts/types/expected_keepers.go | 2 +- x/smartaccounts/types/tx.pb.go | 86 +++++++++---------- x/verification/keeper/keeper.go | 39 ++++++--- 9 files changed, 134 insertions(+), 110 deletions(-) diff --git a/proto/pulsarchain/smartaccounts/v1/tx.proto b/proto/pulsarchain/smartaccounts/v1/tx.proto index ff067b6d..560f2128 100644 --- a/proto/pulsarchain/smartaccounts/v1/tx.proto +++ b/proto/pulsarchain/smartaccounts/v1/tx.proto @@ -48,7 +48,7 @@ message MsgUpdateParamsResponse {} message MsgAddPublicKey { option (cosmos.msg.v1.signer) = "creator"; string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - bytes proof_hash = 2; + bytes verification_id = 2; PublicKeyInputs public_key_inputs = 3; } diff --git a/x/smartaccounts/keeper/keeper_test.go b/x/smartaccounts/keeper/keeper_test.go index 11cd17fb..c1ce895f 100644 --- a/x/smartaccounts/keeper/keeper_test.go +++ b/x/smartaccounts/keeper/keeper_test.go @@ -21,14 +21,16 @@ import ( ) type mockVerificationKeeper struct { - result verificationtypes.FinalProofResult - err error + result verificationtypes.FinalProofResult + err error + requestedVerificationID []byte } -func (m mockVerificationKeeper) FinalProofResultByProofHash( - context.Context, - []byte, +func (m *mockVerificationKeeper) FinalProofResultByVerificationID( + _ context.Context, + verificationID []byte, ) (verificationtypes.FinalProofResult, error) { + m.requestedVerificationID = bytes.Clone(verificationID) return m.result, m.err } diff --git a/x/smartaccounts/keeper/msg_server_add_public_key.go b/x/smartaccounts/keeper/msg_server_add_public_key.go index c9cd4f1c..8bd4519d 100644 --- a/x/smartaccounts/keeper/msg_server_add_public_key.go +++ b/x/smartaccounts/keeper/msg_server_add_public_key.go @@ -17,12 +17,12 @@ func (k msgServer) AddPublicKey(ctx context.Context, msg *types.MsgAddPublicKey) return nil, errorsmod.Wrap(err, "invalid creator address") } - if msg.ProofHash == nil { - return nil, types.ErrNilProofHash + if msg.VerificationId == nil { + return nil, types.ErrNilVerificationID } - if len(msg.ProofHash) != verificationtypes.ProofHashSize { - return nil, types.ErrProofHashInvalidLength + if len(msg.VerificationId) != verificationtypes.VerificationIDSize { + return nil, types.ErrVerificationIDInvalidLength } if msg.PublicKeyInputs == nil { @@ -52,9 +52,9 @@ func (k msgServer) AddPublicKey(ctx context.Context, msg *types.MsgAddPublicKey) return nil, types.ErrInvalidExpirationHeight } - result, err := k.verificationKeeper.FinalProofResultByProofHash( + result, err := k.verificationKeeper.FinalProofResultByVerificationID( ctx, - msg.ProofHash, + msg.VerificationId, ) if err != nil { return nil, err diff --git a/x/smartaccounts/keeper/msg_server_add_public_key_test.go b/x/smartaccounts/keeper/msg_server_add_public_key_test.go index 7e200c4b..a2ad1fa7 100644 --- a/x/smartaccounts/keeper/msg_server_add_public_key_test.go +++ b/x/smartaccounts/keeper/msg_server_add_public_key_test.go @@ -20,6 +20,7 @@ func TestAddPublicKey(t *testing.T) { response, err := server.AddPublicKey(f.ctx, msg) require.NoError(t, err) require.NotNil(t, response) + require.Equal(t, msg.VerificationId, f.verificationKeeper.requestedVerificationID) exists, err := f.keeper.HasSmartAccount(f.ctx, msg.PublicKeyInputs.Identity) require.NoError(t, err) @@ -123,37 +124,37 @@ func TestAddPublicKeyRejectsInvalidInputs(t *testing.T) { tests := []struct { name string - proofHash []byte + verificationID []byte publicKeyInputs *types.PublicKeyInputs want error }{ { - name: "nil proof hash", + name: "nil verification ID", publicKeyInputs: &types.PublicKeyInputs{ SessionPublicKey: validMsg.PublicKeyInputs.SessionPublicKey, ExpiresAtHeight: validMsg.PublicKeyInputs.ExpiresAtHeight, Identity: validMsg.PublicKeyInputs.Identity, }, - want: types.ErrNilProofHash, + want: types.ErrNilVerificationID, }, { - name: "invalid proof hash length", - proofHash: validMsg.ProofHash[:verificationtypes.ProofHashSize-1], + name: "invalid verification ID length", + verificationID: validMsg.VerificationId[:verificationtypes.VerificationIDSize-1], publicKeyInputs: &types.PublicKeyInputs{ SessionPublicKey: validMsg.PublicKeyInputs.SessionPublicKey, ExpiresAtHeight: validMsg.PublicKeyInputs.ExpiresAtHeight, Identity: validMsg.PublicKeyInputs.Identity, }, - want: types.ErrProofHashInvalidLength, + want: types.ErrVerificationIDInvalidLength, }, { - name: "nil public key inputs", - proofHash: validMsg.ProofHash, - want: types.ErrNilPublicKeyInputs, + name: "nil public key inputs", + verificationID: validMsg.VerificationId, + want: types.ErrNilPublicKeyInputs, }, { - name: "nil identity", - proofHash: validMsg.ProofHash, + name: "nil identity", + verificationID: validMsg.VerificationId, publicKeyInputs: &types.PublicKeyInputs{ SessionPublicKey: validMsg.PublicKeyInputs.SessionPublicKey, ExpiresAtHeight: validMsg.PublicKeyInputs.ExpiresAtHeight, @@ -161,8 +162,8 @@ func TestAddPublicKeyRejectsInvalidInputs(t *testing.T) { want: types.ErrNilIdentity, }, { - name: "invalid identity length", - proofHash: validMsg.ProofHash, + name: "invalid identity length", + verificationID: validMsg.VerificationId, publicKeyInputs: &types.PublicKeyInputs{ SessionPublicKey: validMsg.PublicKeyInputs.SessionPublicKey, ExpiresAtHeight: validMsg.PublicKeyInputs.ExpiresAtHeight, @@ -171,8 +172,8 @@ func TestAddPublicKeyRejectsInvalidInputs(t *testing.T) { want: types.ErrIdentityInvalidLength, }, { - name: "nil public key", - proofHash: validMsg.ProofHash, + name: "nil public key", + verificationID: validMsg.VerificationId, publicKeyInputs: &types.PublicKeyInputs{ ExpiresAtHeight: validMsg.PublicKeyInputs.ExpiresAtHeight, Identity: validMsg.PublicKeyInputs.Identity, @@ -180,8 +181,8 @@ func TestAddPublicKeyRejectsInvalidInputs(t *testing.T) { want: types.ErrNilPublicKey, }, { - name: "invalid public key length", - proofHash: validMsg.ProofHash, + name: "invalid public key length", + verificationID: validMsg.VerificationId, publicKeyInputs: &types.PublicKeyInputs{ SessionPublicKey: validMsg.PublicKeyInputs.SessionPublicKey[:types.SessionPublicKeySize-1], ExpiresAtHeight: validMsg.PublicKeyInputs.ExpiresAtHeight, @@ -190,8 +191,8 @@ func TestAddPublicKeyRejectsInvalidInputs(t *testing.T) { want: types.ErrPublicKeyInvalidLength, }, { - name: "zero expiration height", - proofHash: validMsg.ProofHash, + name: "zero expiration height", + verificationID: validMsg.VerificationId, publicKeyInputs: &types.PublicKeyInputs{ SessionPublicKey: validMsg.PublicKeyInputs.SessionPublicKey, ExpiresAtHeight: 0, @@ -205,7 +206,7 @@ func TestAddPublicKeyRejectsInvalidInputs(t *testing.T) { t.Run(test.name, func(t *testing.T) { msg := &types.MsgAddPublicKey{ Creator: validMsg.Creator, - ProofHash: test.proofHash, + VerificationId: test.verificationID, PublicKeyInputs: test.publicKeyInputs, } @@ -243,16 +244,26 @@ func validAddPublicKeyMessage(t *testing.T, f *fixture) *types.MsgAddPublicKey { require.NoError(t, err) proofHash := bytes.Repeat([]byte{0x04}, verificationtypes.ProofHashSize) + verificationKeyHash := bytes.Repeat([]byte{0x01}, types.VerificationKeyHashSize) + verificationID, err := verificationtypes.ComputeVerificationID( + verificationtypes.ProofType_PROOF_TYPE_NOIR_BARRETENBERG, + proofHash, + publicInputsHash, + verificationKeyHash, + ) + require.NoError(t, err) f.verificationKeeper.result = verificationtypes.FinalProofResult{ ProofHash: bytes.Clone(proofHash), + ProofType: verificationtypes.ProofType_PROOF_TYPE_NOIR_BARRETENBERG, Status: verificationtypes.ProofStatus_PROOF_STATUS_VALID, PublicInputsHash: publicInputsHash, - VerificationKeyHash: bytes.Repeat([]byte{0x01}, types.VerificationKeyHashSize), + VerificationKeyHash: verificationKeyHash, + VerificationId: bytes.Clone(verificationID[:]), } return &types.MsgAddPublicKey{ Creator: creator, - ProofHash: proofHash, + VerificationId: verificationID[:], PublicKeyInputs: inputs, } } diff --git a/x/smartaccounts/module/autocli.go b/x/smartaccounts/module/autocli.go index d1508f7f..eb1597ee 100644 --- a/x/smartaccounts/module/autocli.go +++ b/x/smartaccounts/module/autocli.go @@ -29,10 +29,10 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { }, { RpcMethod: "AddPublicKey", - Use: "add-public-key [proof-hash] [session-public-key] [expires-at-height] [identity]", + Use: "add-public-key [verification-id] [session-public-key] [expires-at-height] [identity]", Short: "Add a session public key to a smart account", PositionalArgs: []*autocliv1.PositionalArgDescriptor{ - {ProtoField: "proof_hash"}, + {ProtoField: "verification_id"}, {ProtoField: "public_key_inputs.session_public_key"}, {ProtoField: "public_key_inputs.expires_at_height"}, {ProtoField: "public_key_inputs.identity"}, diff --git a/x/smartaccounts/types/errors.go b/x/smartaccounts/types/errors.go index 7b6b7ec1..6c8d41ac 100644 --- a/x/smartaccounts/types/errors.go +++ b/x/smartaccounts/types/errors.go @@ -8,20 +8,20 @@ import ( // x/smartaccounts module sentinel errors var ( - ErrInvalidSigner = errors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message") - ErrNilPublicKey = errors.Register(ModuleName, 1101, "nil public key") - ErrPublicKeyInvalidLength = errors.Register(ModuleName, 1102, "public key invalid length") - ErrInvalidExpirationHeight = errors.Register(ModuleName, 1103, "invalid expiration height") - ErrNilIdentity = errors.Register(ModuleName, 1104, "nil identity") - ErrSessionKeyAlreadyExists = errors.Register(ModuleName, 1105, "session key already exists") - ErrIdentityInvalidLength = errors.Register(ModuleName, 1106, "identity invalid length") - ErrNilPublicKeyInputs = errors.Register(ModuleName, 1107, "nil public key inputs") - ErrNilProofHash = errors.Register(ModuleName, 1108, "nil proof hash") - ErrProofHashInvalidLength = errors.Register(ModuleName, 1109, "proof hash invalid length") - ErrProofNotValid = errors.Register(ModuleName, 1110, "proof is not valid") - ErrVerificationKeyMismatch = errors.Register(ModuleName, 1111, "verification key hash mismatch") - ErrInvalidPublicInputsHash = errors.Register(ModuleName, 1112, "invalid public inputs hash") - ErrNilAccountAddress = errors.Register(ModuleName, 1113, "nil account address") - ErrInvalidAccountAddress = errors.Register(ModuleName, 1114, "invalid account address") - ErrAccountAddressMismatch = errors.Register(ModuleName, 1115, "account address mismatch") + ErrInvalidSigner = errors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message") + ErrNilPublicKey = errors.Register(ModuleName, 1101, "nil public key") + ErrPublicKeyInvalidLength = errors.Register(ModuleName, 1102, "public key invalid length") + ErrInvalidExpirationHeight = errors.Register(ModuleName, 1103, "invalid expiration height") + ErrNilIdentity = errors.Register(ModuleName, 1104, "nil identity") + ErrSessionKeyAlreadyExists = errors.Register(ModuleName, 1105, "session key already exists") + ErrIdentityInvalidLength = errors.Register(ModuleName, 1106, "identity invalid length") + ErrNilPublicKeyInputs = errors.Register(ModuleName, 1107, "nil public key inputs") + ErrNilVerificationID = errors.Register(ModuleName, 1108, "nil verification ID") + ErrVerificationIDInvalidLength = errors.Register(ModuleName, 1109, "verification ID invalid length") + ErrProofNotValid = errors.Register(ModuleName, 1110, "proof is not valid") + ErrVerificationKeyMismatch = errors.Register(ModuleName, 1111, "verification key hash mismatch") + ErrInvalidPublicInputsHash = errors.Register(ModuleName, 1112, "invalid public inputs hash") + ErrNilAccountAddress = errors.Register(ModuleName, 1113, "nil account address") + ErrInvalidAccountAddress = errors.Register(ModuleName, 1114, "invalid account address") + ErrAccountAddressMismatch = errors.Register(ModuleName, 1115, "account address mismatch") ) diff --git a/x/smartaccounts/types/expected_keepers.go b/x/smartaccounts/types/expected_keepers.go index b8429018..0af7f80a 100644 --- a/x/smartaccounts/types/expected_keepers.go +++ b/x/smartaccounts/types/expected_keepers.go @@ -30,5 +30,5 @@ type ParamSubspace interface { // VerificationKeeper defines the proof-result lookup required by smartaccounts. type VerificationKeeper interface { - FinalProofResultByProofHash(ctx context.Context, proofHash []byte) (verificationtypes.FinalProofResult, error) + FinalProofResultByVerificationID(ctx context.Context, verificationID []byte) (verificationtypes.FinalProofResult, error) } diff --git a/x/smartaccounts/types/tx.pb.go b/x/smartaccounts/types/tx.pb.go index 802251aa..f89d1c4c 100644 --- a/x/smartaccounts/types/tx.pb.go +++ b/x/smartaccounts/types/tx.pb.go @@ -129,7 +129,7 @@ var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo // MsgAddPublicKey defines the MsgAddPublicKey message. type MsgAddPublicKey struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ProofHash []byte `protobuf:"bytes,2,opt,name=proof_hash,json=proofHash,proto3" json:"proof_hash,omitempty"` + VerificationId []byte `protobuf:"bytes,2,opt,name=verification_id,json=verificationId,proto3" json:"verification_id,omitempty"` PublicKeyInputs *PublicKeyInputs `protobuf:"bytes,3,opt,name=public_key_inputs,json=publicKeyInputs,proto3" json:"public_key_inputs,omitempty"` } @@ -173,9 +173,9 @@ func (m *MsgAddPublicKey) GetCreator() string { return "" } -func (m *MsgAddPublicKey) GetProofHash() []byte { +func (m *MsgAddPublicKey) GetVerificationId() []byte { if m != nil { - return m.ProofHash + return m.VerificationId } return nil } @@ -236,38 +236,38 @@ func init() { } var fileDescriptor_c2293ab44008f8fc = []byte{ - // 490 bytes of a gzipped FileDescriptorProto + // 492 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x4f, 0x6b, 0x13, 0x41, - 0x14, 0xcf, 0x58, 0xac, 0x64, 0x0c, 0x94, 0x2e, 0x85, 0xa6, 0x41, 0xd7, 0x12, 0x14, 0x62, 0x24, - 0xbb, 0x26, 0xa2, 0x48, 0x0f, 0x42, 0x73, 0x51, 0x91, 0x42, 0x59, 0xf1, 0xa0, 0x97, 0x30, 0xd9, - 0x1d, 0x77, 0x17, 0xbb, 0xfb, 0x86, 0x79, 0xb3, 0xa5, 0xb9, 0x89, 0x47, 0x4f, 0x7e, 0x0c, 0x8f, - 0x39, 0xf8, 0x21, 0x7a, 0x11, 0x4a, 0x4f, 0x9e, 0x44, 0x92, 0x43, 0xbe, 0x82, 0x47, 0xd9, 0xd9, - 0x5d, 0x9a, 0x84, 0x90, 0xb5, 0x97, 0x90, 0x79, 0xef, 0xf7, 0xde, 0xef, 0xcf, 0xce, 0xd0, 0x07, - 0x22, 0x39, 0x41, 0x26, 0xdd, 0x80, 0x85, 0xb1, 0x8d, 0x11, 0x93, 0x8a, 0xb9, 0x2e, 0x24, 0xb1, - 0x42, 0xfb, 0xb4, 0x6b, 0xab, 0x33, 0x4b, 0x48, 0x50, 0x60, 0xdc, 0x99, 0x83, 0x59, 0x0b, 0x30, - 0xeb, 0xb4, 0xdb, 0xd8, 0x66, 0x51, 0x18, 0x83, 0xad, 0x7f, 0xb3, 0x81, 0xc6, 0xae, 0x0b, 0x18, - 0x01, 0xda, 0x11, 0xfa, 0xe9, 0xa2, 0x08, 0xfd, 0xbc, 0xb1, 0x97, 0x35, 0x06, 0xfa, 0x64, 0x67, - 0x87, 0xbc, 0xb5, 0xe3, 0x83, 0x0f, 0x59, 0x3d, 0xfd, 0x97, 0x57, 0x1f, 0xae, 0x55, 0x28, 0x98, - 0x64, 0x51, 0xb1, 0xa0, 0xb5, 0xde, 0xcc, 0x48, 0xf0, 0x1c, 0xd9, 0xbc, 0x24, 0x74, 0xeb, 0x08, - 0xfd, 0x77, 0xc2, 0x63, 0x8a, 0x1f, 0xeb, 0x1d, 0xc6, 0x33, 0x5a, 0x65, 0x89, 0x0a, 0x40, 0x86, - 0x6a, 0x54, 0x27, 0xfb, 0xa4, 0x55, 0xed, 0xd7, 0x2f, 0x7f, 0x74, 0x76, 0x72, 0x8d, 0x87, 0x9e, - 0x27, 0x39, 0xe2, 0x5b, 0x25, 0xc3, 0xd8, 0x77, 0xae, 0xa0, 0xc6, 0x4b, 0xba, 0x99, 0xa9, 0xa8, - 0xdf, 0xd8, 0x27, 0xad, 0xdb, 0xbd, 0xfb, 0xd6, 0xba, 0xb0, 0xac, 0x8c, 0xad, 0x5f, 0x3d, 0xff, - 0x7d, 0xaf, 0xf2, 0x7d, 0x36, 0x6e, 0x13, 0x27, 0x1f, 0x3f, 0x78, 0xf1, 0x65, 0x36, 0x6e, 0x5f, - 0x2d, 0xfe, 0x3a, 0x1b, 0xb7, 0x1f, 0xcd, 0x3b, 0x3a, 0x5b, 0xf2, 0xb4, 0x64, 0xa0, 0xb9, 0x47, - 0x77, 0x97, 0x4a, 0x0e, 0x47, 0x01, 0x31, 0xf2, 0xe6, 0xcf, 0xcc, 0xef, 0xa1, 0xe7, 0x1d, 0x27, - 0xc3, 0x93, 0xd0, 0x7d, 0xc3, 0x47, 0x46, 0x8f, 0xde, 0x72, 0x25, 0x67, 0x0a, 0x64, 0xa9, 0xdb, - 0x02, 0x68, 0xdc, 0xa5, 0x54, 0x48, 0x80, 0x8f, 0x83, 0x80, 0x61, 0xa0, 0xfd, 0xd6, 0x9c, 0xaa, - 0xae, 0xbc, 0x62, 0x18, 0x18, 0xef, 0xe9, 0xb6, 0xd0, 0xfb, 0x07, 0x9f, 0xf8, 0x68, 0x10, 0xc6, - 0x22, 0x51, 0x58, 0xdf, 0xd0, 0xa9, 0x74, 0x4a, 0x52, 0x29, 0x64, 0xbd, 0xd6, 0x43, 0xce, 0x96, - 0x58, 0x2c, 0x1c, 0xd4, 0xd2, 0x70, 0x0a, 0x1d, 0xb9, 0xd5, 0x79, 0x3b, 0x85, 0xd5, 0xde, 0x5f, - 0x42, 0x37, 0x8e, 0xd0, 0x37, 0x14, 0xad, 0x2d, 0x7c, 0xde, 0x12, 0x01, 0x4b, 0xc9, 0x35, 0x9e, - 0x5e, 0x0b, 0x5e, 0xb0, 0xa7, 0xac, 0x0b, 0x21, 0x97, 0xb3, 0xce, 0xc3, 0xff, 0x83, 0x75, 0x95, - 0xe7, 0xc6, 0xcd, 0xcf, 0xe9, 0x45, 0xea, 0x3b, 0xe7, 0x13, 0x93, 0x5c, 0x4c, 0x4c, 0xf2, 0x67, - 0x62, 0x92, 0x6f, 0x53, 0xb3, 0x72, 0x31, 0x35, 0x2b, 0xbf, 0xa6, 0x66, 0xe5, 0xc3, 0x73, 0x3f, - 0x54, 0x41, 0x32, 0xb4, 0x5c, 0x88, 0xec, 0x18, 0x3c, 0xde, 0x7d, 0xdc, 0xed, 0x84, 0x60, 0x67, - 0x64, 0x9d, 0xd5, 0xd7, 0x4b, 0xbf, 0x97, 0xe1, 0xa6, 0x7e, 0x30, 0x4f, 0xfe, 0x05, 0x00, 0x00, - 0xff, 0xff, 0x40, 0x42, 0x66, 0xb3, 0x29, 0x04, 0x00, 0x00, + 0x14, 0xcf, 0x58, 0xac, 0x64, 0x0c, 0x86, 0x2e, 0x85, 0xa6, 0x41, 0xd6, 0x12, 0x14, 0x63, 0x24, + 0xbb, 0x26, 0xa2, 0x48, 0x0f, 0x42, 0x73, 0x91, 0x22, 0x85, 0xb2, 0xe2, 0x41, 0x2f, 0x61, 0xb2, + 0x3b, 0x4e, 0x06, 0xbb, 0x33, 0xc3, 0xcc, 0x6c, 0x68, 0x6e, 0xe2, 0xd1, 0x93, 0x1f, 0xc3, 0x63, + 0x0e, 0x7e, 0x88, 0x1e, 0x4b, 0x2f, 0x7a, 0x12, 0x49, 0x0e, 0xf9, 0x0a, 0x1e, 0x65, 0x67, 0x76, + 0xe9, 0x26, 0x84, 0x44, 0x2f, 0x21, 0xf3, 0xde, 0xef, 0xbd, 0xdf, 0x9f, 0x9d, 0x81, 0x0f, 0x44, + 0x72, 0xa6, 0x90, 0x0c, 0x87, 0x88, 0x32, 0x5f, 0xc5, 0x48, 0x6a, 0x14, 0x86, 0x3c, 0x61, 0x5a, + 0xf9, 0xa3, 0x8e, 0xaf, 0xcf, 0x3d, 0x21, 0xb9, 0xe6, 0xce, 0xdd, 0x02, 0xcc, 0x5b, 0x80, 0x79, + 0xa3, 0x4e, 0x7d, 0x07, 0xc5, 0x94, 0x71, 0xdf, 0xfc, 0xda, 0x81, 0xfa, 0x5e, 0xc8, 0x55, 0xcc, + 0x95, 0x1f, 0x2b, 0x92, 0x2e, 0x8a, 0x15, 0xc9, 0x1a, 0xfb, 0xb6, 0xd1, 0x37, 0x27, 0xdf, 0x1e, + 0xb2, 0xd6, 0x2e, 0xe1, 0x84, 0xdb, 0x7a, 0xfa, 0x2f, 0xab, 0x3e, 0x5a, 0xab, 0x50, 0x20, 0x89, + 0xe2, 0x7c, 0x41, 0x73, 0xbd, 0x99, 0xb1, 0xc0, 0x19, 0xb2, 0x71, 0x05, 0x60, 0xf5, 0x44, 0x91, + 0xb7, 0x22, 0x42, 0x1a, 0x9f, 0x9a, 0x1d, 0xce, 0x73, 0x58, 0x46, 0x89, 0x1e, 0x72, 0x49, 0xf5, + 0xb8, 0x06, 0x0e, 0x40, 0xb3, 0xdc, 0xab, 0x5d, 0x7d, 0x6f, 0xef, 0x66, 0x1a, 0x8f, 0xa2, 0x48, + 0x62, 0xa5, 0xde, 0x68, 0x49, 0x19, 0x09, 0xae, 0xa1, 0xce, 0x2b, 0xb8, 0x6d, 0x55, 0xd4, 0x6e, + 0x1c, 0x80, 0xe6, 0xed, 0xee, 0x7d, 0x6f, 0x5d, 0x58, 0x9e, 0x65, 0xeb, 0x95, 0x2f, 0x7e, 0xdd, + 0x2b, 0x7d, 0x9b, 0x4f, 0x5a, 0x20, 0xc8, 0xc6, 0x0f, 0x5f, 0x7e, 0x9e, 0x4f, 0x5a, 0xd7, 0x8b, + 0xbf, 0xcc, 0x27, 0xad, 0xc7, 0x45, 0x47, 0xe7, 0x4b, 0x9e, 0x96, 0x0c, 0x34, 0xf6, 0xe1, 0xde, + 0x52, 0x29, 0xc0, 0x4a, 0x70, 0xa6, 0x70, 0xe3, 0x87, 0xf5, 0x7b, 0x14, 0x45, 0xa7, 0xc9, 0xe0, + 0x8c, 0x86, 0xaf, 0xf1, 0xd8, 0xe9, 0xc2, 0x5b, 0xa1, 0xc4, 0x48, 0x73, 0xb9, 0xd1, 0x6d, 0x0e, + 0x74, 0x1e, 0xc2, 0xea, 0x08, 0x4b, 0xfa, 0x81, 0x86, 0x48, 0x53, 0xce, 0xfa, 0x34, 0x32, 0xa6, + 0x2b, 0xc1, 0x9d, 0x62, 0xf9, 0x38, 0x72, 0xde, 0xc1, 0x1d, 0x61, 0x98, 0xfa, 0x1f, 0xf1, 0xb8, + 0x4f, 0x99, 0x48, 0xb4, 0xaa, 0x6d, 0x99, 0x7c, 0xda, 0x1b, 0xf2, 0xc9, 0x05, 0x1e, 0x9b, 0xa1, + 0xa0, 0x2a, 0x16, 0x0b, 0x87, 0x95, 0x34, 0xa6, 0x5c, 0x51, 0x66, 0xba, 0x68, 0x2c, 0x37, 0xdd, + 0xfd, 0x03, 0xe0, 0xd6, 0x89, 0x22, 0x8e, 0x86, 0x95, 0x85, 0x0f, 0xbd, 0x41, 0xc0, 0x52, 0x86, + 0xf5, 0x67, 0xff, 0x05, 0xcf, 0xd9, 0x53, 0xd6, 0x85, 0xb8, 0x37, 0xb3, 0x16, 0xe1, 0xff, 0xc0, + 0xba, 0xca, 0x73, 0xfd, 0xe6, 0xa7, 0xf4, 0x4a, 0xf5, 0x82, 0x8b, 0xa9, 0x0b, 0x2e, 0xa7, 0x2e, + 0xf8, 0x3d, 0x75, 0xc1, 0xd7, 0x99, 0x5b, 0xba, 0x9c, 0xb9, 0xa5, 0x9f, 0x33, 0xb7, 0xf4, 0xfe, + 0x05, 0xa1, 0x7a, 0x98, 0x0c, 0xbc, 0x90, 0xc7, 0x3e, 0xe3, 0x11, 0xee, 0x3c, 0xe9, 0xb4, 0x29, + 0xf7, 0x2d, 0x59, 0x7b, 0xf5, 0x45, 0x33, 0x2f, 0x67, 0xb0, 0x6d, 0x9e, 0xce, 0xd3, 0xbf, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x0a, 0xb9, 0x85, 0x51, 0x33, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -488,10 +488,10 @@ func (m *MsgAddPublicKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if len(m.ProofHash) > 0 { - i -= len(m.ProofHash) - copy(dAtA[i:], m.ProofHash) - i = encodeVarintTx(dAtA, i, uint64(len(m.ProofHash))) + if len(m.VerificationId) > 0 { + i -= len(m.VerificationId) + copy(dAtA[i:], m.VerificationId) + i = encodeVarintTx(dAtA, i, uint64(len(m.VerificationId))) i-- dAtA[i] = 0x12 } @@ -573,7 +573,7 @@ func (m *MsgAddPublicKey) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.ProofHash) + l = len(m.VerificationId) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -827,7 +827,7 @@ func (m *MsgAddPublicKey) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofHash", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VerificationId", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -854,9 +854,9 @@ func (m *MsgAddPublicKey) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ProofHash = append(m.ProofHash[:0], dAtA[iNdEx:postIndex]...) - if m.ProofHash == nil { - m.ProofHash = []byte{} + m.VerificationId = append(m.VerificationId[:0], dAtA[iNdEx:postIndex]...) + if m.VerificationId == nil { + m.VerificationId = []byte{} } iNdEx = postIndex case 3: diff --git a/x/verification/keeper/keeper.go b/x/verification/keeper/keeper.go index 4b76cdf0..83d3ba93 100644 --- a/x/verification/keeper/keeper.go +++ b/x/verification/keeper/keeper.go @@ -3,6 +3,7 @@ package keeper import ( "bytes" "context" + "errors" "fmt" "cosmossdk.io/collections" @@ -114,30 +115,40 @@ func (k Keeper) GetAuthority() []byte { return append([]byte(nil), k.authority...) } -func (k Keeper) FinalProofResultByProofHash( +// FinalProofResultByVerificationID resolves a finalized proof through its permanent verification ID. +func (k Keeper) FinalProofResultByVerificationID( ctx context.Context, - proofHash []byte, + verificationID []byte, ) (types.FinalProofResult, error) { - if len(proofHash) != types.ProofHashSize { - return types.FinalProofResult{}, types.ErrInvalidProofHash + if len(verificationID) != types.VerificationIDSize { + return types.FinalProofResult{}, types.ErrInvalidVerificationID } - iterator, err := k.FinalProofResults.Iterate(ctx, nil) + proofKey, err := k.SeenVerificationIDs.Get(ctx, verificationID) if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return types.FinalProofResult{}, types.ErrProofNotFound + } return types.FinalProofResult{}, err } - defer iterator.Close() - for ; iterator.Valid(); iterator.Next() { - result, err := iterator.Value() - if err != nil { - return types.FinalProofResult{}, err + result, err := k.FinalProofResults.Get( + ctx, + types.NewProofStoreKey( + proofKey.SubmissionHeight, + proofKey.IndexInBlock, + ), + ) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return types.FinalProofResult{}, types.ErrProofNotFound } + return types.FinalProofResult{}, err + } - if bytes.Equal(result.ProofHash, proofHash) { - return result, nil - } + if !bytes.Equal(result.VerificationId, verificationID) { + return types.FinalProofResult{}, types.ErrProofStateCorrupted } - return types.FinalProofResult{}, types.ErrProofNotFound + return result, nil } From 4b11e051681834d089277bd534414d4adadef08a Mon Sep 17 00:00:00 2001 From: Yusuf Date: Wed, 26 Aug 2026 17:59:41 +0300 Subject: [PATCH 37/51] chore: add a comment line to explain the reason for ignoring the errors inside the ExportGenesis --- x/smartaccounts/keeper/genesis.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x/smartaccounts/keeper/genesis.go b/x/smartaccounts/keeper/genesis.go index cddf6218..32b358cf 100644 --- a/x/smartaccounts/keeper/genesis.go +++ b/x/smartaccounts/keeper/genesis.go @@ -37,6 +37,8 @@ func (k Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) } defer iter.Close() + // ExportGenesis is not responsible for handling entry-level errors. + // Therefore, errors encountered in this loop are skipped. for ; iter.Valid(); iter.Next() { acc, err := iter.Value() From f2de7bc8fc4ceb47f2000f81eeffde4ea8c0ba55 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Wed, 26 Aug 2026 19:05:11 +0300 Subject: [PATCH 38/51] feat(smartaccounts): implement GetSessionKeysByIdentity query --- docs/static/openapi.json | 2 +- .../pulsarchain/smartaccounts/v1/query.proto | 18 + .../query_get_session_keys_by_identity.go | 50 ++ x/smartaccounts/module/autocli.go | 6 + x/smartaccounts/types/query.pb.go | 626 +++++++++++++++++- x/smartaccounts/types/query.pb.gw.go | 83 +++ 6 files changed, 760 insertions(+), 25 deletions(-) create mode 100644 x/smartaccounts/keeper/query_get_session_keys_by_identity.go diff --git a/docs/static/openapi.json b/docs/static/openapi.json index 0a5a2ced..5f0cd8f6 100644 --- a/docs/static/openapi.json +++ b/docs/static/openapi.json @@ -1 +1 @@ -{"id":"github.com/node101-io/pulsar-chain","consumes":["application/json"],"produces":["application/json"],"swagger":"2.0","info":{"description":"Chain github.com/node101-io/pulsar-chain REST API","title":"HTTP API Console","contact":{"name":"github.com/node101-io/pulsar-chain"},"version":"version not set"},"paths":{"/node101-io/pulsar-chain/abci/v1/validator_set_with_powers/{block_height}":{"get":{"tags":["Query"],"operationId":"GithubComnode101IopulsarChainQuery_GetValidatorSetWithPowers","parameters":[{"type":"string","format":"int64","name":"block_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.abci.QueryGetValidatorSetWithPowersResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/abci/v1/vote_ext_body_by_height/{vote_extension_height}":{"get":{"tags":["Query"],"summary":"VoteExtBodyByHeight queries the vote extension body for a vote-extension\nconsensus height.","operationId":"GithubComnode101IopulsarChainQuery_VoteExtBodyByHeight","parameters":[{"type":"string","format":"int64","description":"vote_extension_height is the consensus height N where the vote extension is\nproduced. The returned body signs the transition from state N-2 to state N-1.","name":"vote_extension_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.abci.QueryVoteExtBodyByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/actions_reduced_root":{"get":{"tags":["Query"],"summary":"ActionsReducedRoot Queries a list of ActionsReducedRoot items.","operationId":"GithubComnode101IopulsarChainQuery_ActionsReducedRoot","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryActionsReducedRootResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/latest_action_hashes":{"get":{"tags":["Query"],"summary":"LatestActionHashes Queries a list of LatestActionHashes items.","operationId":"GithubComnode101IopulsarChainQuery_LatestActionHashes","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryLatestActionHashesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_user_cosmos_public_key/{user_mina_public_key}":{"get":{"tags":["Query"],"summary":"GetUserCosmosPublicKey Queries a list of GetUserCosmosPublicKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserCosmosPublicKey","parameters":[{"type":"string","format":"byte","name":"user_mina_public_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserCosmosPublicKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_user_mina_public_key/{user_cosmos_public_key}":{"get":{"tags":["Query"],"summary":"GetUserMinaPublicKey Queries a list of GetUserMinaPublicKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserMinaPublicKey","parameters":[{"type":"string","format":"byte","name":"user_cosmos_public_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserMinaPublicKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_cosmos_pub_key/{validator_mina_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorCosmosPubKey Queries a list of GetValidatorCosmosPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorCosmosPubKey","parameters":[{"type":"string","format":"byte","name":"validator_mina_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_mina_pub_key/{validator_cosmos_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorMinaPubKey Queries a list of GetValidatorMinaPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorMinaPubKey","parameters":[{"type":"string","format":"byte","name":"validator_cosmos_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_set_with_mina_keys":{"get":{"tags":["Query"],"summary":"GetValidatorSetWithMinaKeys returns the supplied validator set with each validator's registered Mina public key.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorSetWithMinaKeys","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorSetWithMinaKeysResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/key_signing_challenge":{"get":{"tags":["Query"],"summary":"GetKeySigningChallenge returns the state-bound field a Mina wallet must sign.","operationId":"GithubComnode101IopulsarChainQuery_GetKeySigningChallenge","parameters":[{"enum":["KEY_SIGNING_OPERATION_UNSPECIFIED","KEY_SIGNING_OPERATION_REGISTER","KEY_SIGNING_OPERATION_UPDATE"],"type":"string","default":"KEY_SIGNING_OPERATION_UNSPECIFIED","description":" - KEY_SIGNING_OPERATION_UNSPECIFIED: KEY_SIGNING_OPERATION_UNSPECIFIED is invalid for signing requests.\n - KEY_SIGNING_OPERATION_REGISTER: KEY_SIGNING_OPERATION_REGISTER creates the first stable-key association.\n - KEY_SIGNING_OPERATION_UPDATE: KEY_SIGNING_OPERATION_UPDATE replaces an existing Mina key.","name":"operation","in":"query"},{"enum":["ACTOR_TYPE_UNSPECIFIED","ACTOR_TYPE_USER","ACTOR_TYPE_VALIDATOR"],"type":"string","default":"ACTOR_TYPE_UNSPECIFIED","description":" - ACTOR_TYPE_UNSPECIFIED: ACTOR_TYPE_UNSPECIFIED is invalid for key-registry operations.\n - ACTOR_TYPE_USER: ACTOR_TYPE_USER identifies a user account key association.\n - ACTOR_TYPE_VALIDATOR: ACTOR_TYPE_VALIDATOR identifies a validator consensus key association.","name":"actor_type","in":"query"},{"type":"string","format":"byte","name":"cosmos_public_key","in":"query"},{"type":"string","format":"byte","name":"new_mina_public_key","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetKeySigningChallengeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin17","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/smartaccounts/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin22","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.smartaccounts.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/commitments/{validator}":{"get":{"tags":["Query"],"summary":"CommitmentsByValidator lists retained commitments for a validator.","operationId":"GithubComnode101IopulsarChainQuery_CommitmentsByValidator","parameters":[{"type":"string","name":"validator","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryCommitmentsByValidatorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/commitments/{validator}/{commitment_height}":{"get":{"tags":["Query"],"summary":"Commitment returns one retained validator commitment.","operationId":"GithubComnode101IopulsarChainQuery_Commitment","parameters":[{"type":"string","name":"validator","in":"path","required":true},{"type":"string","format":"uint64","name":"commitment_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryCommitmentResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/params":{"get":{"tags":["Query"],"summary":"Params returns module parameters.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin27","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/height/{submission_height}":{"get":{"tags":["Query"],"summary":"ProofsByHeight lists proofs submitted at a height.","operationId":"GithubComnode101IopulsarChainQuery_ProofsByHeight","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofsByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/verification-id/{verification_id}":{"get":{"tags":["Query"],"summary":"ProofByVerificationId resolves the permanent verification request registry.","operationId":"GithubComnode101IopulsarChainQuery_ProofByVerificationId","parameters":[{"type":"string","format":"byte","name":"verification_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"Proof returns a pending or finalized proof by key.","operationId":"GithubComnode101IopulsarChainQuery_Proof","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/results/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"FinalProofResult returns an immutable finalized result.","operationId":"GithubComnode101IopulsarChainQuery_FinalProofResult","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryFinalProofResultResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/tallies/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"ProofTally returns the active tally for a pending proof.","operationId":"GithubComnode101IopulsarChainQuery_ProofTally","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofTallyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/votes/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"VerificationVotes lists effective votes for a proof.","operationId":"GithubComnode101IopulsarChainQuery_VerificationVotes","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryVerificationVotesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/votes/{submission_height}/{index_in_block}/{validator}":{"get":{"tags":["Query"],"summary":"Vote returns one validator's effective vote for a proof.","operationId":"GithubComnode101IopulsarChainQuery_Vote","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true},{"type":"string","name":"validator","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryVoteResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/votepersistence/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin33","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/votepersistence/v1/vote_extensions":{"get":{"tags":["Query"],"summary":"VoteExtensions queries the currently persisted vote extensions.","operationId":"GithubComnode101IopulsarChainQuery_VoteExtensions","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.QueryVoteExtensionsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}}},"definitions":{"cosmos.base.query.v1beta1.PageRequest":{"description":"message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }","type":"object","title":"PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:","properties":{"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.","type":"boolean"},"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.","type":"string","format":"byte"},"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.","type":"string","format":"uint64"},"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.","type":"string","format":"uint64"},"reverse":{"description":"reverse is set to true if results are to be returned in the descending order.","type":"boolean"}}},"cosmos.base.query.v1beta1.PageResponse":{"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 }","type":"object","properties":{"next_key":{"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.","type":"string","format":"byte"},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}},"google.protobuf.Any":{"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{}},"google.rpc.Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"details":{"type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"message":{"type":"string"}}},"pulsarchain.abci.QueryGetValidatorSetWithPowersResponse":{"type":"object","properties":{"validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.common.ValidatorEntry"}}}},"pulsarchain.abci.QueryVoteExtBodyByHeightResponse":{"description":"QueryVoteExtBodyByHeightResponse defines the response for VoteExtBodyByHeight.","type":"object","properties":{"vote_ext_body":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.VoteExtBody"}}},"pulsarchain.bridge.v1.Params":{"description":"Params defines the parameters for the module.","type":"object","properties":{"actions_reduced_root_snapshot_window_size":{"description":"actions_reduced_root_snapshot_window_size is the retained consensus root window.","type":"string","format":"int64"},"confirmation_depth":{"description":"confirmation_depth is the Mina finality depth used by the archive wrapper.","type":"string","format":"int64"},"contract_address":{"description":"contract_address is the Mina bridge contract address.","type":"string"},"max_block_range":{"description":"max_block_range is the maximum Mina height span processed by one request.","type":"string","format":"int64"},"start_block_height":{"description":"start_block_height is the first Mina block indexed by the bridge.","type":"string","format":"int64"}}},"pulsarchain.bridge.v1.QueryActionsReducedRootResponse":{"description":"QueryActionsReducedRootResponse defines the QueryActionsReducedRootResponse message.","type":"object","properties":{"actions_reduced_root":{"type":"string"}}},"pulsarchain.bridge.v1.QueryLatestActionHashesResponse":{"description":"QueryLatestActionHashesResponse defines the QueryLatestActionHashesResponse message.","type":"object","properties":{"action_hashes":{"description":"action_hashes is the ordered canonical hash batch that reconstructs\nthe root transition for the source Cosmos block.","type":"array","items":{"type":"string"}},"action_hashes_cosmos_block_height":{"description":"action_hashes_cosmos_block_height is the Cosmos block height where\nthis query batch was produced.","type":"string","format":"int64"},"latest_fetched_mina_height":{"description":"latest_fetched_mina_height is the inclusive upper Mina cursor of the\ncurrent batch. Together with start_mina_height it defines the consumed\nMina interval (start_mina_height, latest_fetched_mina_height].","type":"string","format":"int64"},"start_mina_height":{"description":"start_mina_height is the exclusive lower Mina cursor of the current batch.","type":"string","format":"int64"}}},"pulsarchain.bridge.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.bridge.v1.Params"}}},"pulsarchain.common.ValidatorEntry":{"type":"object","properties":{"consensus_power":{"type":"string","format":"int64"},"validator_cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.ActorType":{"description":"ActorType identifies the key-registry actor authorized by a signing challenge.\n\n - ACTOR_TYPE_UNSPECIFIED: ACTOR_TYPE_UNSPECIFIED is invalid for key-registry operations.\n - ACTOR_TYPE_USER: ACTOR_TYPE_USER identifies a user account key association.\n - ACTOR_TYPE_VALIDATOR: ACTOR_TYPE_VALIDATOR identifies a validator consensus key association.","type":"string","default":"ACTOR_TYPE_UNSPECIFIED","enum":["ACTOR_TYPE_UNSPECIFIED","ACTOR_TYPE_USER","ACTOR_TYPE_VALIDATOR"]},"pulsarchain.keyregistry.v1.KeySigningOperation":{"description":"KeySigningOperation identifies the key-registry state transition authorized\nby a wallet field signature.\n\n - KEY_SIGNING_OPERATION_UNSPECIFIED: KEY_SIGNING_OPERATION_UNSPECIFIED is invalid for signing requests.\n - KEY_SIGNING_OPERATION_REGISTER: KEY_SIGNING_OPERATION_REGISTER creates the first stable-key association.\n - KEY_SIGNING_OPERATION_UPDATE: KEY_SIGNING_OPERATION_UPDATE replaces an existing Mina key.","type":"string","default":"KEY_SIGNING_OPERATION_UNSPECIFIED","enum":["KEY_SIGNING_OPERATION_UNSPECIFIED","KEY_SIGNING_OPERATION_REGISTER","KEY_SIGNING_OPERATION_UPDATE"]},"pulsarchain.keyregistry.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.keyregistry.v1.QueryGetKeySigningChallengeResponse":{"description":"QueryGetKeySigningChallengeResponse contains the exact field and state version to sign.","type":"object","properties":{"challenge":{"type":"string"},"challenge_bytes":{"type":"string","format":"byte"},"new_key_version":{"type":"string","format":"uint64"},"previous_mina_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetUserCosmosPublicKeyResponse":{"description":"QueryGetUserCosmosPublicKeyResponse defines the QueryGetUserCosmosPublicKeyResponse message.","type":"object","properties":{"user_cosmos_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetUserMinaPublicKeyResponse":{"description":"QueryGetUserMinaPublicKeyResponse defines the QueryGetUserMinaPublicKeyResponse message.","type":"object","properties":{"user_mina_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse":{"description":"QueryGetValidatorCosmosPubKeyResponse defines the QueryGetValidatorCosmosPubKeyResponse message.","type":"object","properties":{"validator_cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse":{"description":"QueryGetValidatorMinaPubKeyResponse defines the QueryGetValidatorMinaPubKeyResponse message.","type":"object","properties":{"validator_mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorSetWithMinaKeysResponse":{"description":"QueryGetValidatorSetWithMinaKeysResponse defines the response for GetValidatorSetWithMinaKeys.","type":"object","properties":{"registered_validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.keyregistry.v1.RegisteredValidatorSetEntry"}}}},"pulsarchain.keyregistry.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.keyregistry.v1.Params"}}},"pulsarchain.keyregistry.v1.RegisteredValidatorSetEntry":{"type":"object","properties":{"consensus_power":{"type":"string","format":"int64"},"validator_cosmos_pub_key":{"type":"string","format":"byte"},"validator_mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.smartaccounts.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.smartaccounts.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.smartaccounts.v1.Params"}}},"pulsarchain.verification.v1.CommitmentEntry":{"description":"CommitmentEntry is a query representation of a retained commitment.","type":"object","properties":{"commitment":{"$ref":"#/definitions/pulsarchain.verification.v1.CommitmentRecord"},"commitment_height":{"type":"string","format":"uint64"},"validator":{"type":"string"}}},"pulsarchain.verification.v1.CommitmentRecord":{"description":"CommitmentRecord stores a validator commitment root.","type":"object","properties":{"commitment":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.FinalProofResult":{"description":"FinalProofResult stores an immutable finalized proof outcome.","type":"object","properties":{"finalized_height":{"type":"string","format":"uint64"},"invalid_voting_power":{"type":"string","format":"int64"},"proof_hash":{"type":"string","format":"byte"},"proof_type":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofType"},"public_inputs_hash":{"type":"string","format":"byte"},"status":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofStatus"},"submission_height":{"type":"string","format":"uint64"},"total_voting_power":{"type":"string","format":"int64"},"valid_voting_power":{"type":"string","format":"int64"},"verification_id":{"type":"string","format":"byte"},"verification_key_hash":{"type":"string","format":"byte"},"voting_power_threshold":{"type":"string","format":"int64"}}},"pulsarchain.verification.v1.Params":{"description":"Params defines the governance-controlled verification module parameters.","type":"object","properties":{"max_proofs_per_block":{"type":"integer","format":"int64"}}},"pulsarchain.verification.v1.ProofKey":{"description":"ProofKey identifies a proof by absolute block height and in-block index.","type":"object","properties":{"index_in_block":{"type":"integer","format":"int64"},"submission_height":{"type":"string","format":"uint64"}}},"pulsarchain.verification.v1.ProofRecord":{"description":"ProofRecord stores the complete descriptor and its chain-derived identity.","type":"object","properties":{"proof_hash":{"type":"string","format":"byte"},"proof_type":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofType"},"public_inputs_hash":{"type":"string","format":"byte"},"verification_id":{"type":"string","format":"byte"},"verification_key_hash":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.ProofStatus":{"description":"ProofStatus is the finalized verification outcome.\n\n - PROOF_STATUS_PENDING: PROOF_STATUS_PENDING is the non-finalized status.\n - PROOF_STATUS_VALID: PROOF_STATUS_VALID means valid voting power exceeded two thirds.\n - PROOF_STATUS_INVALID: PROOF_STATUS_INVALID means invalid voting power exceeded two thirds.\n - PROOF_STATUS_INCONCLUSIVE: PROOF_STATUS_INCONCLUSIVE means neither side reached threshold.","type":"string","default":"PROOF_STATUS_PENDING","enum":["PROOF_STATUS_PENDING","PROOF_STATUS_VALID","PROOF_STATUS_INVALID","PROOF_STATUS_INCONCLUSIVE"]},"pulsarchain.verification.v1.ProofTally":{"description":"ProofTally stores the historical consensus power behind effective votes.","type":"object","properties":{"invalid_voting_power":{"type":"string","format":"int64"},"valid_voting_power":{"type":"string","format":"int64"}}},"pulsarchain.verification.v1.ProofType":{"description":"ProofType selects the verifier family. The exact statement and circuit are\nbound separately by the public-input and verification-key hashes.\n\n - PROOF_TYPE_UNSPECIFIED: PROOF_TYPE_UNSPECIFIED is invalid for proof submission.\n - PROOF_TYPE_MINA_PICKLES: PROOF_TYPE_MINA_PICKLES selects Mina's Pickles proof system.\n - PROOF_TYPE_NOIR_BARRETENBERG: PROOF_TYPE_NOIR_BARRETENBERG selects Noir proofs using Barretenberg.","type":"string","default":"PROOF_TYPE_UNSPECIFIED","enum":["PROOF_TYPE_UNSPECIFIED","PROOF_TYPE_MINA_PICKLES","PROOF_TYPE_NOIR_BARRETENBERG"]},"pulsarchain.verification.v1.QueryCommitmentResponse":{"description":"QueryCommitmentResponse contains one retained commitment.","type":"object","properties":{"commitment":{"$ref":"#/definitions/pulsarchain.verification.v1.CommitmentEntry"}}},"pulsarchain.verification.v1.QueryCommitmentsByValidatorResponse":{"description":"QueryCommitmentsByValidatorResponse contains retained commitments.","type":"object","properties":{"commitments":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.CommitmentEntry"}},"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"pulsarchain.verification.v1.QueryFinalProofResultResponse":{"description":"QueryFinalProofResultResponse contains an immutable proof result.","type":"object","properties":{"final_result":{"$ref":"#/definitions/pulsarchain.verification.v1.FinalProofResult"},"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"}}},"pulsarchain.verification.v1.QueryParamsResponse":{"description":"QueryParamsResponse contains verification parameters.","type":"object","properties":{"params":{"$ref":"#/definitions/pulsarchain.verification.v1.Params"}}},"pulsarchain.verification.v1.QueryProofResponse":{"description":"QueryProofResponse contains either pending or finalized proof state.","type":"object","properties":{"final_result":{"$ref":"#/definitions/pulsarchain.verification.v1.FinalProofResult"},"pending":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofRecord"},"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"}}},"pulsarchain.verification.v1.QueryProofTallyResponse":{"description":"QueryProofTallyResponse contains a pending proof tally.","type":"object","properties":{"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"},"tally":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofTally"}}},"pulsarchain.verification.v1.QueryProofsByHeightResponse":{"description":"QueryProofsByHeightResponse contains a page of proofs.","type":"object","properties":{"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"proofs":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}}}},"pulsarchain.verification.v1.QueryVerificationVotesResponse":{"description":"QueryVerificationVotesResponse contains effective votes.","type":"object","properties":{"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"votes":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.VerificationVoteEntry"}}}},"pulsarchain.verification.v1.QueryVoteResponse":{"description":"QueryVoteResponse contains one effective vote.","type":"object","properties":{"vote":{"$ref":"#/definitions/pulsarchain.verification.v1.VerificationVoteEntry"}}},"pulsarchain.verification.v1.VerificationVoteEntry":{"description":"VerificationVoteEntry is a query representation of an effective vote.","type":"object","properties":{"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"},"state":{"$ref":"#/definitions/pulsarchain.verification.v1.VoteState"},"validator":{"type":"string"}}},"pulsarchain.verification.v1.VoteState":{"description":"VoteState tracks a validator's effective vote.\n\n - VOTE_STATE_NONE: VOTE_STATE_NONE means the validator has not voted.\n - VOTE_STATE_TRUE: VOTE_STATE_TRUE is an effective valid vote.\n - VOTE_STATE_FALSE: VOTE_STATE_FALSE is an effective invalid vote.\n - VOTE_STATE_EQUIVOCATED: VOTE_STATE_EQUIVOCATED excludes conflicting votes from the tally.","type":"string","default":"VOTE_STATE_NONE","enum":["VOTE_STATE_NONE","VOTE_STATE_TRUE","VOTE_STATE_FALSE","VOTE_STATE_EQUIVOCATED"]},"pulsarchain.votepersistence.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.votepersistence.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.votepersistence.v1.Params"}}},"pulsarchain.votepersistence.v1.QueryVoteExtensionsResponse":{"description":"QueryVoteExtensionsResponse defines the QueryVoteExtensionsResponse message.","type":"object","properties":{"persisted_vote_extensions_block_height":{"description":"persisted_vote_extensions_block_height is the signed source/current state\nheight. For vote extensions produced at height N, this value is N-2.","type":"string","format":"int64"},"query_block_height":{"type":"string","format":"int64"},"vote_extensions":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.votepersistence.v1.StoredVoteExtension"}}}},"pulsarchain.votepersistence.v1.StoredVoteExtension":{"description":"StoredVoteExtension defines a persisted Mina validator vote extension.","type":"object","properties":{"mina_public_key":{"type":"string","format":"byte"},"vote_extension":{"type":"string","format":"byte"}}},"pulsarchain.votepersistence.v1.VoteExtBody":{"description":"VoteExtBody defines the VoteExtBody message.","type":"object","properties":{"actions_reduced_root":{"type":"string","format":"byte"},"current_block_height":{"type":"string","format":"int64"},"current_state_root":{"type":"string","format":"byte"},"next_validator_set_hash":{"type":"string","format":"byte"}}}},"tags":[{"name":"VerificationService"},{"name":"Query"},{"name":"Msg"}]} \ No newline at end of file +{"id":"github.com/node101-io/pulsar-chain","consumes":["application/json"],"produces":["application/json"],"swagger":"2.0","info":{"description":"Chain github.com/node101-io/pulsar-chain REST API","title":"HTTP API Console","contact":{"name":"github.com/node101-io/pulsar-chain"},"version":"version not set"},"paths":{"/node101-io/pulsar-chain/abci/v1/validator_set_with_powers/{block_height}":{"get":{"tags":["Query"],"operationId":"GithubComnode101IopulsarChainQuery_GetValidatorSetWithPowers","parameters":[{"type":"string","format":"int64","name":"block_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.abci.QueryGetValidatorSetWithPowersResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/abci/v1/vote_ext_body_by_height/{vote_extension_height}":{"get":{"tags":["Query"],"summary":"VoteExtBodyByHeight queries the vote extension body for a vote-extension\nconsensus height.","operationId":"GithubComnode101IopulsarChainQuery_VoteExtBodyByHeight","parameters":[{"type":"string","format":"int64","description":"vote_extension_height is the consensus height N where the vote extension is\nproduced. The returned body signs the transition from state N-2 to state N-1.","name":"vote_extension_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.abci.QueryVoteExtBodyByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/actions_reduced_root":{"get":{"tags":["Query"],"summary":"ActionsReducedRoot Queries a list of ActionsReducedRoot items.","operationId":"GithubComnode101IopulsarChainQuery_ActionsReducedRoot","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryActionsReducedRootResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/latest_action_hashes":{"get":{"tags":["Query"],"summary":"LatestActionHashes Queries a list of LatestActionHashes items.","operationId":"GithubComnode101IopulsarChainQuery_LatestActionHashes","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryLatestActionHashesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_user_cosmos_public_key/{user_mina_public_key}":{"get":{"tags":["Query"],"summary":"GetUserCosmosPublicKey Queries a list of GetUserCosmosPublicKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserCosmosPublicKey","parameters":[{"type":"string","format":"byte","name":"user_mina_public_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserCosmosPublicKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_user_mina_public_key/{user_cosmos_public_key}":{"get":{"tags":["Query"],"summary":"GetUserMinaPublicKey Queries a list of GetUserMinaPublicKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserMinaPublicKey","parameters":[{"type":"string","format":"byte","name":"user_cosmos_public_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserMinaPublicKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_cosmos_pub_key/{validator_mina_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorCosmosPubKey Queries a list of GetValidatorCosmosPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorCosmosPubKey","parameters":[{"type":"string","format":"byte","name":"validator_mina_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_mina_pub_key/{validator_cosmos_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorMinaPubKey Queries a list of GetValidatorMinaPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorMinaPubKey","parameters":[{"type":"string","format":"byte","name":"validator_cosmos_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_set_with_mina_keys":{"get":{"tags":["Query"],"summary":"GetValidatorSetWithMinaKeys returns the supplied validator set with each validator's registered Mina public key.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorSetWithMinaKeys","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorSetWithMinaKeysResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/key_signing_challenge":{"get":{"tags":["Query"],"summary":"GetKeySigningChallenge returns the state-bound field a Mina wallet must sign.","operationId":"GithubComnode101IopulsarChainQuery_GetKeySigningChallenge","parameters":[{"enum":["KEY_SIGNING_OPERATION_UNSPECIFIED","KEY_SIGNING_OPERATION_REGISTER","KEY_SIGNING_OPERATION_UPDATE"],"type":"string","default":"KEY_SIGNING_OPERATION_UNSPECIFIED","description":" - KEY_SIGNING_OPERATION_UNSPECIFIED: KEY_SIGNING_OPERATION_UNSPECIFIED is invalid for signing requests.\n - KEY_SIGNING_OPERATION_REGISTER: KEY_SIGNING_OPERATION_REGISTER creates the first stable-key association.\n - KEY_SIGNING_OPERATION_UPDATE: KEY_SIGNING_OPERATION_UPDATE replaces an existing Mina key.","name":"operation","in":"query"},{"enum":["ACTOR_TYPE_UNSPECIFIED","ACTOR_TYPE_USER","ACTOR_TYPE_VALIDATOR"],"type":"string","default":"ACTOR_TYPE_UNSPECIFIED","description":" - ACTOR_TYPE_UNSPECIFIED: ACTOR_TYPE_UNSPECIFIED is invalid for key-registry operations.\n - ACTOR_TYPE_USER: ACTOR_TYPE_USER identifies a user account key association.\n - ACTOR_TYPE_VALIDATOR: ACTOR_TYPE_VALIDATOR identifies a validator consensus key association.","name":"actor_type","in":"query"},{"type":"string","format":"byte","name":"cosmos_public_key","in":"query"},{"type":"string","format":"byte","name":"new_mina_public_key","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetKeySigningChallengeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin17","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/smartaccounts/v1/get_session_keys_by_identity":{"get":{"tags":["Query"],"summary":"GetSessionKeysByIdentity Queries a list of GetSessionKeysByIdentity items.","operationId":"GithubComnode101IopulsarChainQuery_GetSessionKeysByIdentity","parameters":[{"type":"string","format":"byte","name":"identity","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.smartaccounts.v1.QueryGetSessionKeysByIdentityResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/smartaccounts/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin22","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.smartaccounts.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/commitments/{validator}":{"get":{"tags":["Query"],"summary":"CommitmentsByValidator lists retained commitments for a validator.","operationId":"GithubComnode101IopulsarChainQuery_CommitmentsByValidator","parameters":[{"type":"string","name":"validator","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryCommitmentsByValidatorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/commitments/{validator}/{commitment_height}":{"get":{"tags":["Query"],"summary":"Commitment returns one retained validator commitment.","operationId":"GithubComnode101IopulsarChainQuery_Commitment","parameters":[{"type":"string","name":"validator","in":"path","required":true},{"type":"string","format":"uint64","name":"commitment_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryCommitmentResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/params":{"get":{"tags":["Query"],"summary":"Params returns module parameters.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin27","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/height/{submission_height}":{"get":{"tags":["Query"],"summary":"ProofsByHeight lists proofs submitted at a height.","operationId":"GithubComnode101IopulsarChainQuery_ProofsByHeight","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofsByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/verification-id/{verification_id}":{"get":{"tags":["Query"],"summary":"ProofByVerificationId resolves the permanent verification request registry.","operationId":"GithubComnode101IopulsarChainQuery_ProofByVerificationId","parameters":[{"type":"string","format":"byte","name":"verification_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"Proof returns a pending or finalized proof by key.","operationId":"GithubComnode101IopulsarChainQuery_Proof","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/results/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"FinalProofResult returns an immutable finalized result.","operationId":"GithubComnode101IopulsarChainQuery_FinalProofResult","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryFinalProofResultResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/tallies/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"ProofTally returns the active tally for a pending proof.","operationId":"GithubComnode101IopulsarChainQuery_ProofTally","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofTallyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/votes/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"VerificationVotes lists effective votes for a proof.","operationId":"GithubComnode101IopulsarChainQuery_VerificationVotes","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryVerificationVotesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/votes/{submission_height}/{index_in_block}/{validator}":{"get":{"tags":["Query"],"summary":"Vote returns one validator's effective vote for a proof.","operationId":"GithubComnode101IopulsarChainQuery_Vote","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true},{"type":"string","name":"validator","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryVoteResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/votepersistence/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin33","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/votepersistence/v1/vote_extensions":{"get":{"tags":["Query"],"summary":"VoteExtensions queries the currently persisted vote extensions.","operationId":"GithubComnode101IopulsarChainQuery_VoteExtensions","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.QueryVoteExtensionsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}}},"definitions":{"cosmos.base.query.v1beta1.PageRequest":{"description":"message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }","type":"object","title":"PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:","properties":{"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.","type":"boolean"},"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.","type":"string","format":"byte"},"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.","type":"string","format":"uint64"},"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.","type":"string","format":"uint64"},"reverse":{"description":"reverse is set to true if results are to be returned in the descending order.","type":"boolean"}}},"cosmos.base.query.v1beta1.PageResponse":{"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 }","type":"object","properties":{"next_key":{"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.","type":"string","format":"byte"},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}},"google.protobuf.Any":{"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{}},"google.rpc.Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"details":{"type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"message":{"type":"string"}}},"pulsarchain.abci.QueryGetValidatorSetWithPowersResponse":{"type":"object","properties":{"validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.common.ValidatorEntry"}}}},"pulsarchain.abci.QueryVoteExtBodyByHeightResponse":{"description":"QueryVoteExtBodyByHeightResponse defines the response for VoteExtBodyByHeight.","type":"object","properties":{"vote_ext_body":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.VoteExtBody"}}},"pulsarchain.bridge.v1.Params":{"description":"Params defines the parameters for the module.","type":"object","properties":{"actions_reduced_root_snapshot_window_size":{"description":"actions_reduced_root_snapshot_window_size is the retained consensus root window.","type":"string","format":"int64"},"confirmation_depth":{"description":"confirmation_depth is the Mina finality depth used by the archive wrapper.","type":"string","format":"int64"},"contract_address":{"description":"contract_address is the Mina bridge contract address.","type":"string"},"max_block_range":{"description":"max_block_range is the maximum Mina height span processed by one request.","type":"string","format":"int64"},"start_block_height":{"description":"start_block_height is the first Mina block indexed by the bridge.","type":"string","format":"int64"}}},"pulsarchain.bridge.v1.QueryActionsReducedRootResponse":{"description":"QueryActionsReducedRootResponse defines the QueryActionsReducedRootResponse message.","type":"object","properties":{"actions_reduced_root":{"type":"string"}}},"pulsarchain.bridge.v1.QueryLatestActionHashesResponse":{"description":"QueryLatestActionHashesResponse defines the QueryLatestActionHashesResponse message.","type":"object","properties":{"action_hashes":{"description":"action_hashes is the ordered canonical hash batch that reconstructs\nthe root transition for the source Cosmos block.","type":"array","items":{"type":"string"}},"action_hashes_cosmos_block_height":{"description":"action_hashes_cosmos_block_height is the Cosmos block height where\nthis query batch was produced.","type":"string","format":"int64"},"latest_fetched_mina_height":{"description":"latest_fetched_mina_height is the inclusive upper Mina cursor of the\ncurrent batch. Together with start_mina_height it defines the consumed\nMina interval (start_mina_height, latest_fetched_mina_height].","type":"string","format":"int64"},"start_mina_height":{"description":"start_mina_height is the exclusive lower Mina cursor of the current batch.","type":"string","format":"int64"}}},"pulsarchain.bridge.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.bridge.v1.Params"}}},"pulsarchain.common.ValidatorEntry":{"type":"object","properties":{"consensus_power":{"type":"string","format":"int64"},"validator_cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.ActorType":{"description":"ActorType identifies the key-registry actor authorized by a signing challenge.\n\n - ACTOR_TYPE_UNSPECIFIED: ACTOR_TYPE_UNSPECIFIED is invalid for key-registry operations.\n - ACTOR_TYPE_USER: ACTOR_TYPE_USER identifies a user account key association.\n - ACTOR_TYPE_VALIDATOR: ACTOR_TYPE_VALIDATOR identifies a validator consensus key association.","type":"string","default":"ACTOR_TYPE_UNSPECIFIED","enum":["ACTOR_TYPE_UNSPECIFIED","ACTOR_TYPE_USER","ACTOR_TYPE_VALIDATOR"]},"pulsarchain.keyregistry.v1.KeySigningOperation":{"description":"KeySigningOperation identifies the key-registry state transition authorized\nby a wallet field signature.\n\n - KEY_SIGNING_OPERATION_UNSPECIFIED: KEY_SIGNING_OPERATION_UNSPECIFIED is invalid for signing requests.\n - KEY_SIGNING_OPERATION_REGISTER: KEY_SIGNING_OPERATION_REGISTER creates the first stable-key association.\n - KEY_SIGNING_OPERATION_UPDATE: KEY_SIGNING_OPERATION_UPDATE replaces an existing Mina key.","type":"string","default":"KEY_SIGNING_OPERATION_UNSPECIFIED","enum":["KEY_SIGNING_OPERATION_UNSPECIFIED","KEY_SIGNING_OPERATION_REGISTER","KEY_SIGNING_OPERATION_UPDATE"]},"pulsarchain.keyregistry.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.keyregistry.v1.QueryGetKeySigningChallengeResponse":{"description":"QueryGetKeySigningChallengeResponse contains the exact field and state version to sign.","type":"object","properties":{"challenge":{"type":"string"},"challenge_bytes":{"type":"string","format":"byte"},"new_key_version":{"type":"string","format":"uint64"},"previous_mina_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetUserCosmosPublicKeyResponse":{"description":"QueryGetUserCosmosPublicKeyResponse defines the QueryGetUserCosmosPublicKeyResponse message.","type":"object","properties":{"user_cosmos_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetUserMinaPublicKeyResponse":{"description":"QueryGetUserMinaPublicKeyResponse defines the QueryGetUserMinaPublicKeyResponse message.","type":"object","properties":{"user_mina_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse":{"description":"QueryGetValidatorCosmosPubKeyResponse defines the QueryGetValidatorCosmosPubKeyResponse message.","type":"object","properties":{"validator_cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse":{"description":"QueryGetValidatorMinaPubKeyResponse defines the QueryGetValidatorMinaPubKeyResponse message.","type":"object","properties":{"validator_mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorSetWithMinaKeysResponse":{"description":"QueryGetValidatorSetWithMinaKeysResponse defines the response for GetValidatorSetWithMinaKeys.","type":"object","properties":{"registered_validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.keyregistry.v1.RegisteredValidatorSetEntry"}}}},"pulsarchain.keyregistry.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.keyregistry.v1.Params"}}},"pulsarchain.keyregistry.v1.RegisteredValidatorSetEntry":{"type":"object","properties":{"consensus_power":{"type":"string","format":"int64"},"validator_cosmos_pub_key":{"type":"string","format":"byte"},"validator_mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.smartaccounts.v1.Params":{"description":"Params defines the parameters for the module.","type":"object","properties":{"verification_key_hash":{"type":"string","format":"byte"}}},"pulsarchain.smartaccounts.v1.QueryGetSessionKeysByIdentityResponse":{"description":"QueryGetSessionKeysByIdentityResponse defines the QueryGetSessionKeysByIdentityResponse message.","type":"object","properties":{"account_address":{"type":"string","format":"byte"},"session_keys":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.smartaccounts.v1.SessionKey"}}}},"pulsarchain.smartaccounts.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.smartaccounts.v1.Params"}}},"pulsarchain.smartaccounts.v1.SessionKey":{"description":"SessionKey defines an Ed25519 public key and its exclusive expiration height.","type":"object","properties":{"expires_at_height":{"type":"string","format":"uint64"},"public_key":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.CommitmentEntry":{"description":"CommitmentEntry is a query representation of a retained commitment.","type":"object","properties":{"commitment":{"$ref":"#/definitions/pulsarchain.verification.v1.CommitmentRecord"},"commitment_height":{"type":"string","format":"uint64"},"validator":{"type":"string"}}},"pulsarchain.verification.v1.CommitmentRecord":{"description":"CommitmentRecord stores a validator commitment root.","type":"object","properties":{"commitment":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.FinalProofResult":{"description":"FinalProofResult stores an immutable finalized proof outcome.","type":"object","properties":{"finalized_height":{"type":"string","format":"uint64"},"invalid_voting_power":{"type":"string","format":"int64"},"proof_hash":{"type":"string","format":"byte"},"proof_type":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofType"},"public_inputs_hash":{"type":"string","format":"byte"},"status":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofStatus"},"submission_height":{"type":"string","format":"uint64"},"total_voting_power":{"type":"string","format":"int64"},"valid_voting_power":{"type":"string","format":"int64"},"verification_id":{"type":"string","format":"byte"},"verification_key_hash":{"type":"string","format":"byte"},"voting_power_threshold":{"type":"string","format":"int64"}}},"pulsarchain.verification.v1.Params":{"description":"Params defines the governance-controlled verification module parameters.","type":"object","properties":{"max_proofs_per_block":{"type":"integer","format":"int64"}}},"pulsarchain.verification.v1.ProofKey":{"description":"ProofKey identifies a proof by absolute block height and in-block index.","type":"object","properties":{"index_in_block":{"type":"integer","format":"int64"},"submission_height":{"type":"string","format":"uint64"}}},"pulsarchain.verification.v1.ProofRecord":{"description":"ProofRecord stores the complete descriptor and its chain-derived identity.","type":"object","properties":{"proof_hash":{"type":"string","format":"byte"},"proof_type":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofType"},"public_inputs_hash":{"type":"string","format":"byte"},"verification_id":{"type":"string","format":"byte"},"verification_key_hash":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.ProofStatus":{"description":"ProofStatus is the finalized verification outcome.\n\n - PROOF_STATUS_PENDING: PROOF_STATUS_PENDING is the non-finalized status.\n - PROOF_STATUS_VALID: PROOF_STATUS_VALID means valid voting power exceeded two thirds.\n - PROOF_STATUS_INVALID: PROOF_STATUS_INVALID means invalid voting power exceeded two thirds.\n - PROOF_STATUS_INCONCLUSIVE: PROOF_STATUS_INCONCLUSIVE means neither side reached threshold.","type":"string","default":"PROOF_STATUS_PENDING","enum":["PROOF_STATUS_PENDING","PROOF_STATUS_VALID","PROOF_STATUS_INVALID","PROOF_STATUS_INCONCLUSIVE"]},"pulsarchain.verification.v1.ProofTally":{"description":"ProofTally stores the historical consensus power behind effective votes.","type":"object","properties":{"invalid_voting_power":{"type":"string","format":"int64"},"valid_voting_power":{"type":"string","format":"int64"}}},"pulsarchain.verification.v1.ProofType":{"description":"ProofType selects the verifier family. The exact statement and circuit are\nbound separately by the public-input and verification-key hashes.\n\n - PROOF_TYPE_UNSPECIFIED: PROOF_TYPE_UNSPECIFIED is invalid for proof submission.\n - PROOF_TYPE_MINA_PICKLES: PROOF_TYPE_MINA_PICKLES selects Mina's Pickles proof system.\n - PROOF_TYPE_NOIR_BARRETENBERG: PROOF_TYPE_NOIR_BARRETENBERG selects Noir proofs using Barretenberg.","type":"string","default":"PROOF_TYPE_UNSPECIFIED","enum":["PROOF_TYPE_UNSPECIFIED","PROOF_TYPE_MINA_PICKLES","PROOF_TYPE_NOIR_BARRETENBERG"]},"pulsarchain.verification.v1.QueryCommitmentResponse":{"description":"QueryCommitmentResponse contains one retained commitment.","type":"object","properties":{"commitment":{"$ref":"#/definitions/pulsarchain.verification.v1.CommitmentEntry"}}},"pulsarchain.verification.v1.QueryCommitmentsByValidatorResponse":{"description":"QueryCommitmentsByValidatorResponse contains retained commitments.","type":"object","properties":{"commitments":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.CommitmentEntry"}},"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"pulsarchain.verification.v1.QueryFinalProofResultResponse":{"description":"QueryFinalProofResultResponse contains an immutable proof result.","type":"object","properties":{"final_result":{"$ref":"#/definitions/pulsarchain.verification.v1.FinalProofResult"},"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"}}},"pulsarchain.verification.v1.QueryParamsResponse":{"description":"QueryParamsResponse contains verification parameters.","type":"object","properties":{"params":{"$ref":"#/definitions/pulsarchain.verification.v1.Params"}}},"pulsarchain.verification.v1.QueryProofResponse":{"description":"QueryProofResponse contains either pending or finalized proof state.","type":"object","properties":{"final_result":{"$ref":"#/definitions/pulsarchain.verification.v1.FinalProofResult"},"pending":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofRecord"},"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"}}},"pulsarchain.verification.v1.QueryProofTallyResponse":{"description":"QueryProofTallyResponse contains a pending proof tally.","type":"object","properties":{"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"},"tally":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofTally"}}},"pulsarchain.verification.v1.QueryProofsByHeightResponse":{"description":"QueryProofsByHeightResponse contains a page of proofs.","type":"object","properties":{"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"proofs":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}}}},"pulsarchain.verification.v1.QueryVerificationVotesResponse":{"description":"QueryVerificationVotesResponse contains effective votes.","type":"object","properties":{"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"votes":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.VerificationVoteEntry"}}}},"pulsarchain.verification.v1.QueryVoteResponse":{"description":"QueryVoteResponse contains one effective vote.","type":"object","properties":{"vote":{"$ref":"#/definitions/pulsarchain.verification.v1.VerificationVoteEntry"}}},"pulsarchain.verification.v1.VerificationVoteEntry":{"description":"VerificationVoteEntry is a query representation of an effective vote.","type":"object","properties":{"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"},"state":{"$ref":"#/definitions/pulsarchain.verification.v1.VoteState"},"validator":{"type":"string"}}},"pulsarchain.verification.v1.VoteState":{"description":"VoteState tracks a validator's effective vote.\n\n - VOTE_STATE_NONE: VOTE_STATE_NONE means the validator has not voted.\n - VOTE_STATE_TRUE: VOTE_STATE_TRUE is an effective valid vote.\n - VOTE_STATE_FALSE: VOTE_STATE_FALSE is an effective invalid vote.\n - VOTE_STATE_EQUIVOCATED: VOTE_STATE_EQUIVOCATED excludes conflicting votes from the tally.","type":"string","default":"VOTE_STATE_NONE","enum":["VOTE_STATE_NONE","VOTE_STATE_TRUE","VOTE_STATE_FALSE","VOTE_STATE_EQUIVOCATED"]},"pulsarchain.votepersistence.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.votepersistence.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.votepersistence.v1.Params"}}},"pulsarchain.votepersistence.v1.QueryVoteExtensionsResponse":{"description":"QueryVoteExtensionsResponse defines the QueryVoteExtensionsResponse message.","type":"object","properties":{"persisted_vote_extensions_block_height":{"description":"persisted_vote_extensions_block_height is the signed source/current state\nheight. For vote extensions produced at height N, this value is N-2.","type":"string","format":"int64"},"query_block_height":{"type":"string","format":"int64"},"vote_extensions":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.votepersistence.v1.StoredVoteExtension"}}}},"pulsarchain.votepersistence.v1.StoredVoteExtension":{"description":"StoredVoteExtension defines a persisted Mina validator vote extension.","type":"object","properties":{"mina_public_key":{"type":"string","format":"byte"},"vote_extension":{"type":"string","format":"byte"}}},"pulsarchain.votepersistence.v1.VoteExtBody":{"description":"VoteExtBody defines the VoteExtBody message.","type":"object","properties":{"actions_reduced_root":{"type":"string","format":"byte"},"current_block_height":{"type":"string","format":"int64"},"current_state_root":{"type":"string","format":"byte"},"next_validator_set_hash":{"type":"string","format":"byte"}}}},"tags":[{"name":"VerificationService"},{"name":"Query"},{"name":"Msg"}]} \ No newline at end of file diff --git a/proto/pulsarchain/smartaccounts/v1/query.proto b/proto/pulsarchain/smartaccounts/v1/query.proto index 573f89ce..af511b54 100644 --- a/proto/pulsarchain/smartaccounts/v1/query.proto +++ b/proto/pulsarchain/smartaccounts/v1/query.proto @@ -1,4 +1,5 @@ syntax = "proto3"; + package pulsarchain.smartaccounts.v1; import "amino/amino.proto"; @@ -6,6 +7,7 @@ import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "pulsarchain/smartaccounts/v1/params.proto"; +import "pulsarchain/smartaccounts/v1/types.proto"; option go_package = "github.com/node101-io/pulsar-chain/x/smartaccounts/types"; @@ -15,6 +17,11 @@ service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/node101-io/pulsar-chain/smartaccounts/v1/params"; } + + // GetSessionKeysByIdentity Queries a list of GetSessionKeysByIdentity items. + rpc GetSessionKeysByIdentity(QueryGetSessionKeysByIdentityRequest) returns (QueryGetSessionKeysByIdentityResponse) { + option (google.api.http).get = "/node101-io/pulsar-chain/smartaccounts/v1/get_session_keys_by_identity"; + } } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -28,3 +35,14 @@ message QueryParamsResponse { (amino.dont_omitempty) = true ]; } + +// QueryGetSessionKeysByIdentityRequest defines the QueryGetSessionKeysByIdentityRequest message. +message QueryGetSessionKeysByIdentityRequest { + bytes identity = 1; +} + +// QueryGetSessionKeysByIdentityResponse defines the QueryGetSessionKeysByIdentityResponse message. +message QueryGetSessionKeysByIdentityResponse { + bytes account_address = 1; + repeated SessionKey session_keys = 2; +} diff --git a/x/smartaccounts/keeper/query_get_session_keys_by_identity.go b/x/smartaccounts/keeper/query_get_session_keys_by_identity.go new file mode 100644 index 00000000..c82ccc47 --- /dev/null +++ b/x/smartaccounts/keeper/query_get_session_keys_by_identity.go @@ -0,0 +1,50 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (q queryServer) GetSessionKeysByIdentity(ctx context.Context, req *types.QueryGetSessionKeysByIdentityRequest) (*types.QueryGetSessionKeysByIdentityResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + if len(req.Identity) == 0 { + return nil, status.Error(codes.InvalidArgument, "empty identity") + } + + if len(req.Identity) != types.IdentitySize { + return nil, status.Error(codes.InvalidArgument, "invalid identity size") + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + + exists, err := q.k.HasSmartAccount(sdkCtx, req.Identity) + if err != nil { + return nil, status.Error(codes.Internal, "internal error") + } + + if !exists { + return nil, status.Error(codes.NotFound, "identity not found") + } + + acc, err := q.k.smartAccounts.Get(sdkCtx, req.Identity) + if err != nil { + return nil, status.Error(codes.Internal, "internal error") + } + + var sessionKeys []*types.SessionKey + for _, key := range acc.SessionKeys { + sessionKeys = append(sessionKeys, &key) + } + + return &types.QueryGetSessionKeysByIdentityResponse{ + AccountAddress: acc.AccountAddress, + SessionKeys: sessionKeys, + }, nil +} diff --git a/x/smartaccounts/module/autocli.go b/x/smartaccounts/module/autocli.go index eb1597ee..ac17a8a1 100644 --- a/x/smartaccounts/module/autocli.go +++ b/x/smartaccounts/module/autocli.go @@ -17,6 +17,12 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Use: "params", Short: "Shows the parameters of the module", }, + { + RpcMethod: "GetSessionKeysByIdentity", + Use: "get-session-keys-by-identity ", + Short: "Query GetSessionKeysByIdentity", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{}, + }, }, }, Tx: &autocliv1.ServiceCommandDescriptor{ diff --git a/x/smartaccounts/types/query.pb.go b/x/smartaccounts/types/query.pb.go index 408ce051..6c549cf0 100644 --- a/x/smartaccounts/types/query.pb.go +++ b/x/smartaccounts/types/query.pb.go @@ -6,7 +6,7 @@ package types import ( context "context" fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/query" + query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -114,9 +114,125 @@ func (m *QueryParamsResponse) GetParams() Params { return Params{} } +// QueryGetSessionKeysByIdentityRequest defines the QueryGetSessionKeysByIdentityRequest message. +type QueryGetSessionKeysByIdentityRequest struct { + Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryGetSessionKeysByIdentityRequest) Reset() { *m = QueryGetSessionKeysByIdentityRequest{} } +func (m *QueryGetSessionKeysByIdentityRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetSessionKeysByIdentityRequest) ProtoMessage() {} +func (*QueryGetSessionKeysByIdentityRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_a3b4a6c0fe689fae, []int{2} +} +func (m *QueryGetSessionKeysByIdentityRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetSessionKeysByIdentityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetSessionKeysByIdentityRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGetSessionKeysByIdentityRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetSessionKeysByIdentityRequest.Merge(m, src) +} +func (m *QueryGetSessionKeysByIdentityRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetSessionKeysByIdentityRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetSessionKeysByIdentityRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetSessionKeysByIdentityRequest proto.InternalMessageInfo + +func (m *QueryGetSessionKeysByIdentityRequest) GetIdentity() []byte { + if m != nil { + return m.Identity + } + return nil +} + +func (m *QueryGetSessionKeysByIdentityRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryGetSessionKeysByIdentityResponse defines the QueryGetSessionKeysByIdentityResponse message. +type QueryGetSessionKeysByIdentityResponse struct { + AccountAddress []byte `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + SessionKeys []*SessionKey `protobuf:"bytes,2,rep,name=session_keys,json=sessionKeys,proto3" json:"session_keys,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryGetSessionKeysByIdentityResponse) Reset() { *m = QueryGetSessionKeysByIdentityResponse{} } +func (m *QueryGetSessionKeysByIdentityResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetSessionKeysByIdentityResponse) ProtoMessage() {} +func (*QueryGetSessionKeysByIdentityResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_a3b4a6c0fe689fae, []int{3} +} +func (m *QueryGetSessionKeysByIdentityResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetSessionKeysByIdentityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetSessionKeysByIdentityResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGetSessionKeysByIdentityResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetSessionKeysByIdentityResponse.Merge(m, src) +} +func (m *QueryGetSessionKeysByIdentityResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetSessionKeysByIdentityResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetSessionKeysByIdentityResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetSessionKeysByIdentityResponse proto.InternalMessageInfo + +func (m *QueryGetSessionKeysByIdentityResponse) GetAccountAddress() []byte { + if m != nil { + return m.AccountAddress + } + return nil +} + +func (m *QueryGetSessionKeysByIdentityResponse) GetSessionKeys() []*SessionKey { + if m != nil { + return m.SessionKeys + } + return nil +} + +func (m *QueryGetSessionKeysByIdentityResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "pulsarchain.smartaccounts.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "pulsarchain.smartaccounts.v1.QueryParamsResponse") + proto.RegisterType((*QueryGetSessionKeysByIdentityRequest)(nil), "pulsarchain.smartaccounts.v1.QueryGetSessionKeysByIdentityRequest") + proto.RegisterType((*QueryGetSessionKeysByIdentityResponse)(nil), "pulsarchain.smartaccounts.v1.QueryGetSessionKeysByIdentityResponse") } func init() { @@ -124,29 +240,41 @@ func init() { } var fileDescriptor_a3b4a6c0fe689fae = []byte{ - // 337 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0x31, 0x4b, 0xc3, 0x40, - 0x18, 0x86, 0x73, 0x82, 0x05, 0xe3, 0x64, 0xec, 0x20, 0xa5, 0x44, 0x29, 0x0e, 0xb5, 0xd0, 0x5c, - 0xaf, 0x2e, 0x9d, 0xbb, 0xb8, 0x6a, 0x47, 0x07, 0xe1, 0x4b, 0x3c, 0xd2, 0x83, 0xe6, 0xbe, 0x6b, - 0xee, 0x52, 0xec, 0xea, 0x2f, 0x10, 0xfc, 0x11, 0x3a, 0xea, 0xbf, 0xe8, 0x58, 0x70, 0x71, 0x12, - 0x69, 0x04, 0xff, 0x86, 0x34, 0x97, 0xc1, 0x2a, 0x06, 0x5c, 0xc2, 0xc7, 0x9b, 0xf7, 0x79, 0xef, - 0xfd, 0xee, 0xdc, 0xb6, 0xca, 0x26, 0x1a, 0xd2, 0x68, 0x0c, 0x42, 0x52, 0x9d, 0x40, 0x6a, 0x20, - 0x8a, 0x30, 0x93, 0x46, 0xd3, 0x19, 0xa3, 0xd3, 0x8c, 0xa7, 0xf3, 0x40, 0xa5, 0x68, 0xd0, 0x6b, - 0x7e, 0x73, 0x06, 0x1b, 0xce, 0x60, 0xc6, 0x1a, 0x7b, 0x90, 0x08, 0x89, 0xb4, 0xf8, 0x5a, 0xa0, - 0xd1, 0x89, 0x50, 0x27, 0xa8, 0x69, 0x08, 0x9a, 0xdb, 0x24, 0x3a, 0x63, 0x21, 0x37, 0xc0, 0xa8, - 0x82, 0x58, 0x48, 0x30, 0x02, 0x65, 0xe9, 0xad, 0xc7, 0x18, 0x63, 0x31, 0xd2, 0xf5, 0x54, 0xaa, - 0xcd, 0x18, 0x31, 0x9e, 0x70, 0x0a, 0x4a, 0x50, 0x90, 0x12, 0x4d, 0x81, 0xe8, 0xf2, 0xef, 0x49, - 0x65, 0x75, 0x05, 0x29, 0x24, 0xa5, 0xb5, 0x55, 0x77, 0xbd, 0x8b, 0x75, 0x81, 0xf3, 0x42, 0x1c, - 0xf1, 0x69, 0xc6, 0xb5, 0x69, 0x5d, 0xb9, 0xfb, 0x1b, 0xaa, 0x56, 0x28, 0x35, 0xf7, 0xce, 0xdc, - 0x9a, 0x85, 0x0f, 0xc8, 0x11, 0x69, 0xef, 0xf6, 0x8f, 0x83, 0xaa, 0xcd, 0x03, 0x4b, 0x0f, 0x77, - 0x16, 0x6f, 0x87, 0xce, 0xe3, 0xe7, 0x53, 0x87, 0x8c, 0x4a, 0xbc, 0xff, 0x4c, 0xdc, 0xed, 0xe2, - 0x00, 0xef, 0x81, 0xb8, 0x35, 0xeb, 0xf3, 0x7a, 0xd5, 0x69, 0xbf, 0x6b, 0x36, 0xd8, 0x3f, 0x08, - 0xbb, 0x42, 0x6b, 0x70, 0xfb, 0xf2, 0x71, 0xbf, 0xd5, 0xf7, 0x7a, 0x54, 0xe2, 0x35, 0x67, 0x3d, - 0xd6, 0x15, 0x48, 0x6d, 0x4a, 0xb7, 0xf2, 0xbe, 0x86, 0xa3, 0xc5, 0xca, 0x27, 0xcb, 0x95, 0x4f, - 0xde, 0x57, 0x3e, 0xb9, 0xcb, 0x7d, 0x67, 0x99, 0xfb, 0xce, 0x6b, 0xee, 0x3b, 0x97, 0x83, 0x58, - 0x98, 0x71, 0x16, 0x06, 0x11, 0x26, 0x7f, 0xa6, 0xde, 0xfc, 0xc8, 0x35, 0x73, 0xc5, 0x75, 0x58, - 0x2b, 0x1e, 0xe1, 0xf4, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x15, 0xc5, 0xa9, 0x68, 0x6c, 0x02, 0x00, - 0x00, + // 533 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xc1, 0x6e, 0x13, 0x3b, + 0x14, 0x8d, 0x13, 0xbd, 0xe8, 0xe1, 0x54, 0x20, 0x4c, 0x17, 0x51, 0x54, 0x0d, 0x55, 0x54, 0x68, + 0xa8, 0x54, 0x3b, 0x13, 0x36, 0xdd, 0x12, 0xa4, 0x06, 0x54, 0x09, 0x95, 0x61, 0xc7, 0x82, 0xc8, + 0x33, 0xb1, 0xa6, 0x16, 0x1d, 0x7b, 0x3a, 0xf6, 0x44, 0xcc, 0x96, 0x25, 0x2b, 0x24, 0x3e, 0xa2, + 0x2c, 0xf9, 0x8c, 0x2e, 0x2b, 0xb1, 0x61, 0x85, 0x50, 0x82, 0xe0, 0x03, 0xf8, 0x01, 0x14, 0xdb, + 0x25, 0x09, 0xa8, 0x93, 0x22, 0x36, 0x91, 0x73, 0xe7, 0x9e, 0x7b, 0xce, 0xf1, 0xb9, 0x86, 0x9d, + 0x34, 0x3f, 0x56, 0x34, 0x8b, 0x8e, 0x28, 0x17, 0x44, 0x25, 0x34, 0xd3, 0x34, 0x8a, 0x64, 0x2e, + 0xb4, 0x22, 0x63, 0x9f, 0x9c, 0xe4, 0x2c, 0x2b, 0x70, 0x9a, 0x49, 0x2d, 0xd1, 0xc6, 0x42, 0x27, + 0x5e, 0xea, 0xc4, 0x63, 0xbf, 0x75, 0x93, 0x26, 0x5c, 0x48, 0x62, 0x7e, 0x2d, 0xa0, 0xb5, 0x13, + 0x49, 0x95, 0x48, 0x45, 0x42, 0xaa, 0x98, 0x9d, 0x44, 0xc6, 0x7e, 0xc8, 0x34, 0xf5, 0x49, 0x4a, + 0x63, 0x2e, 0xa8, 0xe6, 0x52, 0xb8, 0xde, 0xf5, 0x58, 0xc6, 0xd2, 0x1c, 0xc9, 0xec, 0xe4, 0xaa, + 0x1b, 0xb1, 0x94, 0xf1, 0x31, 0x23, 0x34, 0xe5, 0x84, 0x0a, 0x21, 0xb5, 0x81, 0x28, 0xf7, 0xf5, + 0x5e, 0xa9, 0xf4, 0x94, 0x66, 0x34, 0xb9, 0x68, 0x2d, 0x77, 0xa9, 0x8b, 0x94, 0xb9, 0xce, 0xf6, + 0x3a, 0x44, 0x4f, 0x67, 0x52, 0x0f, 0x0d, 0x3c, 0x60, 0x27, 0x39, 0x53, 0xba, 0xfd, 0x02, 0xde, + 0x5a, 0xaa, 0xaa, 0x54, 0x0a, 0xc5, 0xd0, 0x00, 0xd6, 0x2d, 0x4d, 0x13, 0x6c, 0x82, 0x4e, 0xa3, + 0xb7, 0x85, 0xcb, 0xee, 0x08, 0x5b, 0x74, 0xff, 0xda, 0xd9, 0xe7, 0xdb, 0x95, 0xf7, 0xdf, 0x3f, + 0xec, 0x80, 0xc0, 0xc1, 0xdb, 0x6f, 0x00, 0xdc, 0x32, 0x04, 0x03, 0xa6, 0x9f, 0x31, 0xa5, 0xb8, + 0x14, 0x07, 0xac, 0x50, 0xfd, 0xe2, 0xf1, 0x88, 0x09, 0xcd, 0x75, 0xe1, 0x84, 0xa0, 0x16, 0xfc, + 0x9f, 0xbb, 0x92, 0xe1, 0x5c, 0x0b, 0x7e, 0xfd, 0x47, 0xfb, 0x10, 0xce, 0xef, 0xb5, 0x59, 0x35, + 0x8a, 0xee, 0x62, 0x1b, 0x02, 0x9e, 0x85, 0x80, 0x6d, 0x9c, 0x2e, 0x04, 0x7c, 0x48, 0x63, 0xe6, + 0xe6, 0x06, 0x0b, 0xc8, 0xf6, 0x37, 0x00, 0xef, 0xac, 0x10, 0xe3, 0xfc, 0x6f, 0xc3, 0x1b, 0xce, + 0xdf, 0x90, 0x8e, 0x46, 0x19, 0x53, 0xca, 0x89, 0xba, 0xee, 0xca, 0x0f, 0x6c, 0x15, 0x1d, 0xc0, + 0x35, 0x65, 0x27, 0x0d, 0x5f, 0xb2, 0x42, 0x35, 0xab, 0x9b, 0xb5, 0x4e, 0xa3, 0xd7, 0x29, 0xbf, + 0xae, 0x39, 0x77, 0xd0, 0x50, 0x73, 0x1d, 0x68, 0xb0, 0xe4, 0xb3, 0x66, 0x7c, 0x6e, 0xaf, 0xf4, + 0x69, 0x25, 0x2f, 0x1a, 0xed, 0x9d, 0xd6, 0xe0, 0x7f, 0xc6, 0x28, 0x3a, 0x05, 0xb0, 0x6e, 0xd3, + 0x41, 0xdd, 0x72, 0x51, 0x7f, 0x2e, 0x47, 0xcb, 0xff, 0x0b, 0x84, 0x55, 0xd1, 0xde, 0x7b, 0xfd, + 0xf1, 0xeb, 0xbb, 0x6a, 0x0f, 0x75, 0x89, 0x90, 0x23, 0xe6, 0x77, 0xfd, 0x5d, 0x2e, 0x89, 0x9d, + 0xb2, 0x5b, 0xba, 0xcf, 0xe8, 0x07, 0x80, 0xcd, 0xcb, 0x72, 0x41, 0xfd, 0x2b, 0x28, 0x59, 0xb1, + 0x61, 0xad, 0x87, 0xff, 0x34, 0xc3, 0xf9, 0x7b, 0x62, 0xfc, 0x3d, 0x42, 0xfb, 0x57, 0xf7, 0x17, + 0x33, 0x3d, 0x5c, 0xdc, 0x91, 0x61, 0x58, 0x0c, 0x2f, 0x56, 0xbb, 0x1f, 0x9c, 0x4d, 0x3c, 0x70, + 0x3e, 0xf1, 0xc0, 0x97, 0x89, 0x07, 0xde, 0x4e, 0xbd, 0xca, 0xf9, 0xd4, 0xab, 0x7c, 0x9a, 0x7a, + 0x95, 0xe7, 0x7b, 0x31, 0xd7, 0x47, 0x79, 0x88, 0x23, 0x99, 0x5c, 0xca, 0xf5, 0xea, 0x37, 0x36, + 0xf3, 0xde, 0xc3, 0xba, 0x79, 0xf0, 0xf7, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x13, 0xb7, + 0x31, 0x02, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -163,6 +291,8 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Parameters queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // GetSessionKeysByIdentity Queries a list of GetSessionKeysByIdentity items. + GetSessionKeysByIdentity(ctx context.Context, in *QueryGetSessionKeysByIdentityRequest, opts ...grpc.CallOption) (*QueryGetSessionKeysByIdentityResponse, error) } type queryClient struct { @@ -182,10 +312,21 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) GetSessionKeysByIdentity(ctx context.Context, in *QueryGetSessionKeysByIdentityRequest, opts ...grpc.CallOption) (*QueryGetSessionKeysByIdentityResponse, error) { + out := new(QueryGetSessionKeysByIdentityResponse) + err := c.cc.Invoke(ctx, "/pulsarchain.smartaccounts.v1.Query/GetSessionKeysByIdentity", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // GetSessionKeysByIdentity Queries a list of GetSessionKeysByIdentity items. + GetSessionKeysByIdentity(context.Context, *QueryGetSessionKeysByIdentityRequest) (*QueryGetSessionKeysByIdentityResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -195,6 +336,9 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (*UnimplementedQueryServer) GetSessionKeysByIdentity(ctx context.Context, req *QueryGetSessionKeysByIdentityRequest) (*QueryGetSessionKeysByIdentityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSessionKeysByIdentity not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -218,6 +362,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_GetSessionKeysByIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetSessionKeysByIdentityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetSessionKeysByIdentity(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pulsarchain.smartaccounts.v1.Query/GetSessionKeysByIdentity", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetSessionKeysByIdentity(ctx, req.(*QueryGetSessionKeysByIdentityRequest)) + } + return interceptor(ctx, in, info, handler) +} + var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "pulsarchain.smartaccounts.v1.Query", @@ -227,6 +389,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "GetSessionKeysByIdentity", + Handler: _Query_GetSessionKeysByIdentity_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "pulsarchain/smartaccounts/v1/query.proto", @@ -288,6 +454,104 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryGetSessionKeysByIdentityRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetSessionKeysByIdentityRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetSessionKeysByIdentityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Identity) > 0 { + i -= len(m.Identity) + copy(dAtA[i:], m.Identity) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Identity))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryGetSessionKeysByIdentityResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetSessionKeysByIdentityResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetSessionKeysByIdentityResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.SessionKeys) > 0 { + for iNdEx := len(m.SessionKeys) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SessionKeys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.AccountAddress) > 0 { + i -= len(m.AccountAddress) + copy(dAtA[i:], m.AccountAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.AccountAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -319,6 +583,46 @@ func (m *QueryParamsResponse) Size() (n int) { return n } +func (m *QueryGetSessionKeysByIdentityRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Identity) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetSessionKeysByIdentityResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AccountAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.SessionKeys) > 0 { + for _, e := range m.SessionKeys { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -458,6 +762,280 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryGetSessionKeysByIdentityRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetSessionKeysByIdentityRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetSessionKeysByIdentityRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...) + if m.Identity == nil { + m.Identity = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetSessionKeysByIdentityResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetSessionKeysByIdentityResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetSessionKeysByIdentityResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountAddress = append(m.AccountAddress[:0], dAtA[iNdEx:postIndex]...) + if m.AccountAddress == nil { + m.AccountAddress = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SessionKeys", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SessionKeys = append(m.SessionKeys, &SessionKey{}) + if err := m.SessionKeys[len(m.SessionKeys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/smartaccounts/types/query.pb.gw.go b/x/smartaccounts/types/query.pb.gw.go index c6494007..d69570ae 100644 --- a/x/smartaccounts/types/query.pb.gw.go +++ b/x/smartaccounts/types/query.pb.gw.go @@ -51,6 +51,42 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } +var ( + filter_Query_GetSessionKeysByIdentity_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_GetSessionKeysByIdentity_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetSessionKeysByIdentityRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetSessionKeysByIdentity_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetSessionKeysByIdentity(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetSessionKeysByIdentity_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetSessionKeysByIdentityRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetSessionKeysByIdentity_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetSessionKeysByIdentity(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -80,6 +116,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_GetSessionKeysByIdentity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_GetSessionKeysByIdentity_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetSessionKeysByIdentity_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -141,13 +200,37 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_GetSessionKeysByIdentity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_GetSessionKeysByIdentity_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetSessionKeysByIdentity_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"node101-io", "pulsar-chain", "smartaccounts", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_GetSessionKeysByIdentity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"node101-io", "pulsar-chain", "smartaccounts", "v1", "get_session_keys_by_identity"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_GetSessionKeysByIdentity_0 = runtime.ForwardResponseMessage ) From 3b874560f9933f439acdd610c0225e88a96f6f55 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Wed, 26 Aug 2026 19:05:28 +0300 Subject: [PATCH 39/51] fix: add a default verification key hash --- x/smartaccounts/types/genesis_test.go | 6 +++++- x/smartaccounts/types/params.go | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/x/smartaccounts/types/genesis_test.go b/x/smartaccounts/types/genesis_test.go index 5c450b9a..bd1bb6d7 100644 --- a/x/smartaccounts/types/genesis_test.go +++ b/x/smartaccounts/types/genesis_test.go @@ -17,7 +17,7 @@ func TestGenesisState_Validate(t *testing.T) { { desc: "default requires verification key hash", genState: types.DefaultGenesis(), - valid: false, + valid: true, }, { desc: "valid genesis state", @@ -110,3 +110,7 @@ func TestGenesisState_Validate(t *testing.T) { }) } } + +func TestDefaultGenesisIsValid(t *testing.T) { + require.NoError(t, types.DefaultGenesis().Validate()) +} diff --git a/x/smartaccounts/types/params.go b/x/smartaccounts/types/params.go index 2f603569..fae66538 100644 --- a/x/smartaccounts/types/params.go +++ b/x/smartaccounts/types/params.go @@ -1,6 +1,7 @@ package types import ( + "bytes" "fmt" ) @@ -13,7 +14,9 @@ func NewParams(verificationKeyHash []byte) Params { // DefaultParams returns a default set of parameters. func DefaultParams() Params { - return Params{} + return Params{ + VerificationKeyHash: bytes.Repeat([]byte{0x00}, VerificationKeyHashSize), + } } // Validate validates the set of params. From 8ba9952ae97c2056334bbdb0e49dba7c7e6a33b1 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Wed, 26 Aug 2026 19:06:16 +0300 Subject: [PATCH 40/51] fix: update autocli to get identity input --- x/smartaccounts/module/autocli.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/x/smartaccounts/module/autocli.go b/x/smartaccounts/module/autocli.go index ac17a8a1..36d395c1 100644 --- a/x/smartaccounts/module/autocli.go +++ b/x/smartaccounts/module/autocli.go @@ -18,10 +18,12 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Short: "Shows the parameters of the module", }, { - RpcMethod: "GetSessionKeysByIdentity", - Use: "get-session-keys-by-identity ", - Short: "Query GetSessionKeysByIdentity", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{}, + RpcMethod: "GetSessionKeysByIdentity", + Use: "get-session-keys-by-identity [identity]", + Short: "Query GetSessionKeysByIdentity", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + {ProtoField: "identity"}, + }, }, }, }, From 44c78c8bd4b70208cfb88b67f2d257c815a29337 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Wed, 26 Aug 2026 19:19:53 +0300 Subject: [PATCH 41/51] feat: add pagination to GetSessionKeysByIdentity query --- .../pulsarchain/smartaccounts/v1/query.proto | 4 ++ .../query_get_session_keys_by_identity.go | 58 ++++++++++++++++++- 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/proto/pulsarchain/smartaccounts/v1/query.proto b/proto/pulsarchain/smartaccounts/v1/query.proto index af511b54..be26e23b 100644 --- a/proto/pulsarchain/smartaccounts/v1/query.proto +++ b/proto/pulsarchain/smartaccounts/v1/query.proto @@ -39,10 +39,14 @@ message QueryParamsResponse { // QueryGetSessionKeysByIdentityRequest defines the QueryGetSessionKeysByIdentityRequest message. message QueryGetSessionKeysByIdentityRequest { bytes identity = 1; + // pagination applies to the selected smart account's session keys. + cosmos.base.query.v1beta1.PageRequest pagination = 2; } // QueryGetSessionKeysByIdentityResponse defines the QueryGetSessionKeysByIdentityResponse message. message QueryGetSessionKeysByIdentityResponse { bytes account_address = 1; repeated SessionKey session_keys = 2; + // pagination describes this page of session keys. + cosmos.base.query.v1beta1.PageResponse pagination = 3; } diff --git a/x/smartaccounts/keeper/query_get_session_keys_by_identity.go b/x/smartaccounts/keeper/query_get_session_keys_by_identity.go index c82ccc47..d3f5d09d 100644 --- a/x/smartaccounts/keeper/query_get_session_keys_by_identity.go +++ b/x/smartaccounts/keeper/query_get_session_keys_by_identity.go @@ -2,13 +2,17 @@ package keeper import ( "context" + "encoding/binary" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" "github.com/node101-io/pulsar-chain/x/smartaccounts/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) +const maxSessionKeysPageSize uint64 = 100 + func (q queryServer) GetSessionKeysByIdentity(ctx context.Context, req *types.QueryGetSessionKeysByIdentityRequest) (*types.QueryGetSessionKeysByIdentityResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") @@ -38,13 +42,63 @@ func (q queryServer) GetSessionKeysByIdentity(ctx context.Context, req *types.Qu return nil, status.Error(codes.Internal, "internal error") } - var sessionKeys []*types.SessionKey - for _, key := range acc.SessionKeys { + pageRequest := req.Pagination + + var offset uint64 + limit := maxSessionKeysPageSize + + if pageRequest != nil { + if pageRequest.Reverse { + return nil, status.Error( + codes.InvalidArgument, + "reverse pagination is not supported", + ) + } + + offset = pageRequest.Offset + if len(pageRequest.Key) != 0 { + if pageRequest.Offset != 0 { + return nil, status.Error( + codes.InvalidArgument, + "pagination key and offset cannot both be set", + ) + } + if len(pageRequest.Key) != 8 { + return nil, status.Error(codes.InvalidArgument, "invalid pagination key") + } + offset = binary.BigEndian.Uint64(pageRequest.Key) + } + + if pageRequest.Limit > 0 && pageRequest.Limit < limit { + limit = pageRequest.Limit + } + } + + total := uint64(len(acc.SessionKeys)) + + if offset > total { + offset = total + } + + end := total + if limit < total-offset { + end = offset + limit + } + + sessionKeys := make([]*types.SessionKey, 0, int(end-offset)) + for _, key := range acc.SessionKeys[offset:end] { sessionKeys = append(sessionKeys, &key) } + pageResponse := &query.PageResponse{Total: total} + if end < total { + pageResponse.NextKey = make([]byte, 8) + binary.BigEndian.PutUint64(pageResponse.NextKey, end) + } + return &types.QueryGetSessionKeysByIdentityResponse{ AccountAddress: acc.AccountAddress, SessionKeys: sessionKeys, + Pagination: pageResponse, }, nil } From 97eb711ecfa114a1c62f7267a6f200158b33da41 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Wed, 26 Aug 2026 19:23:49 +0300 Subject: [PATCH 42/51] test: add tests for the GetSessionKeysByIdentity query --- ...query_get_session_keys_by_identity_test.go | 175 ++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 x/smartaccounts/keeper/query_get_session_keys_by_identity_test.go diff --git a/x/smartaccounts/keeper/query_get_session_keys_by_identity_test.go b/x/smartaccounts/keeper/query_get_session_keys_by_identity_test.go new file mode 100644 index 00000000..cfaac7ee --- /dev/null +++ b/x/smartaccounts/keeper/query_get_session_keys_by_identity_test.go @@ -0,0 +1,175 @@ +package keeper_test + +import ( + "bytes" + "encoding/binary" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" + "github.com/node101-io/pulsar-chain/x/smartaccounts/keeper" + "github.com/node101-io/pulsar-chain/x/smartaccounts/types" + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// TestGetSessionKeysByIdentityPagination verifies default page-size enforcement +// and continuation through the returned pagination key. +func TestGetSessionKeysByIdentityPagination(t *testing.T) { + f := initFixture(t) + identity := bytes.Repeat([]byte{0x01}, types.IdentitySize) + accountAddress := f.keeper.GetAuthority() + expiresAtHeight := uint64(sdk.UnwrapSDKContext(f.ctx).BlockHeight()) + 1_000 + + for i := uint64(1); i <= 105; i++ { + publicKey := make([]byte, types.SessionPublicKeySize) + binary.BigEndian.PutUint64(publicKey[types.SessionPublicKeySize-8:], i) + require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount( + f.ctx, + identity, + accountAddress, + types.SessionKey{PublicKey: publicKey, ExpiresAtHeight: expiresAtHeight}, + )) + } + + server := keeper.NewQueryServerImpl(f.keeper) + firstPage, err := server.GetSessionKeysByIdentity( + f.ctx, + &types.QueryGetSessionKeysByIdentityRequest{Identity: identity}, + ) + require.NoError(t, err) + require.Len(t, firstPage.SessionKeys, 100) + require.Equal(t, uint64(105), firstPage.Pagination.Total) + require.Len(t, firstPage.Pagination.NextKey, 8) + + secondPage, err := server.GetSessionKeysByIdentity( + f.ctx, + &types.QueryGetSessionKeysByIdentityRequest{ + Identity: identity, + Pagination: &query.PageRequest{ + Key: firstPage.Pagination.NextKey, + Limit: 100, + }, + }, + ) + require.NoError(t, err) + require.Len(t, secondPage.SessionKeys, 5) + require.Equal(t, uint64(105), secondPage.Pagination.Total) + require.Empty(t, secondPage.Pagination.NextKey) +} + +// TestGetSessionKeysByIdentityRejectsInvalidPagination verifies that unsupported +// or malformed pagination options return InvalidArgument. +func TestGetSessionKeysByIdentityRejectsInvalidPagination(t *testing.T) { + f := initFixture(t) + identity := bytes.Repeat([]byte{0x01}, types.IdentitySize) + require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount( + f.ctx, + identity, + f.keeper.GetAuthority(), + types.SessionKey{ + PublicKey: bytes.Repeat([]byte{0x02}, types.SessionPublicKeySize), + ExpiresAtHeight: uint64(sdk.UnwrapSDKContext(f.ctx).BlockHeight()) + 100, + }, + )) + + server := keeper.NewQueryServerImpl(f.keeper) + tests := []struct { + name string + pagination *query.PageRequest + }{ + {name: "reverse", pagination: &query.PageRequest{Reverse: true}}, + {name: "malformed key", pagination: &query.PageRequest{Key: []byte{0x01}}}, + {name: "key and offset", pagination: &query.PageRequest{Key: make([]byte, 8), Offset: 1}}, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + _, err := server.GetSessionKeysByIdentity( + f.ctx, + &types.QueryGetSessionKeysByIdentityRequest{ + Identity: identity, + Pagination: test.pagination, + }, + ) + require.Equal(t, codes.InvalidArgument, status.Code(err)) + }) + } +} + +// TestGetSessionKeysByIdentityOffsetAndLimit verifies offset-based pagination, +// session-key ordering, account ownership, total count, and the next-page key. +func TestGetSessionKeysByIdentityOffsetAndLimit(t *testing.T) { + f := initFixture(t) + identity := bytes.Repeat([]byte{0x01}, types.IdentitySize) + accountAddress := f.keeper.GetAuthority() + expiresAtHeight := uint64(sdk.UnwrapSDKContext(f.ctx).BlockHeight()) + 100 + + for i := byte(1); i <= 5; i++ { + publicKey := bytes.Repeat([]byte{i}, types.SessionPublicKeySize) + require.NoError(t, f.keeper.AppendSessionKeyToSmartAccount( + f.ctx, + identity, + accountAddress, + types.SessionKey{PublicKey: publicKey, ExpiresAtHeight: expiresAtHeight}, + )) + } + + response, err := keeper.NewQueryServerImpl(f.keeper).GetSessionKeysByIdentity( + f.ctx, + &types.QueryGetSessionKeysByIdentityRequest{ + Identity: identity, + Pagination: &query.PageRequest{ + Offset: 2, + Limit: 2, + }, + }, + ) + require.NoError(t, err) + require.Equal(t, accountAddress, response.AccountAddress) + require.Len(t, response.SessionKeys, 2) + require.Equal(t, bytes.Repeat([]byte{0x03}, types.SessionPublicKeySize), response.SessionKeys[0].PublicKey) + require.Equal(t, bytes.Repeat([]byte{0x04}, types.SessionPublicKeySize), response.SessionKeys[1].PublicKey) + require.Equal(t, uint64(5), response.Pagination.Total) + require.Equal(t, uint64(4), binary.BigEndian.Uint64(response.Pagination.NextKey)) +} + +// TestGetSessionKeysByIdentityRejectsInvalidRequest verifies request and identity +// validation, including the response for an unknown identity. +func TestGetSessionKeysByIdentityRejectsInvalidRequest(t *testing.T) { + f := initFixture(t) + server := keeper.NewQueryServerImpl(f.keeper) + + tests := []struct { + name string + req *types.QueryGetSessionKeysByIdentityRequest + want codes.Code + }{ + {name: "nil request", want: codes.InvalidArgument}, + { + name: "empty identity", + req: &types.QueryGetSessionKeysByIdentityRequest{}, + want: codes.InvalidArgument, + }, + { + name: "invalid identity size", + req: &types.QueryGetSessionKeysByIdentityRequest{Identity: []byte{0x01}}, + want: codes.InvalidArgument, + }, + { + name: "unknown identity", + req: &types.QueryGetSessionKeysByIdentityRequest{ + Identity: bytes.Repeat([]byte{0x01}, types.IdentitySize), + }, + want: codes.NotFound, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + _, err := server.GetSessionKeysByIdentity(f.ctx, test.req) + require.Equal(t, test.want, status.Code(err)) + }) + } +} From 1e01286f2ea76575fbf673b6b0a3205c46326ba7 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Wed, 26 Aug 2026 19:36:30 +0300 Subject: [PATCH 43/51] fix: update deployment scripts to match with new smartaccounts module --- scripts/deploy_local_lightnet.sh | 26 +++++++ scripts/setup_local_testnet.sh | 4 - scripts/setup_local_testnet_helper.py | 88 ---------------------- scripts/test_setup_local_testnet_helper.py | 29 ------- 4 files changed, 26 insertions(+), 121 deletions(-) diff --git a/scripts/deploy_local_lightnet.sh b/scripts/deploy_local_lightnet.sh index 1e123ba7..ef3e0d06 100755 --- a/scripts/deploy_local_lightnet.sh +++ b/scripts/deploy_local_lightnet.sh @@ -72,6 +72,11 @@ Optional environment variables: SMART_ACCOUNTS_VERIFICATION_KEY_HASH 32-byte smartaccounts verification-key hash in hex or base64 (default: value from config.yml) + SMART_ACCOUNT_NOIR_FIXTURE_DIR + real smart-account Noir fixture directory; when + set, verification_key_hash is derived from its vk + PULSAR_VERIFIER_IMAGE production verifier image; required with the + smart-account Noir fixture Default Mina Lightnet image: o1labs/mina-local-network@sha256:33e349241f5f3e8d336e5de9b35de2d4339fd8713b309e2b1b5fc375c2605b58 @@ -325,6 +330,27 @@ require_cmd docker require_cmd git require_cmd python3 +if [[ -n "${SMART_ACCOUNT_NOIR_FIXTURE_DIR:-}" ]]; then + if [[ ! -f "$SMART_ACCOUNT_NOIR_FIXTURE_DIR/vk" ]]; then + echo "smart-account Noir verification key not found: $SMART_ACCOUNT_NOIR_FIXTURE_DIR/vk" >&2 + exit 1 + fi + if [[ -z "${PULSAR_VERIFIER_IMAGE:-}" ]]; then + echo "PULSAR_VERIFIER_IMAGE is required with SMART_ACCOUNT_NOIR_FIXTURE_DIR" >&2 + exit 1 + fi + + fixture_verification_key_hash="$(python3 -c 'import hashlib,pathlib,sys; print(hashlib.sha256(pathlib.Path(sys.argv[1]).read_bytes()).hexdigest())' "$SMART_ACCOUNT_NOIR_FIXTURE_DIR/vk")" + fixture_verification_key_hash_base64="$(python3 -c 'import base64,sys; print(base64.b64encode(bytes.fromhex(sys.argv[1])).decode())' "$fixture_verification_key_hash")" + if [[ -n "${SMART_ACCOUNTS_VERIFICATION_KEY_HASH:-}" && + "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" != "$fixture_verification_key_hash" && + "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" != "$fixture_verification_key_hash_base64" ]]; then + echo "SMART_ACCOUNTS_VERIFICATION_KEY_HASH does not match SHA-256($SMART_ACCOUNT_NOIR_FIXTURE_DIR/vk)" >&2 + exit 1 + fi + export SMART_ACCOUNTS_VERIFICATION_KEY_HASH="$fixture_verification_key_hash" +fi + docker compose version >/dev/null docker buildx version >/dev/null diff --git a/scripts/setup_local_testnet.sh b/scripts/setup_local_testnet.sh index 1b0bab17..b1942302 100755 --- a/scripts/setup_local_testnet.sh +++ b/scripts/setup_local_testnet.sh @@ -645,10 +645,6 @@ python3 "$PYTHON_HELPER" patch-smartaccounts-genesis \ --genesis "$PRIMARY_GENESIS_FILE" \ --verification-key-hash "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" -python3 "$PYTHON_HELPER" patch-local-smartaccount-proof-fixture \ - --genesis "$PRIMARY_GENESIS_FILE" \ - --verification-key-hash "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" - echo "==> Creating validator keys..." for ((i = 1; i <= VALIDATOR_COUNT; i++)); do "$BINARY_PATH" keys add "${NODE_KEY_NAMES[i]}" --home "${NODE_HOMES[i]}" --keyring-backend "$KEYRING_BACKEND" >/dev/null 2>&1 diff --git a/scripts/setup_local_testnet_helper.py b/scripts/setup_local_testnet_helper.py index ec930a2b..67c6ef15 100644 --- a/scripts/setup_local_testnet_helper.py +++ b/scripts/setup_local_testnet_helper.py @@ -812,81 +812,6 @@ def patch_smartaccounts_genesis( return 0 -def patch_local_smartaccount_proof_fixture( - genesis_path: str, - verification_key_hash: str, -) -> int: - identity = bytes.fromhex( - "a0e18e9725f34a4d055830f724af1f42bc57942ad0a38875b4b991851d999dcb" - ) - session_public_key = bytes.fromhex( - "6e1f9218c4a7fbce1262a5d586d7511d1b2ec5201d96ab621753c239ebab045b" - ) - proof_hash = bytes.fromhex( - "09b26eb3d86c4fd415838c2d9bd8bebc01cbb0fe78e270a4ea643e81075ac210" - ) - verification_key_hash_bytes = decode_smartaccounts_verification_key_hash( - verification_key_hash - ) - expires_at_height = 1_000_000 - public_inputs = ( - session_public_key - + expires_at_height.to_bytes(32, byteorder="big") - + identity - ) - public_inputs_hash = hashlib.sha256(public_inputs).digest() - verification_id = hashlib.sha256( - b"pulsar/verification/v1\x00" - + (1).to_bytes(4, byteorder="big") - + proof_hash - + public_inputs_hash - + verification_key_hash_bytes - ).digest() - - proof_hash_base64 = base64.b64encode(proof_hash).decode("ascii") - public_inputs_hash_base64 = base64.b64encode(public_inputs_hash).decode( - "ascii" - ) - verification_key_hash_base64 = base64.b64encode( - verification_key_hash_bytes - ).decode("ascii") - verification_id_base64 = base64.b64encode(verification_id).decode("ascii") - - proof_key = {"submission_height": "1", "index_in_block": 0} - genesis = read_json(genesis_path) - verification = genesis.setdefault("app_state", {}).setdefault( - "verification", {} - ) - verification["seen_verification_ids"] = [ - { - "verification_id": verification_id_base64, - "proof_key": proof_key, - } - ] - verification["final_proof_results"] = [ - { - "proof_key": proof_key, - "result": { - "proof_hash": proof_hash_base64, - "proof_type": "PROOF_TYPE_MINA_PICKLES", - "status": "PROOF_STATUS_VALID", - "valid_voting_power": "1", - "invalid_voting_power": "0", - "total_voting_power": "1", - "voting_power_threshold": "1", - "submission_height": "1", - "finalized_height": "6", - "public_inputs_hash": public_inputs_hash_base64, - "verification_key_hash": verification_key_hash_base64, - "verification_id": verification_id_base64, - }, - } - ] - - write_json(genesis_path, genesis) - return 0 - - def upsert_toml_key( app_toml: str, table_name: str, @@ -1101,14 +1026,6 @@ def build_parser() -> argparse.ArgumentParser: patch_smartaccounts.add_argument("--genesis", required=True) patch_smartaccounts.add_argument("--verification-key-hash", required=True) - patch_local_smartaccount = subparsers.add_parser( - "patch-local-smartaccount-proof-fixture" - ) - patch_local_smartaccount.add_argument("--genesis", required=True) - patch_local_smartaccount.add_argument( - "--verification-key-hash", required=True - ) - verify_registry = subparsers.add_parser("verify-validator-key-pairs") verify_registry.add_argument("--genesis", required=True) verify_registry.add_argument("--cosmos-key", action="append", required=True) @@ -1201,11 +1118,6 @@ def main() -> int: args.genesis, args.verification_key_hash, ) - if args.command == "patch-local-smartaccount-proof-fixture": - return patch_local_smartaccount_proof_fixture( - args.genesis, - args.verification_key_hash, - ) if args.command == "verify-validator-key-pairs": return verify_validator_key_pairs(args.genesis, args.cosmos_key) if args.command == "check-validator-status": diff --git a/scripts/test_setup_local_testnet_helper.py b/scripts/test_setup_local_testnet_helper.py index b5663e45..1470f711 100644 --- a/scripts/test_setup_local_testnet_helper.py +++ b/scripts/test_setup_local_testnet_helper.py @@ -502,35 +502,6 @@ def test_patch_smartaccounts_genesis_rejects_invalid_hash(self): with self.assertRaises(SystemExit): helper.patch_smartaccounts_genesis(str(genesis), value) - def test_patch_local_smartaccount_proof_fixture(self): - genesis = self.write_temp( - "genesis.json", - json.dumps({"app_state": {"verification": {"params": {}}}}), - ) - verification_key_hash = "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE=" - - self.assertEqual( - 0, - helper.patch_local_smartaccount_proof_fixture( - str(genesis), verification_key_hash - ), - ) - - verification = json.loads(genesis.read_text(encoding="utf-8"))[ - "app_state" - ]["verification"] - self.assertEqual({}, verification["params"]) - self.assertEqual( - "hrZ/3dUCYGrO3ofkc69c4NAVvF/3/olEoj5pN0fhJhY=", - verification["seen_verification_ids"][0]["verification_id"], - ) - result = verification["final_proof_results"][0]["result"] - self.assertEqual("PROOF_STATUS_VALID", result["status"]) - self.assertEqual( - "R/Za9xWb5udbVYiQ2rs8REB4+qhK5lfKhuhmK2fDgaA=", - result["public_inputs_hash"], - ) - def test_render_e2e_seed_replaces_exactly_one_placeholder(self): template = self.write_temp( "seed.sql.tmpl", "fee_payer = '__E2E_MINA_PUBLIC_KEY__';\n" From 1e0d3717db00a8629b3bcfb30393875bd94efd0f Mon Sep 17 00:00:00 2001 From: Yusuf Date: Wed, 26 Aug 2026 19:55:42 +0300 Subject: [PATCH 44/51] feat: add a tx sender for cosmos,mina and unspecified auth modes --- scripts/devtools/auth_mode_tx.go | 315 +++++++++++++++++++++++ scripts/devtools/main.go | 12 + scripts/send_cosmos_auth_mode_tx.sh | 79 ++++++ scripts/send_mina_auth_mode_tx.sh | 99 +++++++ scripts/send_unspecified_auth_mode_tx.sh | 79 ++++++ 5 files changed, 584 insertions(+) create mode 100644 scripts/devtools/auth_mode_tx.go create mode 100755 scripts/send_cosmos_auth_mode_tx.sh create mode 100755 scripts/send_mina_auth_mode_tx.sh create mode 100755 scripts/send_unspecified_auth_mode_tx.sh diff --git a/scripts/devtools/auth_mode_tx.go b/scripts/devtools/auth_mode_tx.go new file mode 100644 index 00000000..10463844 --- /dev/null +++ b/scripts/devtools/auth_mode_tx.go @@ -0,0 +1,315 @@ +package main + +import ( + "bytes" + "context" + "encoding/binary" + "encoding/hex" + "encoding/json" + "errors" + "flag" + "fmt" + "io" + "math" + "time" + + "github.com/bronlabs/bron-crypto/pkg/signatures/schnorrlike/mina" + "github.com/cosmos/cosmos-sdk/client" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + sdk "github.com/cosmos/cosmos-sdk/types" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" + signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + gogoproto "github.com/cosmos/gogoproto/proto" + minafield "github.com/node101-io/mina-signer-go/field" + "github.com/node101-io/mina-signer-go/poseidon" + "github.com/node101-io/mina-signer-go/privatekey" + antetypes "github.com/node101-io/pulsar-chain/app/ante/types" + keyregistrytypes "github.com/node101-io/pulsar-chain/x/keyregistry/types" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/status" +) + +const ( + minaTxSigningChallengePrefix = "pulsar-tx-auth-v1" + minaTxSigningChallengeVersion = byte(1) +) + +type minaRegistrationMaterial struct { + MinaPublicKey string `json:"mina_public_key"` + MinaSignature string `json:"mina_signature"` +} + +func runMinaRegistrationMaterial(args []string, stdout io.Writer) error { + fs := flag.NewFlagSet("mina-registration-material", flag.ContinueOnError) + fs.SetOutput(io.Discard) + chainID := fs.String("chain-id", "", "chain ID") + cosmosPublicKeyValue := fs.String("cosmos-public-key", "", "Cosmos public key in hex or base64") + minaPrivateKeyValue := fs.String("mina-private-key", "", "Mina private key in hex or base64") + if err := fs.Parse(args); err != nil { + return err + } + if fs.NArg() != 0 || *chainID == "" || *cosmosPublicKeyValue == "" || *minaPrivateKeyValue == "" { + return errors.New("--chain-id, --cosmos-public-key, and --mina-private-key are required") + } + + cosmosPublicKey, err := decodeHexOrBase64(*cosmosPublicKeyValue) + if err != nil { + return fmt.Errorf("decode --cosmos-public-key: %w", err) + } + minaPrivateKey, err := parseMinaPrivateKey(*minaPrivateKeyValue) + if err != nil { + return err + } + minaPublicKey, err := minaPrivateKey.ToPublicKey() + if err != nil { + return fmt.Errorf("derive Mina public key: %w", err) + } + minaPublicKeyBytes := minaPublicKey.Bytes() + + challenge, err := keyregistrytypes.BuildKeySigningChallenge(keyregistrytypes.KeySigningChallengeInput{ + ChainID: *chainID, + Operation: keyregistrytypes.KeySigningOperation_KEY_SIGNING_OPERATION_REGISTER, + ActorType: keyregistrytypes.ActorType_ACTOR_TYPE_USER, + CosmosPublicKey: cosmosPublicKey, + NewMinaPublicKey: minaPublicKeyBytes, + }) + if err != nil { + return fmt.Errorf("build Mina registration challenge: %w", err) + } + minaSignature, err := minaPrivateKey.SignFieldElement(challenge) + if err != nil { + return fmt.Errorf("sign Mina registration challenge: %w", err) + } + + return json.NewEncoder(stdout).Encode(minaRegistrationMaterial{ + MinaPublicKey: hex.EncodeToString(minaPublicKeyBytes), + MinaSignature: hex.EncodeToString(minaSignature.Bytes()), + }) +} + +func runSendMinaAuthModeTx(args []string, stdout io.Writer) error { + fs := flag.NewFlagSet("send-mina-auth-mode-tx", flag.ContinueOnError) + fs.SetOutput(io.Discard) + grpcAddr := fs.String("grpc-addr", "127.0.0.1:9090", "chain gRPC endpoint") + chainID := fs.String("chain-id", "mytestnet", "chain ID") + from := fs.String("from", "", "sender account address") + to := fs.String("to", "", "recipient account address") + minaPrivateKeyValue := fs.String("mina-private-key", "", "Mina private key in hex or base64") + amountValue := fs.String("amount", "1pmina", "amount to send") + feeValue := fs.String("fees", "100pmina", "transaction fees") + gas := fs.Uint64("gas", 200000, "gas limit") + timeout := fs.Duration("timeout", 30*time.Second, "query and inclusion timeout") + if err := fs.Parse(args); err != nil { + return err + } + if fs.NArg() != 0 || *from == "" || *to == "" || *minaPrivateKeyValue == "" { + return errors.New("--from, --to, and --mina-private-key are required") + } + if *chainID == "" || *grpcAddr == "" || *gas == 0 || *timeout <= 0 { + return errors.New("--chain-id, --grpc-addr, --gas, and --timeout must be non-zero") + } + + addressCodec := authcodec.NewBech32Codec(pulsarAccountPrefix) + if _, err := addressCodec.StringToBytes(*from); err != nil { + return fmt.Errorf("invalid --from address: %w", err) + } + if _, err := addressCodec.StringToBytes(*to); err != nil { + return fmt.Errorf("invalid --to address: %w", err) + } + minaPrivateKey, err := parseMinaPrivateKey(*minaPrivateKeyValue) + if err != nil { + return err + } + amount, err := sdk.ParseCoinsNormalized(*amountValue) + if err != nil || amount.Empty() || !amount.IsAllPositive() { + return fmt.Errorf("invalid --amount %q", *amountValue) + } + fees, err := sdk.ParseCoinsNormalized(*feeValue) + if err != nil || !fees.IsValid() || fees.IsAnyNegative() { + return fmt.Errorf("invalid --fees %q", *feeValue) + } + + txConfig, err := newSmartAccountTxConfig(addressCodec) + if err != nil { + return err + } + conn, err := grpc.NewClient(*grpcAddr, grpc.WithTransportCredentials(insecure.NewCredentials())) + if err != nil { + return fmt.Errorf("create gRPC client for %s: %w", *grpcAddr, err) + } + defer conn.Close() + + ctx, cancel := context.WithTimeout(context.Background(), *timeout) + defer cancel() + accountResponse, err := authtypes.NewQueryClient(conn).AccountInfo(ctx, &authtypes.QueryAccountInfoRequest{Address: *from}) + if err != nil { + return fmt.Errorf("query account %s: %w", *from, err) + } + account := accountResponse.GetInfo() + if account == nil { + return fmt.Errorf("account query returned no account info for %s", *from) + } + if account.PubKey == nil || account.PubKey.TypeUrl != "/cosmos.crypto.secp256k1.PubKey" { + return fmt.Errorf("account %s has no Cosmos public key", *from) + } + cosmosPublicKey := &secp256k1.PubKey{} + if err := gogoproto.Unmarshal(account.PubKey.Value, cosmosPublicKey); err != nil { + return fmt.Errorf("decode Cosmos public key for %s: %w", *from, err) + } + + txBuilder := txConfig.NewTxBuilder() + if err := txBuilder.SetMsgs(&banktypes.MsgSend{ + FromAddress: *from, + ToAddress: *to, + Amount: amount, + }); err != nil { + return fmt.Errorf("set MsgSend: %w", err) + } + txBuilder.SetFeeAmount(fees) + txBuilder.SetGasLimit(*gas) + + extendedBuilder, ok := txBuilder.(client.ExtendedTxBuilder) + if !ok { + return errors.New("tx builder does not support extension options") + } + extensionBytes, err := gogoproto.Marshal(&antetypes.TxAuthModeExtension{ + TxAuthMode: antetypes.TX_AUTH_MODE_MINA, + }) + if err != nil { + return fmt.Errorf("marshal Mina auth extension: %w", err) + } + extendedBuilder.SetExtensionOptions(&codectypes.Any{ + TypeUrl: "/" + gogoproto.MessageName(&antetypes.TxAuthModeExtension{}), + Value: extensionBytes, + }) + + signMode := signingtypes.SignMode_SIGN_MODE_DIRECT + placeholder := signingtypes.SignatureV2{ + PubKey: cosmosPublicKey, + Data: &signingtypes.SingleSignatureData{SignMode: signMode}, + Sequence: account.Sequence, + } + if err := txBuilder.SetSignatures(placeholder); err != nil { + return fmt.Errorf("set placeholder signature: %w", err) + } + signBytes, err := authsigning.GetSignBytesAdapter( + ctx, + txConfig.SignModeHandler(), + signMode, + authsigning.SignerData{ + Address: *from, + ChainID: *chainID, + AccountNumber: account.AccountNumber, + Sequence: account.Sequence, + }, + txBuilder.GetTx(), + ) + if err != nil { + return fmt.Errorf("build Mina sign bytes: %w", err) + } + challenge, err := buildMinaTxSigningChallenge(signBytes) + if err != nil { + return err + } + minaSignature, err := minaPrivateKey.SignFieldElement(challenge) + if err != nil { + return fmt.Errorf("sign Mina transaction challenge: %w", err) + } + if err := txBuilder.SetSignatures(signingtypes.SignatureV2{ + PubKey: cosmosPublicKey, + Data: &signingtypes.SingleSignatureData{ + SignMode: signMode, + Signature: minaSignature.Bytes(), + }, + Sequence: account.Sequence, + }); err != nil { + return fmt.Errorf("set Mina signature: %w", err) + } + + txBytes, err := txConfig.TxEncoder()(txBuilder.GetTx()) + if err != nil { + return fmt.Errorf("encode Mina transaction: %w", err) + } + broadcastResponse, err := txtypes.NewServiceClient(conn).BroadcastTx(ctx, &txtypes.BroadcastTxRequest{ + TxBytes: txBytes, + Mode: txtypes.BroadcastMode_BROADCAST_MODE_SYNC, + }) + if err != nil { + return fmt.Errorf("broadcast Mina transaction: %w", err) + } + checkTx := broadcastResponse.GetTxResponse() + if checkTx == nil { + return errors.New("broadcast returned no transaction response") + } + if checkTx.Code != 0 { + return fmt.Errorf("CheckTx rejected Mina transaction (codespace=%s code=%d): %s", checkTx.Codespace, checkTx.Code, checkTx.RawLog) + } + + for { + included, queryErr := txtypes.NewServiceClient(conn).GetTx(ctx, &txtypes.GetTxRequest{Hash: checkTx.TxHash}) + if queryErr == nil && included.GetTxResponse() != nil { + response := included.GetTxResponse() + if response.Code != 0 { + return fmt.Errorf("DeliverTx failed (tx_hash=%s codespace=%s code=%d): %s", response.TxHash, response.Codespace, response.Code, response.RawLog) + } + return writeSmartAccountTxResult(stdout, response) + } + if queryErr != nil && status.Code(queryErr) != codes.NotFound { + return fmt.Errorf("query Mina transaction %s: %w", checkTx.TxHash, queryErr) + } + select { + case <-ctx.Done(): + return fmt.Errorf("Mina transaction %s was not included before timeout: %w", checkTx.TxHash, ctx.Err()) + case <-time.After(500 * time.Millisecond): + } + } +} + +func parseMinaPrivateKey(value string) (*privatekey.PrivateKey, error) { + keyBytes, err := decodeHexOrBase64(value) + if err != nil { + return nil, fmt.Errorf("decode Mina private key: %w", err) + } + if len(keyBytes) != privatekey.Size() { + return nil, fmt.Errorf("invalid Mina private key length: got %d bytes, want %d", len(keyBytes), privatekey.Size()) + } + var rawPrivateKey [32]byte + copy(rawPrivateKey[:], keyBytes) + key, err := privatekey.NewPrivateKeyFromBytes(rawPrivateKey, mina.TestNet) + if err != nil { + return nil, fmt.Errorf("parse Mina private key: %w", err) + } + return key, nil +} + +func buildMinaTxSigningChallenge(signBytes []byte) (*minafield.FieldElement, error) { + if len(signBytes) == 0 { + return nil, errors.New("empty Mina transaction sign bytes") + } + if len(signBytes) > math.MaxUint32 { + return nil, errors.New("Mina transaction sign bytes exceed uint32 framing") + } + + payload := bytes.NewBuffer(make([]byte, 0, 5+len(signBytes))) + payload.WriteByte(minaTxSigningChallengeVersion) + var length [4]byte + binary.BigEndian.PutUint32(length[:], uint32(len(signBytes))) + payload.Write(length[:]) + payload.Write(signBytes) + hash, err := poseidon.NewPoseidon().HashWithPrefix(minaTxSigningChallengePrefix, payload.Bytes()) + if err != nil { + return nil, fmt.Errorf("hash Mina transaction challenge: %w", err) + } + challenge, err := minafield.NewFieldElement(hash) + if err != nil { + return nil, fmt.Errorf("decode Mina transaction challenge: %w", err) + } + return challenge, nil +} diff --git a/scripts/devtools/main.go b/scripts/devtools/main.go index 7c742967..1e9de095 100644 --- a/scripts/devtools/main.go +++ b/scripts/devtools/main.go @@ -53,6 +53,16 @@ func run(args []string, stdout, stderr io.Writer) int { fmt.Fprintf(stderr, "error: %v\n", err) return 1 } + case "mina-registration-material": + if err := runMinaRegistrationMaterial(args[1:], stdout); err != nil { + fmt.Fprintf(stderr, "error: %v\n", err) + return 1 + } + case "send-mina-auth-mode-tx": + if err := runSendMinaAuthModeTx(args[1:], stdout); err != nil { + fmt.Fprintf(stderr, "error: %v\n", err) + return 1 + } case "-h", "--help", "help": printUsage(stdout) default: @@ -71,6 +81,8 @@ func printUsage(out io.Writer) { fmt.Fprintln(out, " derive-mina-pub ") fmt.Fprintln(out, " verify-vote-extensions [--grpc-addr addr] [--network-id id] [--timeout duration]") fmt.Fprintln(out, " query-archive-wrapper --address addr --transport-mode mode --latest height --target height") + fmt.Fprintln(out, " mina-registration-material --chain-id id --cosmos-public-key value --mina-private-key value") + fmt.Fprintln(out, " send-mina-auth-mode-tx --from addr --to addr --mina-private-key value [flags]") } func runQueryArchiveWrapper(args []string, stdout io.Writer) error { diff --git a/scripts/send_cosmos_auth_mode_tx.sh b/scripts/send_cosmos_auth_mode_tx.sh new file mode 100755 index 00000000..a69ea6b1 --- /dev/null +++ b/scripts/send_cosmos_auth_mode_tx.sh @@ -0,0 +1,79 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +PROJECT_NAME="${PULSAR_DOCKER_PROJECT:-pulsar-testnet-3}" +CONTAINER="${PULSAR_VALIDATOR_CONTAINER:-${PROJECT_NAME}-validator1-1}" +VALIDATOR_HOME="${PULSAR_VALIDATOR_HOME:-/testnet/.pulsar-node1}" +CHAIN_ID="${CHAIN_ID:-mytestnet}" +FROM_KEY="${AUTH_MODE_FROM_KEY:-validator1}" +RECIPIENT_KEY="${AUTH_MODE_RECIPIENT_KEY:-auth-mode-recipient}" +AMOUNT="${AUTH_MODE_SEND_AMOUNT:-1pmina}" +FEES="${AUTH_MODE_FEES:-100pmina}" +NODE="${PULSAR_NODE:-tcp://127.0.0.1:26657}" +MODE="TX_AUTH_MODE_COSMOS" + +WORK_DIR="$(mktemp -d "${TMPDIR:-/tmp}/pulsar-cosmos-auth.XXXXXX")" +trap 'rm -rf -- "$WORK_DIR"' EXIT + +docker inspect "$CONTAINER" >/dev/null + +if ! docker exec "$CONTAINER" pulsard keys show "$RECIPIENT_KEY" \ + --home "$VALIDATOR_HOME" --keyring-backend test >/dev/null 2>&1; then + docker exec "$CONTAINER" pulsard keys add "$RECIPIENT_KEY" \ + --home "$VALIDATOR_HOME" --keyring-backend test >/dev/null 2>&1 +fi + +RECIPIENT_ADDRESS="$(docker exec "$CONTAINER" pulsard keys show "$RECIPIENT_KEY" \ + --address --home "$VALIDATOR_HOME" --keyring-backend test)" + +docker exec "$CONTAINER" pulsard tx bank send "$FROM_KEY" "$RECIPIENT_ADDRESS" "$AMOUNT" \ + --from "$FROM_KEY" \ + --home "$VALIDATOR_HOME" \ + --keyring-backend test \ + --chain-id "$CHAIN_ID" \ + --node "$NODE" \ + --gas 200000 \ + --fees "$FEES" \ + --generate-only \ + --output json >"$WORK_DIR/unsigned.json" + +python3 - "$WORK_DIR/unsigned.json" "$MODE" >"$WORK_DIR/extended.json" <<'PY' +import json +import sys + +tx = json.load(open(sys.argv[1], encoding="utf-8")) +tx["body"]["extension_options"] = [{ + "@type": "/pulsarchain.ante.v1.TxAuthModeExtension", + "tx_auth_mode": sys.argv[2], +}] +json.dump(tx, sys.stdout) +PY + +docker exec -i "$CONTAINER" pulsard tx sign /dev/stdin \ + --from "$FROM_KEY" \ + --home "$VALIDATOR_HOME" \ + --keyring-backend test \ + --chain-id "$CHAIN_ID" \ + --node "$NODE" \ + --output-document /dev/stdout \ + <"$WORK_DIR/extended.json" >"$WORK_DIR/signed.json" + +docker exec -i "$CONTAINER" pulsard tx broadcast /dev/stdin \ + --node "$NODE" --output json \ + <"$WORK_DIR/signed.json" >"$WORK_DIR/broadcast.json" + +TX_HASH="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["txhash"])' "$WORK_DIR/broadcast.json")" +for _ in $(seq 1 60); do + if docker exec "$CONTAINER" pulsard query tx "$TX_HASH" --node "$NODE" --output json \ + >"$WORK_DIR/result.json" 2>/dev/null; then + CODE="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["code"])' "$WORK_DIR/result.json")" + cat "$WORK_DIR/result.json" + [[ "$CODE" == "0" ]] + exit + fi + sleep 1 +done + +echo "error: transaction was not included: $TX_HASH" >&2 +exit 1 diff --git a/scripts/send_mina_auth_mode_tx.sh b/scripts/send_mina_auth_mode_tx.sh new file mode 100755 index 00000000..4c36c991 --- /dev/null +++ b/scripts/send_mina_auth_mode_tx.sh @@ -0,0 +1,99 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd -- "$SCRIPT_DIR/.." && pwd)" +PROJECT_NAME="${PULSAR_DOCKER_PROJECT:-pulsar-testnet-3}" +CONTAINER="${PULSAR_VALIDATOR_CONTAINER:-${PROJECT_NAME}-validator1-1}" +VALIDATOR_HOME="${PULSAR_VALIDATOR_HOME:-/testnet/.pulsar-node1}" +CHAIN_ID="${CHAIN_ID:-mytestnet}" +FROM_KEY="${AUTH_MODE_FROM_KEY:-validator1}" +RECIPIENT_KEY="${AUTH_MODE_RECIPIENT_KEY:-auth-mode-recipient}" +AMOUNT="${AUTH_MODE_SEND_AMOUNT:-1pmina}" +FEES="${AUTH_MODE_FEES:-100pmina}" +NODE="${PULSAR_NODE:-tcp://127.0.0.1:26657}" +GRPC_ADDR="${PULSAR_GRPC_ADDR:-127.0.0.1:9090}" + +WORK_DIR="$(mktemp -d "${TMPDIR:-/tmp}/pulsar-mina-auth.XXXXXX")" +trap 'rm -rf -- "$WORK_DIR"' EXIT + +docker inspect "$CONTAINER" >/dev/null + +if ! docker exec "$CONTAINER" pulsard keys show "$RECIPIENT_KEY" \ + --home "$VALIDATOR_HOME" --keyring-backend test >/dev/null 2>&1; then + docker exec "$CONTAINER" pulsard keys add "$RECIPIENT_KEY" \ + --home "$VALIDATOR_HOME" --keyring-backend test >/dev/null 2>&1 +fi + +FROM_ADDRESS="$(docker exec "$CONTAINER" pulsard keys show "$FROM_KEY" \ + --address --home "$VALIDATOR_HOME" --keyring-backend test)" +RECIPIENT_ADDRESS="$(docker exec "$CONTAINER" pulsard keys show "$RECIPIENT_KEY" \ + --address --home "$VALIDATOR_HOME" --keyring-backend test)" +COSMOS_PUBLIC_KEY_BASE64="$(docker exec "$CONTAINER" pulsard keys show "$FROM_KEY" \ + --pubkey --home "$VALIDATOR_HOME" --keyring-backend test \ + | python3 -c 'import json,sys; print(json.load(sys.stdin)["key"])')" +COSMOS_PUBLIC_KEY_HEX="$(python3 -c 'import base64,sys; print(base64.b64decode(sys.argv[1], validate=True).hex())' "$COSMOS_PUBLIC_KEY_BASE64")" + +MINA_PRIVATE_KEY="${AUTH_MODE_MINA_PRIVATE_KEY:-$( + python3 "$SCRIPT_DIR/setup_local_testnet_helper.py" generate-default-mina-priv-key --index auth-mode-user +)}" + +cd "$REPO_ROOT" +go run -tags=purego ./scripts/devtools mina-registration-material \ + --chain-id "$CHAIN_ID" \ + --cosmos-public-key "$COSMOS_PUBLIC_KEY_BASE64" \ + --mina-private-key "$MINA_PRIVATE_KEY" \ + >"$WORK_DIR/mina-material.json" + +MINA_PUBLIC_KEY_HEX="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["mina_public_key"])' "$WORK_DIR/mina-material.json")" +MINA_SIGNATURE_HEX="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["mina_signature"])' "$WORK_DIR/mina-material.json")" + +if docker exec "$CONTAINER" pulsard query keyregistry get-user-mina-public-key \ + "$COSMOS_PUBLIC_KEY_HEX" --node "$NODE" --output json \ + >"$WORK_DIR/registered-key.json" 2>/dev/null; then + REGISTERED_MINA_KEY_HEX="$(python3 -c 'import base64,json,sys; print(base64.b64decode(json.load(open(sys.argv[1]))["user_mina_public_key"]).hex())' "$WORK_DIR/registered-key.json")" + if [[ "$REGISTERED_MINA_KEY_HEX" != "$MINA_PUBLIC_KEY_HEX" ]]; then + echo "error: $FROM_KEY already has a different Mina key registered" >&2 + exit 1 + fi +else + docker exec "$CONTAINER" pulsard tx keyregistry register-user-keys \ + "$COSMOS_PUBLIC_KEY_HEX" "$MINA_PUBLIC_KEY_HEX" "$MINA_SIGNATURE_HEX" \ + --from "$FROM_KEY" \ + --home "$VALIDATOR_HOME" \ + --keyring-backend test \ + --chain-id "$CHAIN_ID" \ + --node "$NODE" \ + --gas 250000 \ + --fees "$FEES" \ + --yes \ + --output json >"$WORK_DIR/register-broadcast.json" + + REGISTER_TX_HASH="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["txhash"])' "$WORK_DIR/register-broadcast.json")" + for _ in $(seq 1 60); do + if docker exec "$CONTAINER" pulsard query tx "$REGISTER_TX_HASH" --node "$NODE" --output json \ + >"$WORK_DIR/register-result.json" 2>/dev/null; then + REGISTER_CODE="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["code"])' "$WORK_DIR/register-result.json")" + if [[ "$REGISTER_CODE" != "0" ]]; then + cat "$WORK_DIR/register-result.json" >&2 + exit 1 + fi + break + fi + sleep 1 + done + [[ -f "$WORK_DIR/register-result.json" ]] || { + echo "error: Mina key registration transaction was not included: $REGISTER_TX_HASH" >&2 + exit 1 + } +fi + +go run -tags=purego ./scripts/devtools send-mina-auth-mode-tx \ + --grpc-addr "$GRPC_ADDR" \ + --chain-id "$CHAIN_ID" \ + --from "$FROM_ADDRESS" \ + --to "$RECIPIENT_ADDRESS" \ + --mina-private-key "$MINA_PRIVATE_KEY" \ + --amount "$AMOUNT" \ + --fees "$FEES" diff --git a/scripts/send_unspecified_auth_mode_tx.sh b/scripts/send_unspecified_auth_mode_tx.sh new file mode 100755 index 00000000..52b63046 --- /dev/null +++ b/scripts/send_unspecified_auth_mode_tx.sh @@ -0,0 +1,79 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +PROJECT_NAME="${PULSAR_DOCKER_PROJECT:-pulsar-testnet-3}" +CONTAINER="${PULSAR_VALIDATOR_CONTAINER:-${PROJECT_NAME}-validator1-1}" +VALIDATOR_HOME="${PULSAR_VALIDATOR_HOME:-/testnet/.pulsar-node1}" +CHAIN_ID="${CHAIN_ID:-mytestnet}" +FROM_KEY="${AUTH_MODE_FROM_KEY:-validator1}" +RECIPIENT_KEY="${AUTH_MODE_RECIPIENT_KEY:-auth-mode-recipient}" +AMOUNT="${AUTH_MODE_SEND_AMOUNT:-1pmina}" +FEES="${AUTH_MODE_FEES:-100pmina}" +NODE="${PULSAR_NODE:-tcp://127.0.0.1:26657}" +MODE="TX_AUTH_MODE_UNSPECIFIED" + +WORK_DIR="$(mktemp -d "${TMPDIR:-/tmp}/pulsar-unspecified-auth.XXXXXX")" +trap 'rm -rf -- "$WORK_DIR"' EXIT + +docker inspect "$CONTAINER" >/dev/null + +if ! docker exec "$CONTAINER" pulsard keys show "$RECIPIENT_KEY" \ + --home "$VALIDATOR_HOME" --keyring-backend test >/dev/null 2>&1; then + docker exec "$CONTAINER" pulsard keys add "$RECIPIENT_KEY" \ + --home "$VALIDATOR_HOME" --keyring-backend test >/dev/null 2>&1 +fi + +RECIPIENT_ADDRESS="$(docker exec "$CONTAINER" pulsard keys show "$RECIPIENT_KEY" \ + --address --home "$VALIDATOR_HOME" --keyring-backend test)" + +docker exec "$CONTAINER" pulsard tx bank send "$FROM_KEY" "$RECIPIENT_ADDRESS" "$AMOUNT" \ + --from "$FROM_KEY" \ + --home "$VALIDATOR_HOME" \ + --keyring-backend test \ + --chain-id "$CHAIN_ID" \ + --node "$NODE" \ + --gas 200000 \ + --fees "$FEES" \ + --generate-only \ + --output json >"$WORK_DIR/unsigned.json" + +python3 - "$WORK_DIR/unsigned.json" "$MODE" >"$WORK_DIR/extended.json" <<'PY' +import json +import sys + +tx = json.load(open(sys.argv[1], encoding="utf-8")) +tx["body"]["extension_options"] = [{ + "@type": "/pulsarchain.ante.v1.TxAuthModeExtension", + "tx_auth_mode": sys.argv[2], +}] +json.dump(tx, sys.stdout) +PY + +docker exec -i "$CONTAINER" pulsard tx sign /dev/stdin \ + --from "$FROM_KEY" \ + --home "$VALIDATOR_HOME" \ + --keyring-backend test \ + --chain-id "$CHAIN_ID" \ + --node "$NODE" \ + --output-document /dev/stdout \ + <"$WORK_DIR/extended.json" >"$WORK_DIR/signed.json" + +docker exec -i "$CONTAINER" pulsard tx broadcast /dev/stdin \ + --node "$NODE" --output json \ + <"$WORK_DIR/signed.json" >"$WORK_DIR/broadcast.json" + +TX_HASH="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["txhash"])' "$WORK_DIR/broadcast.json")" +for _ in $(seq 1 60); do + if docker exec "$CONTAINER" pulsard query tx "$TX_HASH" --node "$NODE" --output json \ + >"$WORK_DIR/result.json" 2>/dev/null; then + CODE="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["code"])' "$WORK_DIR/result.json")" + cat "$WORK_DIR/result.json" + [[ "$CODE" == "0" ]] + exit + fi + sleep 1 +done + +echo "error: transaction was not included: $TX_HASH" >&2 +exit 1 From 4e1611f4f81223ce559a13344c653a007e9323e2 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Wed, 26 Aug 2026 20:19:08 +0300 Subject: [PATCH 45/51] feat: implement smart account tx sender --- scripts/devtools/auth_mode_tx.go | 30 ++ scripts/devtools/main.go | 12 + scripts/devtools/smart_account_tx.go | 322 +++++++++++++++++++++ scripts/send_smart_account_auth_mode_tx.sh | 46 +++ scripts/setup_local_testnet.sh | 31 +- scripts/setup_local_testnet_helper.py | 82 +++++- scripts/test_setup_local_testnet_helper.py | 44 +++ 7 files changed, 561 insertions(+), 6 deletions(-) create mode 100644 scripts/devtools/smart_account_tx.go create mode 100755 scripts/send_smart_account_auth_mode_tx.sh diff --git a/scripts/devtools/auth_mode_tx.go b/scripts/devtools/auth_mode_tx.go index 10463844..6aa2c0b7 100644 --- a/scripts/devtools/auth_mode_tx.go +++ b/scripts/devtools/auth_mode_tx.go @@ -3,6 +3,7 @@ package main import ( "bytes" "context" + stdlibed25519 "crypto/ed25519" "encoding/binary" "encoding/hex" "encoding/json" @@ -46,6 +47,35 @@ type minaRegistrationMaterial struct { MinaSignature string `json:"mina_signature"` } +func runDeriveEd25519Pub(args []string, stdout io.Writer) error { + if len(args) != 1 { + return errors.New("usage: devtools derive-ed25519-pub ") + } + privateKeyBytes, err := decodeHexOrBase64(args[0]) + if err != nil { + return fmt.Errorf("decode Ed25519 private key: %w", err) + } + + var privateKey stdlibed25519.PrivateKey + switch len(privateKeyBytes) { + case stdlibed25519.SeedSize: + privateKey = stdlibed25519.NewKeyFromSeed(privateKeyBytes) + case stdlibed25519.PrivateKeySize: + privateKey = stdlibed25519.PrivateKey(privateKeyBytes) + default: + return fmt.Errorf( + "invalid Ed25519 private key length: got %d bytes, want %d-byte seed or %d-byte private key", + len(privateKeyBytes), + stdlibed25519.SeedSize, + stdlibed25519.PrivateKeySize, + ) + } + + publicKey := privateKey.Public().(stdlibed25519.PublicKey) + _, err = fmt.Fprintln(stdout, hex.EncodeToString(publicKey)) + return err +} + func runMinaRegistrationMaterial(args []string, stdout io.Writer) error { fs := flag.NewFlagSet("mina-registration-material", flag.ContinueOnError) fs.SetOutput(io.Discard) diff --git a/scripts/devtools/main.go b/scripts/devtools/main.go index 1e9de095..d36de2fc 100644 --- a/scripts/devtools/main.go +++ b/scripts/devtools/main.go @@ -53,6 +53,11 @@ func run(args []string, stdout, stderr io.Writer) int { fmt.Fprintf(stderr, "error: %v\n", err) return 1 } + case "send-smart-account-tx": + if err := runSendSmartAccountTx(args[1:], stdout); err != nil { + fmt.Fprintf(stderr, "error: %v\n", err) + return 1 + } case "mina-registration-material": if err := runMinaRegistrationMaterial(args[1:], stdout); err != nil { fmt.Fprintf(stderr, "error: %v\n", err) @@ -63,6 +68,11 @@ func run(args []string, stdout, stderr io.Writer) int { fmt.Fprintf(stderr, "error: %v\n", err) return 1 } + case "derive-ed25519-pub": + if err := runDeriveEd25519Pub(args[1:], stdout); err != nil { + fmt.Fprintf(stderr, "error: %v\n", err) + return 1 + } case "-h", "--help", "help": printUsage(stdout) default: @@ -81,8 +91,10 @@ func printUsage(out io.Writer) { fmt.Fprintln(out, " derive-mina-pub ") fmt.Fprintln(out, " verify-vote-extensions [--grpc-addr addr] [--network-id id] [--timeout duration]") fmt.Fprintln(out, " query-archive-wrapper --address addr --transport-mode mode --latest height --target height") + fmt.Fprintln(out, " send-smart-account-tx --from addr --to addr --identity value --session-key-file path [flags]") fmt.Fprintln(out, " mina-registration-material --chain-id id --cosmos-public-key value --mina-private-key value") fmt.Fprintln(out, " send-mina-auth-mode-tx --from addr --to addr --mina-private-key value [flags]") + fmt.Fprintln(out, " derive-ed25519-pub ") } func runQueryArchiveWrapper(args []string, stdout io.Writer) error { diff --git a/scripts/devtools/smart_account_tx.go b/scripts/devtools/smart_account_tx.go new file mode 100644 index 00000000..be6e742a --- /dev/null +++ b/scripts/devtools/smart_account_tx.go @@ -0,0 +1,322 @@ +package main + +import ( + "context" + stdlibed25519 "crypto/ed25519" + "encoding/base64" + "encoding/hex" + "encoding/json" + "errors" + "flag" + "fmt" + "io" + "os" + "strings" + "time" + + "cosmossdk.io/core/address" + txsigning "cosmossdk.io/x/tx/signing" + "github.com/cosmos/cosmos-sdk/client" + clienttx "github.com/cosmos/cosmos-sdk/client/tx" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + "github.com/cosmos/cosmos-sdk/std" + sdk "github.com/cosmos/cosmos-sdk/types" + txtypes "github.com/cosmos/cosmos-sdk/types/tx" + signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + gogoproto "github.com/cosmos/gogoproto/proto" + appante "github.com/node101-io/pulsar-chain/app/ante" + antetypes "github.com/node101-io/pulsar-chain/app/ante/types" + smartaccountstypes "github.com/node101-io/pulsar-chain/x/smartaccounts/types" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/status" +) + +const pulsarAccountPrefix = "pulsar" + +type smartAccountTxResult struct { + TxHash string `json:"tx_hash"` + Height int64 `json:"height"` + Code uint32 `json:"code"` + Codespace string `json:"codespace,omitempty"` + RawLog string `json:"raw_log,omitempty"` + GasWanted int64 `json:"gas_wanted"` + GasUsed int64 `json:"gas_used"` +} + +func runSendSmartAccountTx(args []string, stdout io.Writer) error { + fs := flag.NewFlagSet("send-smart-account-tx", flag.ContinueOnError) + fs.SetOutput(stdout) + grpcAddr := fs.String("grpc-addr", "127.0.0.1:9090", "Pulsar gRPC endpoint") + chainID := fs.String("chain-id", "mytestnet", "Pulsar chain id") + from := fs.String("from", "", "smart account's canonical Pulsar account address") + to := fs.String("to", "", "recipient Pulsar account address") + identityValue := fs.String("identity", "", "32-byte smart account identity, encoded as hex or base64") + sessionKeyFile := fs.String("session-key-file", "", "file containing a 32-byte Ed25519 seed or 64-byte private key, encoded as hex or base64") + amountValue := fs.String("amount", "1pmina", "coins to send") + feeValue := fs.String("fees", "100pmina", "transaction fees") + gas := fs.Uint64("gas", 200000, "transaction gas limit") + memo := fs.String("memo", "smart-account-local-test", "transaction memo") + wait := fs.Bool("wait", true, "wait for the transaction to be included in a block") + timeout := fs.Duration("timeout", 30*time.Second, "query, broadcast, and inclusion timeout") + if err := fs.Parse(args); err != nil { + if err == flag.ErrHelp { + return nil + } + return err + } + if fs.NArg() != 0 { + return fmt.Errorf("unexpected positional arguments: %s", strings.Join(fs.Args(), " ")) + } + if *from == "" || *to == "" || *identityValue == "" || *sessionKeyFile == "" { + return errors.New("--from, --to, --identity, and --session-key-file are required") + } + if *chainID == "" || *grpcAddr == "" || *gas == 0 || *timeout <= 0 { + return errors.New("--chain-id, --grpc-addr, --gas, and --timeout must be non-zero") + } + + addressCodec := authcodec.NewBech32Codec(pulsarAccountPrefix) + if _, err := addressCodec.StringToBytes(*from); err != nil { + return fmt.Errorf("invalid --from address: %w", err) + } + if _, err := addressCodec.StringToBytes(*to); err != nil { + return fmt.Errorf("invalid --to address: %w", err) + } + + identity, err := decodeHexOrBase64(*identityValue) + if err != nil { + return fmt.Errorf("decode --identity: %w", err) + } + if len(identity) != smartaccountstypes.IdentitySize { + return fmt.Errorf("invalid identity length: got %d bytes, want %d", len(identity), smartaccountstypes.IdentitySize) + } + + sessionPrivateKey, err := readSessionPrivateKey(*sessionKeyFile) + if err != nil { + return err + } + + amount, err := sdk.ParseCoinsNormalized(*amountValue) + if err != nil { + return fmt.Errorf("invalid --amount %q: %w", *amountValue, err) + } + if amount.Empty() || !amount.IsAllPositive() { + return fmt.Errorf("invalid --amount %q: amount must contain positive coins", *amountValue) + } + fees, err := sdk.ParseCoinsNormalized(*feeValue) + if err != nil { + return fmt.Errorf("invalid --fees %q: %w", *feeValue, err) + } + if !fees.IsValid() || fees.IsAnyNegative() { + return fmt.Errorf("invalid --fees %q: fees must contain non-negative valid coins", *feeValue) + } + + txConfig, err := newSmartAccountTxConfig(addressCodec) + if err != nil { + return err + } + + conn, err := grpc.NewClient(*grpcAddr, grpc.WithTransportCredentials(insecure.NewCredentials())) + if err != nil { + return fmt.Errorf("create gRPC client for %s: %w", *grpcAddr, err) + } + defer conn.Close() + + ctx, cancel := context.WithTimeout(context.Background(), *timeout) + defer cancel() + + accountResponse, err := authtypes.NewQueryClient(conn).AccountInfo(ctx, &authtypes.QueryAccountInfoRequest{ + Address: *from, + }) + if err != nil { + return fmt.Errorf("query account %s: %w", *from, err) + } + account := accountResponse.GetInfo() + if account == nil { + return fmt.Errorf("account query returned no account info for %s", *from) + } + + txBuilder := txConfig.NewTxBuilder() + if err := txBuilder.SetMsgs(&banktypes.MsgSend{ + FromAddress: *from, + ToAddress: *to, + Amount: amount, + }); err != nil { + return fmt.Errorf("set MsgSend: %w", err) + } + txBuilder.SetFeeAmount(fees) + txBuilder.SetGasLimit(*gas) + txBuilder.SetMemo(*memo) + + extendedBuilder, ok := txBuilder.(client.ExtendedTxBuilder) + if !ok { + return errors.New("tx builder does not support extension options") + } + extension := &antetypes.TxAuthModeExtension{ + TxAuthMode: antetypes.TX_AUTH_MODE_SMART_ACCOUNT, + SmartAccountIdentity: identity, + } + extensionBytes, err := gogoproto.Marshal(extension) + if err != nil { + return fmt.Errorf("marshal smart account auth extension: %w", err) + } + extendedBuilder.SetExtensionOptions(&codectypes.Any{ + TypeUrl: "/" + gogoproto.MessageName(extension), + Value: extensionBytes, + }) + + placeholder := signingtypes.SignatureV2{ + PubKey: sessionPrivateKey.PubKey(), + Data: &signingtypes.SingleSignatureData{ + SignMode: signingtypes.SignMode_SIGN_MODE_DIRECT, + }, + Sequence: account.Sequence, + } + if err := txBuilder.SetSignatures(placeholder); err != nil { + return fmt.Errorf("set placeholder signature: %w", err) + } + + signature, err := clienttx.SignWithPrivKey( + ctx, + signingtypes.SignMode_SIGN_MODE_DIRECT, + authsigning.SignerData{ + Address: *from, + ChainID: *chainID, + AccountNumber: account.AccountNumber, + Sequence: account.Sequence, + }, + txBuilder, + sessionPrivateKey, + txConfig, + account.Sequence, + ) + if err != nil { + return fmt.Errorf("sign smart account transaction: %w", err) + } + if err := txBuilder.SetSignatures(signature); err != nil { + return fmt.Errorf("set signed transaction signature: %w", err) + } + + txBytes, err := txConfig.TxEncoder()(txBuilder.GetTx()) + if err != nil { + return fmt.Errorf("encode signed transaction: %w", err) + } + + txClient := txtypes.NewServiceClient(conn) + broadcastResponse, err := txClient.BroadcastTx(ctx, &txtypes.BroadcastTxRequest{ + TxBytes: txBytes, + Mode: txtypes.BroadcastMode_BROADCAST_MODE_SYNC, + }) + if err != nil { + return fmt.Errorf("broadcast transaction: %w", err) + } + checkTx := broadcastResponse.GetTxResponse() + if checkTx == nil { + return errors.New("broadcast returned no transaction response") + } + if checkTx.Code != 0 { + return fmt.Errorf("CheckTx rejected transaction (codespace=%s code=%d): %s", checkTx.Codespace, checkTx.Code, checkTx.RawLog) + } + if !*wait { + return writeSmartAccountTxResult(stdout, checkTx) + } + + for { + included, queryErr := txClient.GetTx(ctx, &txtypes.GetTxRequest{Hash: checkTx.TxHash}) + if queryErr == nil && included.GetTxResponse() != nil { + response := included.GetTxResponse() + if response.Code != 0 { + return fmt.Errorf("DeliverTx failed (tx_hash=%s codespace=%s code=%d): %s", response.TxHash, response.Codespace, response.Code, response.RawLog) + } + return writeSmartAccountTxResult(stdout, response) + } + if queryErr != nil && status.Code(queryErr) != codes.NotFound { + return fmt.Errorf("query transaction %s: %w", checkTx.TxHash, queryErr) + } + + select { + case <-ctx.Done(): + return fmt.Errorf("transaction %s passed CheckTx but was not found before timeout: %w", checkTx.TxHash, ctx.Err()) + case <-time.After(500 * time.Millisecond): + } + } +} + +func newSmartAccountTxConfig(addressCodec address.Codec) (client.TxConfig, error) { + interfaceRegistry, err := codectypes.NewInterfaceRegistryWithOptions(codectypes.InterfaceRegistryOptions{ + ProtoFiles: gogoproto.HybridResolver, + SigningOptions: txsigning.Options{ + AddressCodec: addressCodec, + ValidatorAddressCodec: authcodec.NewBech32Codec(pulsarAccountPrefix + "valoper"), + }, + }) + if err != nil { + return nil, fmt.Errorf("create interface registry: %w", err) + } + std.RegisterInterfaces(interfaceRegistry) + auth.AppModuleBasic{}.RegisterInterfaces(interfaceRegistry) + banktypes.RegisterInterfaces(interfaceRegistry) + appante.RegisterInterfaces(interfaceRegistry) + + return authtx.NewTxConfig(codec.NewProtoCodec(interfaceRegistry), authtx.DefaultSignModes), nil +} + +func readSessionPrivateKey(path string) (*ed25519.PrivKey, error) { + encoded, err := os.ReadFile(path) + if err != nil { + return nil, fmt.Errorf("read --session-key-file: %w", err) + } + keyBytes, err := decodeHexOrBase64(string(encoded)) + if err != nil { + return nil, fmt.Errorf("decode --session-key-file: %w", err) + } + + switch len(keyBytes) { + case ed25519.SeedSize: + return &ed25519.PrivKey{Key: stdlibed25519.NewKeyFromSeed(keyBytes)}, nil + case ed25519.PrivKeySize: + seedDerived := stdlibed25519.NewKeyFromSeed(keyBytes[:ed25519.SeedSize]) + if !stdlibed25519.PrivateKey(keyBytes).Equal(seedDerived) { + return nil, errors.New("64-byte session private key contains a public-key suffix that does not match its seed") + } + return &ed25519.PrivKey{Key: append([]byte(nil), keyBytes...)}, nil + default: + return nil, fmt.Errorf("invalid session private key length: got %d bytes, want %d-byte seed or %d-byte private key", len(keyBytes), ed25519.SeedSize, ed25519.PrivKeySize) + } +} + +func decodeHexOrBase64(value string) ([]byte, error) { + value = strings.TrimSpace(value) + if value == "" { + return nil, errors.New("value is empty") + } + hexValue := strings.TrimPrefix(value, "0x") + if decoded, err := hex.DecodeString(hexValue); err == nil { + return decoded, nil + } + if decoded, err := base64.StdEncoding.DecodeString(value); err == nil { + return decoded, nil + } + return nil, errors.New("value is neither valid hex nor standard base64") +} + +func writeSmartAccountTxResult(out io.Writer, txResponse *sdk.TxResponse) error { + return json.NewEncoder(out).Encode(smartAccountTxResult{ + TxHash: txResponse.TxHash, + Height: txResponse.Height, + Code: txResponse.Code, + Codespace: txResponse.Codespace, + RawLog: txResponse.RawLog, + GasWanted: txResponse.GasWanted, + GasUsed: txResponse.GasUsed, + }) +} diff --git a/scripts/send_smart_account_auth_mode_tx.sh b/scripts/send_smart_account_auth_mode_tx.sh new file mode 100755 index 00000000..e8926c75 --- /dev/null +++ b/scripts/send_smart_account_auth_mode_tx.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd -- "$SCRIPT_DIR/.." && pwd)" +PROJECT_NAME="${PULSAR_DOCKER_PROJECT:-pulsar-testnet-3}" +CONTAINER="${PULSAR_VALIDATOR_CONTAINER:-${PROJECT_NAME}-validator1-1}" +VALIDATOR_HOME="${PULSAR_VALIDATOR_HOME:-/testnet/.pulsar-node1}" +CHAIN_ID="${CHAIN_ID:-mytestnet}" +OWNER_KEY="${AUTH_MODE_FROM_KEY:-validator1}" +RECIPIENT_KEY="${AUTH_MODE_RECIPIENT_KEY:-auth-mode-recipient}" +IDENTITY_HEX="${SMART_ACCOUNT_AUTH_MODE_IDENTITY_HEX:-a54bcb4b2f5749e85d7a4038e291882da23adfa36d2f8ad374d1847dc6eeb4ec}" +SESSION_PRIVATE_KEY="${SMART_ACCOUNT_AUTH_MODE_SESSION_PRIVATE_KEY:-517a96fb99ad7a1af9f2064c7f87738a5059c527b18c5ed6898f7b583862684c}" +AMOUNT="${AUTH_MODE_SEND_AMOUNT:-1pmina}" +FEES="${AUTH_MODE_FEES:-100pmina}" +GRPC_ADDR="${PULSAR_GRPC_ADDR:-127.0.0.1:9090}" + +WORK_DIR="$(mktemp -d "${TMPDIR:-/tmp}/pulsar-smart-account-auth.XXXXXX")" +trap 'rm -rf -- "$WORK_DIR"' EXIT + +docker inspect "$CONTAINER" >/dev/null + +if ! docker exec "$CONTAINER" pulsard keys show "$RECIPIENT_KEY" \ + --home "$VALIDATOR_HOME" --keyring-backend test >/dev/null 2>&1; then + docker exec "$CONTAINER" pulsard keys add "$RECIPIENT_KEY" \ + --home "$VALIDATOR_HOME" --keyring-backend test >/dev/null 2>&1 +fi + +OWNER_ADDRESS="$(docker exec "$CONTAINER" pulsard keys show "$OWNER_KEY" \ + --address --home "$VALIDATOR_HOME" --keyring-backend test)" +RECIPIENT_ADDRESS="$(docker exec "$CONTAINER" pulsard keys show "$RECIPIENT_KEY" \ + --address --home "$VALIDATOR_HOME" --keyring-backend test)" + +printf '%s\n' "$SESSION_PRIVATE_KEY" >"$WORK_DIR/session-key.hex" + +cd "$REPO_ROOT" +go run -tags=purego ./scripts/devtools send-smart-account-tx \ + --grpc-addr "$GRPC_ADDR" \ + --chain-id "$CHAIN_ID" \ + --from "$OWNER_ADDRESS" \ + --to "$RECIPIENT_ADDRESS" \ + --identity "$IDENTITY_HEX" \ + --session-key-file "$WORK_DIR/session-key.hex" \ + --amount "$AMOUNT" \ + --fees "$FEES" diff --git a/scripts/setup_local_testnet.sh b/scripts/setup_local_testnet.sh index b1942302..4094400f 100755 --- a/scripts/setup_local_testnet.sh +++ b/scripts/setup_local_testnet.sh @@ -515,12 +515,16 @@ if [[ -z "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" ]]; then echo "smartaccounts verification key hash is required; set SMART_ACCOUNTS_VERIFICATION_KEY_HASH or genesis.app_state.smartaccounts.params.verification_key_hash in $CHAIN_CONFIG_PATH" >&2 exit 1 fi +SMART_ACCOUNT_AUTH_MODE_IDENTITY_HEX="${SMART_ACCOUNT_AUTH_MODE_IDENTITY_HEX:-a54bcb4b2f5749e85d7a4038e291882da23adfa36d2f8ad374d1847dc6eeb4ec}" +SMART_ACCOUNT_AUTH_MODE_SESSION_PRIVATE_KEY="${SMART_ACCOUNT_AUTH_MODE_SESSION_PRIVATE_KEY:-517a96fb99ad7a1af9f2064c7f87738a5059c527b18c5ed6898f7b583862684c}" +SMART_ACCOUNT_AUTH_MODE_EXPIRES_AT_HEIGHT="${SMART_ACCOUNT_AUTH_MODE_EXPIRES_AT_HEIGHT:-1000000}" validate_positive_int "confirmation depth" "$BRIDGE_CONFIRMATION_DEPTH" validate_non_empty "contract address" "$BRIDGE_CONTRACT_ADDRESS" validate_positive_int "start block height" "$BRIDGE_START_BLOCK_HEIGHT" validate_positive_int "max block range" "$BRIDGE_MAX_BLOCK_RANGE" validate_positive_int "actions reduced root snapshot window size" "$BRIDGE_ACTIONS_REDUCED_ROOT_SNAPSHOT_WINDOW_SIZE" +validate_positive_int "smart-account auth-mode expiration height" "$SMART_ACCOUNT_AUTH_MODE_EXPIRES_AT_HEIGHT" if [[ "$ENABLE_VERIFIER_SIDECARS" != "0" && "$ENABLE_VERIFIER_SIDECARS" != "1" ]]; then echo "ENABLE_VERIFIER_SIDECARS must be 0 or 1" >&2 exit 1 @@ -640,17 +644,34 @@ python3 "$PYTHON_HELPER" patch-bridge-genesis \ --max-block-range "$BRIDGE_MAX_BLOCK_RANGE" \ --actions-reduced-root-snapshot-window-size "$BRIDGE_ACTIONS_REDUCED_ROOT_SNAPSHOT_WINDOW_SIZE" -echo "==> Setting smartaccounts genesis params..." -python3 "$PYTHON_HELPER" patch-smartaccounts-genesis \ - --genesis "$PRIMARY_GENESIS_FILE" \ - --verification-key-hash "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" - echo "==> Creating validator keys..." for ((i = 1; i <= VALIDATOR_COUNT; i++)); do "$BINARY_PATH" keys add "${NODE_KEY_NAMES[i]}" --home "${NODE_HOMES[i]}" --keyring-backend "$KEYRING_BACKEND" >/dev/null 2>&1 NODE_ADDRS[i]="$("$BINARY_PATH" keys show "${NODE_KEY_NAMES[i]}" --address --home "${NODE_HOMES[i]}" --keyring-backend "$KEYRING_BACKEND")" done +SMART_ACCOUNT_AUTH_MODE_ACCOUNT_ADDRESS_HEX="$( + "$BINARY_PATH" debug addr "${NODE_ADDRS[PRIMARY_NODE_INDEX]}" \ + | sed -n 's/^Address (hex): //p' \ + | tr '[:upper:]' '[:lower:]' +)" +if [[ ! "$SMART_ACCOUNT_AUTH_MODE_ACCOUNT_ADDRESS_HEX" =~ ^[0-9a-f]{40}$ ]]; then + echo "failed to derive smart-account auth-mode owner address bytes" >&2 + exit 1 +fi +SMART_ACCOUNT_AUTH_MODE_SESSION_PUBLIC_KEY="$( + "$DEVTOOLS_BINARY_PATH" derive-ed25519-pub "$SMART_ACCOUNT_AUTH_MODE_SESSION_PRIVATE_KEY" +)" + +echo "==> Setting smartaccounts genesis params and auth-mode fixture..." +python3 "$PYTHON_HELPER" patch-smartaccounts-genesis \ + --genesis "$PRIMARY_GENESIS_FILE" \ + --verification-key-hash "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" \ + --identity "$SMART_ACCOUNT_AUTH_MODE_IDENTITY_HEX" \ + --account-address "$SMART_ACCOUNT_AUTH_MODE_ACCOUNT_ADDRESS_HEX" \ + --session-public-key "$SMART_ACCOUNT_AUTH_MODE_SESSION_PUBLIC_KEY" \ + --expires-at-height "$SMART_ACCOUNT_AUTH_MODE_EXPIRES_AT_HEIGHT" + E2E_USER_MINA_PUB_KEY="" E2E_USER_COSMOS_PUB_KEY="" if [[ -n "${E2E_USER_MINA_PRIV_KEY:-}" ]]; then diff --git a/scripts/setup_local_testnet_helper.py b/scripts/setup_local_testnet_helper.py index 67c6ef15..33e484c5 100644 --- a/scripts/setup_local_testnet_helper.py +++ b/scripts/setup_local_testnet_helper.py @@ -794,6 +794,10 @@ def decode_smartaccounts_verification_key_hash(verification_key_hash: str) -> by def patch_smartaccounts_genesis( genesis_path: str, verification_key_hash: str, + identity: Optional[str] = None, + account_address: Optional[str] = None, + session_public_key: Optional[str] = None, + expires_at_height: Optional[str] = None, ) -> int: hash_bytes = decode_smartaccounts_verification_key_hash( verification_key_hash @@ -806,7 +810,75 @@ def patch_smartaccounts_genesis( smartaccounts["params"] = { "verification_key_hash": base64.b64encode(hash_bytes).decode("ascii") } - smartaccounts.setdefault("smart_accounts", []) + fixture_values = ( + identity, + account_address, + session_public_key, + expires_at_height, + ) + if any(value is not None for value in fixture_values): + if not all(value is not None for value in fixture_values): + raise SystemExit( + "smartaccounts auth-mode fixture fields must be supplied together" + ) + + def decode_fixture_value(value: str, expected_size: int, name: str) -> bytes: + encoded = value.strip() + hex_value = encoded[2:] if encoded.startswith("0x") else encoded + if re.fullmatch(r"[0-9a-fA-F]+", hex_value) and len(hex_value) % 2 == 0: + decoded = bytes.fromhex(hex_value) + else: + try: + decoded = base64.b64decode(encoded, validate=True) + except ValueError as exc: + raise SystemExit(f"{name} must be valid hex or base64") from exc + if len(decoded) != expected_size: + raise SystemExit( + f"{name} must be {expected_size} bytes: got {len(decoded)}" + ) + return decoded + + identity_bytes = decode_fixture_value(identity, 32, "identity") + account_address_bytes = decode_fixture_value( + account_address, 20, "account address" + ) + session_public_key_bytes = decode_fixture_value( + session_public_key, 32, "session public key" + ) + try: + expiration = int(expires_at_height) + except ValueError as exc: + raise SystemExit("expires at height must be an integer") from exc + if expiration <= 0 or expiration > 2**64 - 1: + raise SystemExit("expires at height must be a non-zero uint64") + + encoded_identity = base64.b64encode(identity_bytes).decode("ascii") + existing_accounts = smartaccounts.setdefault("smart_accounts", []) + smartaccounts["smart_accounts"] = [ + entry + for entry in existing_accounts + if entry.get("identity") != encoded_identity + ] + smartaccounts["smart_accounts"].append( + { + "identity": encoded_identity, + "account": { + "account_address": base64.b64encode( + account_address_bytes + ).decode("ascii"), + "session_keys": [ + { + "public_key": base64.b64encode( + session_public_key_bytes + ).decode("ascii"), + "expires_at_height": str(expiration), + } + ], + }, + } + ) + else: + smartaccounts.setdefault("smart_accounts", []) write_json(genesis_path, genesis) return 0 @@ -1025,6 +1097,10 @@ def build_parser() -> argparse.ArgumentParser: patch_smartaccounts = subparsers.add_parser("patch-smartaccounts-genesis") patch_smartaccounts.add_argument("--genesis", required=True) patch_smartaccounts.add_argument("--verification-key-hash", required=True) + patch_smartaccounts.add_argument("--identity") + patch_smartaccounts.add_argument("--account-address") + patch_smartaccounts.add_argument("--session-public-key") + patch_smartaccounts.add_argument("--expires-at-height") verify_registry = subparsers.add_parser("verify-validator-key-pairs") verify_registry.add_argument("--genesis", required=True) @@ -1117,6 +1193,10 @@ def main() -> int: return patch_smartaccounts_genesis( args.genesis, args.verification_key_hash, + args.identity, + args.account_address, + args.session_public_key, + args.expires_at_height, ) if args.command == "verify-validator-key-pairs": return verify_validator_key_pairs(args.genesis, args.cosmos_key) diff --git a/scripts/test_setup_local_testnet_helper.py b/scripts/test_setup_local_testnet_helper.py index 1470f711..7965cb0b 100644 --- a/scripts/test_setup_local_testnet_helper.py +++ b/scripts/test_setup_local_testnet_helper.py @@ -460,6 +460,50 @@ def test_patch_smartaccounts_genesis_sets_verification_key_hash(self): ) self.assertEqual([], smartaccounts["smart_accounts"]) + def test_patch_smartaccounts_genesis_adds_auth_mode_fixture(self): + genesis = self.write_temp("genesis.json", json.dumps({"app_state": {}})) + verification_key_hash = bytes(range(32)) + identity = bytes(range(32, 64)) + account_address = bytes(range(20)) + session_public_key = bytes(range(64, 96)) + + self.assertEqual( + 0, + helper.patch_smartaccounts_genesis( + str(genesis), + verification_key_hash.hex(), + identity.hex(), + account_address.hex(), + session_public_key.hex(), + "1000000", + ), + ) + + smartaccounts = json.loads(genesis.read_text(encoding="utf-8"))[ + "app_state" + ]["smartaccounts"] + self.assertEqual( + [ + { + "identity": base64.b64encode(identity).decode("ascii"), + "account": { + "account_address": base64.b64encode( + account_address + ).decode("ascii"), + "session_keys": [ + { + "public_key": base64.b64encode( + session_public_key + ).decode("ascii"), + "expires_at_height": "1000000", + } + ], + }, + } + ], + smartaccounts["smart_accounts"], + ) + def test_reads_module_params_through_the_same_generic_path(self): config = self.write_temp( "config.yml", From 29e01b828113470f9c206ceb9a9064678f13b69a Mon Sep 17 00:00:00 2001 From: Yusuf Date: Wed, 26 Aug 2026 21:41:09 +0300 Subject: [PATCH 46/51] feat(smartaccounts): implement a small prover for e2e, add verifier to flow, and implement send_smart_account tx script for e2e --- .github/workflows/auth-mode-e2e.yml | 73 ++++ .gitignore | 1 + config.yml | 2 +- scripts/deploy_local_lightnet.sh | 82 ++-- .../generate_smart_account_noir_fixture.sh | 317 +++++++++++++++ scripts/send_mina_auth_mode_tx.sh | 28 +- scripts/send_smart_account_auth_mode_tx.sh | 46 --- scripts/send_smart_account_tx.sh | 360 ++++++++++++++++++ scripts/setup_local_testnet.sh | 26 +- scripts/setup_local_testnet_helper.py | 82 +--- scripts/test_archive_wrapper_deployment.sh | 41 +- scripts/test_deploy_local_lightnet.py | 18 + scripts/test_setup_local_testnet_helper.py | 44 --- .../smartaccounts/noir/bb-5.2.0/Nargo.toml | 6 + .../smartaccounts/noir/bb-5.2.0/README.md | 32 ++ .../smartaccounts/noir/bb-5.2.0/src/main.nr | 13 + .../pulsar/verifier/v1/proof.proto | 13 + .../verifier/v1/submission_service.proto | 20 + .../pulsarchain/verification/v1/types.proto | 10 + 19 files changed, 974 insertions(+), 240 deletions(-) create mode 100644 .github/workflows/auth-mode-e2e.yml create mode 100755 scripts/generate_smart_account_noir_fixture.sh delete mode 100755 scripts/send_smart_account_auth_mode_tx.sh create mode 100755 scripts/send_smart_account_tx.sh create mode 100644 testdata/smartaccounts/noir/bb-5.2.0/Nargo.toml create mode 100644 testdata/smartaccounts/noir/bb-5.2.0/README.md create mode 100644 testdata/smartaccounts/noir/bb-5.2.0/src/main.nr create mode 100644 testdata/smartaccounts/verifier-proto/pulsar/verifier/v1/proof.proto create mode 100644 testdata/smartaccounts/verifier-proto/pulsar/verifier/v1/submission_service.proto create mode 100644 testdata/smartaccounts/verifier-proto/pulsarchain/verification/v1/types.proto diff --git a/.github/workflows/auth-mode-e2e.yml b/.github/workflows/auth-mode-e2e.yml new file mode 100644 index 00000000..bcf6e855 --- /dev/null +++ b/.github/workflows/auth-mode-e2e.yml @@ -0,0 +1,73 @@ +name: Auth mode transactions + +on: + pull_request: + merge_group: + +permissions: + contents: read + +jobs: + auth-mode-e2e: + name: UNSPECIFIED, Cosmos, Mina, and smart-account transactions + runs-on: ubuntu-latest + timeout-minutes: 90 + defaults: + run: + working-directory: pulsar-chain + steps: + - name: Check out Pulsar + uses: actions/checkout@v4 + with: + path: pulsar-chain + + - name: Check out archive-wrapper contract + uses: actions/checkout@v4 + with: + repository: node101-io/archive-wrapper + ref: cd42a203ac6b43d24d9fbd57c323ecd52ea52bd5 + path: archive-wrapper + + - name: Check out pulsar-verifier contract + uses: actions/checkout@v4 + with: + repository: node101-io/pulsar-verifier + ref: e7582ba2aea2fa12b765221003a366868f39b3e8 + path: pulsar-verifier + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: pulsar-chain/go.mod + cache: true + cache-dependency-path: pulsar-chain/go.sum + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Run auth-mode transaction E2E + env: + ARCHIVE_WRAPPER_SOURCE: ${{ github.workspace }}/archive-wrapper + AUTH_MODE_E2E_ONLY: "1" + ENABLE_VERIFIER_SIDECARS: "1" + E2E_ARTIFACT_DIR: ${{ github.workspace }}/pulsar-chain/e2e-artifacts + PULSAR_VERIFIER_SOURCE: ${{ github.workspace }}/pulsar-verifier + run: | + set -o pipefail + ./scripts/test_archive_wrapper_deployment.sh shared 2>&1 \ + | sed -E \ + -e 's#postgres://[^ @]+@#postgres://[REDACTED]@#g' \ + -e 's/e2e-secret/[REDACTED]/g' \ + | tee auth-mode-e2e.log + + - name: Upload failure evidence + if: failure() + uses: actions/upload-artifact@v4 + with: + name: auth-mode-e2e-failure + if-no-files-found: ignore + path: | + pulsar-chain/auth-mode-e2e.log + pulsar-chain/e2e-artifacts/ diff --git a/.gitignore b/.gitignore index f83acbb7..07cfb1a0 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,6 @@ release/ *.log *.ign .docker/ +.cache/smartaccounts/ __pycache__/ *.py[cod] diff --git a/config.yml b/config.yml index 5393a1ce..6680b2bd 100644 --- a/config.yml +++ b/config.yml @@ -67,7 +67,7 @@ genesis: actions_reduced_root_snapshot_window_size: "4" smartaccounts: params: - verification_key_hash: "AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQE=" + verification_key_hash: "H+tIy6mnSrzGY5zHnUncjoHtn055HDcb32paoEspbus=" consensus: params: abci: diff --git a/scripts/deploy_local_lightnet.sh b/scripts/deploy_local_lightnet.sh index ef3e0d06..9b5d814b 100755 --- a/scripts/deploy_local_lightnet.sh +++ b/scripts/deploy_local_lightnet.sh @@ -24,6 +24,11 @@ LIGHTNET_OWNERSHIP_VALUE="mina-lightnet" WRAPPER_SOURCE="${ARCHIVE_WRAPPER_SOURCE:-$REPO_ROOT/../archive-wrapper}" WRAPPER_SHA="${ARCHIVE_WRAPPER_SHA:-cd42a203ac6b43d24d9fbd57c323ecd52ea52bd5}" WRAPPER_IMAGE="${ARCHIVE_WRAPPER_IMAGE:-archive-wrapper:lightnet}" +VERIFIER_SOURCE="${PULSAR_VERIFIER_SOURCE:-}" +VERIFIER_SHA="${PULSAR_VERIFIER_SHA:-e7582ba2aea2fa12b765221003a366868f39b3e8}" +VERIFIER_IMAGE="${PULSAR_VERIFIER_IMAGE:-pulsar-verifier:lightnet}" +VERIFIER_CACHE_ROOT="${PULSAR_VERIFIER_CACHE_ROOT:-$REPO_ROOT/.cache/pulsar-verifier}" +VERIFIER_REPOSITORY="https://github.com/node101-io/pulsar-verifier.git" PULSAR_IMAGE="" BRIDGE_CONFIRMATION_DEPTH="${BRIDGE_CONFIRMATION_DEPTH:-3}" BRIDGE_START_BLOCK_HEIGHT="${BRIDGE_START_BLOCK_HEIGHT:-1}" @@ -44,6 +49,7 @@ Recreates the local development stack with: - an existing running Mina Lightnet, or a new Dockerized Lightnet - the blocks_inserted LISTEN/NOTIFY trigger - one shared archive-wrapper in Docker + - one pulsar-verifier sidecar per validator - the requested number of Pulsar validators in Docker Destructive behavior: @@ -61,6 +67,12 @@ Optional environment variables: ARCHIVE_WRAPPER_SOURCE checkout path (default: ../archive-wrapper) ARCHIVE_WRAPPER_SHA commit to build (default pinned in the script) ARCHIVE_WRAPPER_IMAGE built image name (default: archive-wrapper:lightnet) + PULSAR_VERIFIER_SOURCE existing checkout override (default: automatic + pinned download under .cache/pulsar-verifier) + PULSAR_VERIFIER_SHA commit to build (default pinned in the script) + PULSAR_VERIFIER_IMAGE built image name (default: pulsar-verifier:lightnet) + PULSAR_VERIFIER_CACHE_ROOT automatic source cache (default: + .cache/pulsar-verifier) PULSAR_DOCKER_PROJECT Compose project (default: pulsar-testnet-N) PULSAR_DOCKER_STATE_ROOT generated state root (default: .docker) PULSAR_DOCKER_IMAGE Pulsar image name (default derived from N) @@ -72,12 +84,6 @@ Optional environment variables: SMART_ACCOUNTS_VERIFICATION_KEY_HASH 32-byte smartaccounts verification-key hash in hex or base64 (default: value from config.yml) - SMART_ACCOUNT_NOIR_FIXTURE_DIR - real smart-account Noir fixture directory; when - set, verification_key_hash is derived from its vk - PULSAR_VERIFIER_IMAGE production verifier image; required with the - smart-account Noir fixture - Default Mina Lightnet image: o1labs/mina-local-network@sha256:33e349241f5f3e8d336e5de9b35de2d4339fd8713b309e2b1b5fc375c2605b58 @@ -330,27 +336,6 @@ require_cmd docker require_cmd git require_cmd python3 -if [[ -n "${SMART_ACCOUNT_NOIR_FIXTURE_DIR:-}" ]]; then - if [[ ! -f "$SMART_ACCOUNT_NOIR_FIXTURE_DIR/vk" ]]; then - echo "smart-account Noir verification key not found: $SMART_ACCOUNT_NOIR_FIXTURE_DIR/vk" >&2 - exit 1 - fi - if [[ -z "${PULSAR_VERIFIER_IMAGE:-}" ]]; then - echo "PULSAR_VERIFIER_IMAGE is required with SMART_ACCOUNT_NOIR_FIXTURE_DIR" >&2 - exit 1 - fi - - fixture_verification_key_hash="$(python3 -c 'import hashlib,pathlib,sys; print(hashlib.sha256(pathlib.Path(sys.argv[1]).read_bytes()).hexdigest())' "$SMART_ACCOUNT_NOIR_FIXTURE_DIR/vk")" - fixture_verification_key_hash_base64="$(python3 -c 'import base64,sys; print(base64.b64encode(bytes.fromhex(sys.argv[1])).decode())' "$fixture_verification_key_hash")" - if [[ -n "${SMART_ACCOUNTS_VERIFICATION_KEY_HASH:-}" && - "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" != "$fixture_verification_key_hash" && - "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" != "$fixture_verification_key_hash_base64" ]]; then - echo "SMART_ACCOUNTS_VERIFICATION_KEY_HASH does not match SHA-256($SMART_ACCOUNT_NOIR_FIXTURE_DIR/vk)" >&2 - exit 1 - fi - export SMART_ACCOUNTS_VERIFICATION_KEY_HASH="$fixture_verification_key_hash" -fi - docker compose version >/dev/null docker buildx version >/dev/null @@ -372,9 +357,31 @@ fi WRAPPER_SOURCE="$(cd -- "$WRAPPER_SOURCE" && pwd)" git -C "$WRAPPER_SOURCE" cat-file -e "${WRAPPER_SHA}^{commit}" +if [[ -z "$VERIFIER_SOURCE" ]]; then + VERIFIER_CACHE_ROOT="$(python3 -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' "$VERIFIER_CACHE_ROOT")" + VERIFIER_SOURCE="$VERIFIER_CACHE_ROOT/$VERIFIER_SHA" + if [[ ! -d "$VERIFIER_SOURCE/.git" ]]; then + if [[ -e "$VERIFIER_SOURCE" && ! -d "$VERIFIER_SOURCE" ]]; then + echo "refusing invalid pulsar-verifier cache path: $VERIFIER_SOURCE" >&2 + exit 1 + fi + mkdir -p "$VERIFIER_SOURCE" + git -C "$VERIFIER_SOURCE" init --quiet + fi + if ! git -C "$VERIFIER_SOURCE" cat-file -e "${VERIFIER_SHA}^{commit}" 2>/dev/null; then + echo "==> Downloading pinned pulsar-verifier source" + git -C "$VERIFIER_SOURCE" fetch --depth 1 "$VERIFIER_REPOSITORY" "$VERIFIER_SHA" + fi +elif [[ ! -d "$VERIFIER_SOURCE/.git" ]]; then + echo "pulsar-verifier checkout not found at: $VERIFIER_SOURCE" >&2 + exit 1 +fi +VERIFIER_SOURCE="$(cd -- "$VERIFIER_SOURCE" && pwd)" +git -C "$VERIFIER_SOURCE" cat-file -e "${VERIFIER_SHA}^{commit}" + detect_running_lightnet -echo "==> 1/5 Removing previous Pulsar and archive-wrapper state" +echo "==> 1/6 Removing previous Pulsar, archive-wrapper, and verifier state" if (( REUSE_LIGHTNET == 1 )); then echo " preserving running owned Lightnet container: $LIGHTNET_CONTAINER" else @@ -384,9 +391,9 @@ cleanup_selected_project cleanup_owned_stale_lightnet if (( REUSE_LIGHTNET == 1 )); then - echo "==> 2/5 Reusing running Mina Lightnet with archive PostgreSQL" + echo "==> 2/6 Reusing running Mina Lightnet with archive PostgreSQL" else - echo "==> 2/5 Starting Mina Lightnet with archive PostgreSQL" + echo "==> 2/6 Starting Mina Lightnet with archive PostgreSQL" docker run -d \ --name "$LIGHTNET_CONTAINER" \ --label "${LIGHTNET_OWNERSHIP_LABEL}=${LIGHTNET_OWNERSHIP_VALUE}" \ @@ -405,7 +412,7 @@ fi wait_for_lightnet_archive -echo "==> 3/5 Installing the blocks_inserted LISTEN/NOTIFY trigger" +echo "==> 3/6 Installing the blocks_inserted LISTEN/NOTIFY trigger" install_notification_trigger trigger_exists="$(docker exec "$LIGHTNET_CONTAINER" \ @@ -416,7 +423,7 @@ if [[ "$trigger_exists" != "t" ]]; then exit 1 fi -echo "==> 4/5 Building the shared archive-wrapper image" +echo "==> 4/6 Building the shared archive-wrapper image" git -C "$WRAPPER_SOURCE" archive "$WRAPPER_SHA" | docker buildx build \ --load \ @@ -425,6 +432,14 @@ git -C "$WRAPPER_SOURCE" archive "$WRAPPER_SHA" | -t "$WRAPPER_IMAGE" \ - +echo "==> 5/6 Building the pulsar-verifier image" +git -C "$VERIFIER_SOURCE" archive "$VERIFIER_SHA" | + docker buildx build \ + --load \ + --platform linux/amd64 \ + -t "$VERIFIER_IMAGE" \ + - + PG_USER="$(docker exec "$LIGHTNET_CONTAINER" printenv POSTGRES_USER)" PG_PASSWORD="$(docker exec "$LIGHTNET_CONTAINER" printenv POSTGRES_PASSWORD)" PG_DB="$(docker exec "$LIGHTNET_CONTAINER" printenv POSTGRES_DB)" @@ -443,6 +458,7 @@ export ARCHIVE_WRAPPER_MODE="shared" export ARCHIVE_WRAPPER_IMAGE="$WRAPPER_IMAGE" export ARCHIVE_WRAPPER_ADD_HOST_GATEWAY=1 export PULSAR_DOCKER_IMAGE="$PULSAR_IMAGE" +export PULSAR_VERIFIER_IMAGE="$VERIFIER_IMAGE" export PULSAR_DOCKER_PROJECT="$PROJECT_NAME" export PULSAR_DOCKER_STATE_ROOT="$STATE_ROOT" export PULSAR_BIND_HOST="127.0.0.1" @@ -452,7 +468,7 @@ export BRIDGE_START_BLOCK_HEIGHT export BRIDGE_MAX_BLOCK_RANGE export VALIDATOR_STARTUP_TIMEOUT -echo "==> 5/5 Starting Pulsar with $VALIDATOR_COUNT validators" +echo "==> 6/6 Starting Pulsar with $VALIDATOR_COUNT validators and verifier sidecars" "$SCRIPT_DIR/docker_testnet.sh" up "$VALIDATOR_COUNT" for ((index = 1; index <= VALIDATOR_COUNT; index++)); do diff --git a/scripts/generate_smart_account_noir_fixture.sh b/scripts/generate_smart_account_noir_fixture.sh new file mode 100755 index 00000000..2427d6ba --- /dev/null +++ b/scripts/generate_smart_account_noir_fixture.sh @@ -0,0 +1,317 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd -- "$SCRIPT_DIR/.." && pwd)" +CIRCUIT_DIR="$REPO_ROOT/testdata/smartaccounts/noir/bb-5.2.0" +TOOL_CACHE="${SMART_ACCOUNT_TOOL_CACHE:-$REPO_ROOT/.cache/smartaccounts}" +NARGO_VERSION="1.0.0-beta.25" +BB_VERSION="5.2.0" +BN254_MODULUS="21888242871839275222246405745257275088548364400416034343698204186575808495617" +EXPECTED_VK_HASH="1feb48cba9a74abcc6639cc79d49dc8e81ed9f4e791c371bdf6a5aa04b296eeb" + +usage() { + cat <<'EOF' +usage: scripts/generate_smart_account_noir_fixture.sh \ + --output-dir DIR \ + --session-private-key HEX \ + --session-public-key HEX \ + --expires-at-height UINT64 \ + --identity HEX \ + --account-address HEX + +Generates proof, public_inputs, and vk for the local smart-account E2E circuit. +Pinned Nargo and Barretenberg binaries are downloaded into a gitignored cache +when SMART_ACCOUNT_NARGO_BIN and SMART_ACCOUNT_BB_BIN are not provided. +EOF +} + +fail() { + echo "error: $*" >&2 + exit 1 +} + +require_cmd() { + if ! command -v "$1" >/dev/null 2>&1; then + fail "missing required command: $1" + fi +} + +OUTPUT_DIR="" +SESSION_PRIVATE_KEY="" +SESSION_PUBLIC_KEY="" +EXPIRES_AT_HEIGHT="" +IDENTITY="" +ACCOUNT_ADDRESS="" + +while (( $# > 0 )); do + case "$1" in + --output-dir) OUTPUT_DIR="${2:-}"; shift 2 ;; + --session-private-key) SESSION_PRIVATE_KEY="${2:-}"; shift 2 ;; + --session-public-key) SESSION_PUBLIC_KEY="${2:-}"; shift 2 ;; + --expires-at-height) EXPIRES_AT_HEIGHT="${2:-}"; shift 2 ;; + --identity) IDENTITY="${2:-}"; shift 2 ;; + --account-address) ACCOUNT_ADDRESS="${2:-}"; shift 2 ;; + -h | --help) usage; exit 0 ;; + *) usage >&2; fail "unknown argument: $1" ;; + esac +done + +[[ -n "$OUTPUT_DIR" ]] || fail "--output-dir is required" +[[ -n "$SESSION_PRIVATE_KEY" ]] || fail "--session-private-key is required" +[[ -n "$SESSION_PUBLIC_KEY" ]] || fail "--session-public-key is required" +[[ -n "$EXPIRES_AT_HEIGHT" ]] || fail "--expires-at-height is required" +[[ -n "$IDENTITY" ]] || fail "--identity is required" +[[ -n "$ACCOUNT_ADDRESS" ]] || fail "--account-address is required" + +require_cmd curl +require_cmd python3 +require_cmd tar + +case "$(uname -s):$(uname -m)" in + Darwin:arm64 | Darwin:aarch64) + NARGO_ASSET="nargo-aarch64-apple-darwin.tar.gz" + NARGO_SHA256="63ed453d09a65bfc78eef63252423126959d41c85de0da0cf54289c5e266ceb5" + BB_ASSET="barretenberg-arm64-darwin.tar.gz" + BB_SHA256="54be7645c83ac762a38a696cfe0c1495223a4f931b82720bc9e2e47f9a43bf86" + ;; + Darwin:x86_64) + NARGO_ASSET="nargo-x86_64-apple-darwin.tar.gz" + NARGO_SHA256="660567c645f841389b1e37ddebd4f6c75417763018ea034e08b28338bf27673c" + BB_ASSET="barretenberg-amd64-darwin.tar.gz" + BB_SHA256="abf46d12a1a89ae7dc62cf1a84c82873696e1ee6cf925ce241402c0f45736b4b" + ;; + Linux:aarch64 | Linux:arm64) + NARGO_ASSET="nargo-aarch64-unknown-linux-gnu.tar.gz" + NARGO_SHA256="4e86553af99e87c047bae40f1315234709e8d815f6158f3b8a00bf68f512a2b7" + BB_ASSET="barretenberg-arm64-linux.tar.gz" + BB_SHA256="5bdc0552865428ea50d81f4da25b5aa372f45cce33baa0419cbddcd532bdbf30" + ;; + Linux:x86_64) + NARGO_ASSET="nargo-x86_64-unknown-linux-gnu.tar.gz" + NARGO_SHA256="bf3410ab94933a4aebd1f988b67ae974c6c227f9456ed0f1e4a3716bb8a30fe9" + BB_ASSET="barretenberg-amd64-linux.tar.gz" + BB_SHA256="17ab8476961728cdc5c69b6c4ff427c9092cef11d1e0b0166929a0417dfa7cfb" + ;; + *) fail "unsupported prover platform: $(uname -s) $(uname -m)" ;; +esac + +download_tool() { + local name="$1" + local version="$2" + local asset="$3" + local expected_sha256="$4" + local url="$5" + local destination="$TOOL_CACHE/$name-$version/$name" + + if [[ -x "$destination" ]]; then + printf '%s\n' "$destination" + return + fi + + local download_dir + download_dir="$(mktemp -d "${TMPDIR:-/tmp}/pulsar-$name.XXXXXX")" + local archive="$download_dir/$asset" + + echo "==> Downloading $name $version" >&2 + if ! curl --fail --location --retry 3 "$url" --output "$archive"; then + fail "failed to download $name $version" + fi + python3 - "$archive" "$expected_sha256" <<'PY' +import hashlib +import pathlib +import sys + +path = pathlib.Path(sys.argv[1]) +expected = sys.argv[2] +actual = hashlib.sha256(path.read_bytes()).hexdigest() +if actual != expected: + raise SystemExit(f"SHA-256 mismatch for {path.name}: got {actual}, want {expected}") +PY + + mkdir -p "$(dirname -- "$destination")" + if ! tar -xzf "$archive" -C "$(dirname -- "$destination")"; then + fail "failed to extract $name $version" + fi + [[ -x "$destination" ]] || fail "$name archive did not contain an executable named $name" + printf '%s\n' "$destination" +} + +NARGO_BIN="${SMART_ACCOUNT_NARGO_BIN:-}" +if [[ -z "$NARGO_BIN" ]]; then + NARGO_BIN="$(download_tool \ + nargo "$NARGO_VERSION" "$NARGO_ASSET" "$NARGO_SHA256" \ + "https://github.com/noir-lang/noir/releases/download/v${NARGO_VERSION}/${NARGO_ASSET}")" +fi + +BB_BIN="${SMART_ACCOUNT_BB_BIN:-}" +if [[ -z "$BB_BIN" ]]; then + BB_BIN="$(download_tool \ + bb "$BB_VERSION" "$BB_ASSET" "$BB_SHA256" \ + "https://github.com/AztecProtocol/aztec-packages/releases/download/v${BB_VERSION}/${BB_ASSET}")" +fi + +[[ -x "$NARGO_BIN" ]] || fail "Nargo binary is not executable: $NARGO_BIN" +[[ -x "$BB_BIN" ]] || fail "Barretenberg binary is not executable: $BB_BIN" +"$NARGO_BIN" --version | grep -F "$NARGO_VERSION" >/dev/null || \ + fail "Nargo must be version $NARGO_VERSION" +[[ "$("$BB_BIN" --version)" == "$BB_VERSION" ]] || \ + fail "Barretenberg must be version $BB_VERSION" + +python3 - \ + "$SESSION_PRIVATE_KEY" \ + "$SESSION_PUBLIC_KEY" \ + "$EXPIRES_AT_HEIGHT" \ + "$IDENTITY" \ + "$ACCOUNT_ADDRESS" \ + "$BN254_MODULUS" <<'PY' +import sys + +private_key_hex, public_key_hex, expiry_text, identity_hex, address_hex, modulus_text = sys.argv[1:] + +def decode(name, value, expected_length): + try: + decoded = bytes.fromhex(value) + except ValueError as error: + raise SystemExit(f"{name} is not valid hex: {error}") from error + if len(decoded) != expected_length: + raise SystemExit(f"{name} must be {expected_length} bytes, got {len(decoded)}") + return decoded + +decode("session private key", private_key_hex, 32) +public_key = decode("session public key", public_key_hex, 32) +identity = decode("identity", identity_hex, 32) +decode("account address", address_hex, 20) + +try: + expiry = int(expiry_text) +except ValueError as error: + raise SystemExit("expires-at-height must be an integer") from error +if not 0 < expiry < 2**64: + raise SystemExit("expires-at-height must be a non-zero uint64") + +modulus = int(modulus_text) +for name, value in (("session public key", public_key), ("identity", identity)): + if int.from_bytes(value, "big") >= modulus: + raise SystemExit(f"{name} is not a canonical BN254 field element") +PY + +WORK_DIR="$(mktemp -d "${TMPDIR:-/tmp}/pulsar-smart-account-proof.XXXXXX")" +trap 'rm -rf -- "$WORK_DIR"' EXIT +mkdir -p "$WORK_DIR/src" +cp "$CIRCUIT_DIR/Nargo.toml" "$WORK_DIR/" +cp "$CIRCUIT_DIR/src/main.nr" "$WORK_DIR/src/main.nr" + +python3 - \ + "$WORK_DIR/Prover.toml" \ + "$SESSION_PUBLIC_KEY" \ + "$EXPIRES_AT_HEIGHT" \ + "$IDENTITY" \ + "$ACCOUNT_ADDRESS" <<'PY' +import pathlib +import sys + +path, public_key, expiry, identity, address = sys.argv[1:] +pathlib.Path(path).write_text( + f'session_public_key = "0x{public_key}"\n' + f'expires_at_height = "{expiry}"\n' + f'identity = "0x{identity}"\n' + f'account_address = "0x{address}"\n' + 'witness = "1"\n', + encoding="utf-8", +) +PY + +echo "==> Executing the smart-account Noir circuit" +( + cd "$WORK_DIR" + "$NARGO_BIN" execute smart_account_witness +) + +mkdir -p "$WORK_DIR/generated" "$TOOL_CACHE/bb-crs" "$OUTPUT_DIR" +echo "==> Generating the UltraHonk proof and verification key" +"$BB_BIN" prove \ + -s ultra_honk \ + -b "$WORK_DIR/target/smart_account_e2e.json" \ + -w "$WORK_DIR/target/smart_account_witness.gz" \ + -o "$WORK_DIR/generated" \ + --write_vk \ + --oracle_hash poseidon2 \ + --crs_path "$TOOL_CACHE/bb-crs" + +"$BB_BIN" verify \ + -s ultra_honk \ + -p "$WORK_DIR/generated/proof" \ + -k "$WORK_DIR/generated/vk" \ + -i "$WORK_DIR/generated/public_inputs" \ + --oracle_hash poseidon2 \ + --crs_path "$TOOL_CACHE/bb-crs" + +ACTUAL_VK_HASH="$(python3 - "$WORK_DIR/generated/vk" <<'PY' +import hashlib +import pathlib +import sys + +print(hashlib.sha256(pathlib.Path(sys.argv[1]).read_bytes()).hexdigest()) +PY +)" +if [[ "$ACTUAL_VK_HASH" != "$EXPECTED_VK_HASH" ]]; then + fail "generated verification-key hash is $ACTUAL_VK_HASH, expected $EXPECTED_VK_HASH" +fi + +python3 - \ + "$WORK_DIR/generated/public_inputs" \ + "$SESSION_PUBLIC_KEY" \ + "$EXPIRES_AT_HEIGHT" \ + "$IDENTITY" \ + "$ACCOUNT_ADDRESS" <<'PY' +import pathlib +import sys + +path, public_key, expiry_text, identity, address = sys.argv[1:] +expected = ( + bytes.fromhex(public_key) + + int(expiry_text).to_bytes(32, "big") + + bytes.fromhex(identity) + + bytes.fromhex(address).rjust(32, b"\0") +) +actual = pathlib.Path(path).read_bytes() +if actual != expected: + raise SystemExit( + "generated public_inputs do not match the smartaccounts wire encoding" + ) +PY + +install -m 0644 "$WORK_DIR/generated/proof" "$OUTPUT_DIR/proof" +install -m 0644 "$WORK_DIR/generated/public_inputs" "$OUTPUT_DIR/public_inputs" +install -m 0644 "$WORK_DIR/generated/vk" "$OUTPUT_DIR/vk" +printf '%s\n' "$SESSION_PRIVATE_KEY" >"$OUTPUT_DIR/session-key.hex" + +python3 - \ + "$OUTPUT_DIR/fixture.json" \ + "$IDENTITY" \ + "$SESSION_PUBLIC_KEY" \ + "$EXPIRES_AT_HEIGHT" \ + "$ACCOUNT_ADDRESS" <<'PY' +import json +import pathlib +import sys + +path, identity, public_key, expiry, account_address = sys.argv[1:] +pathlib.Path(path).write_text( + json.dumps( + { + "identity_hex": identity, + "session_public_key_hex": public_key, + "expires_at_height": int(expiry), + "account_address_hex": account_address, + }, + indent=2, + ) + + "\n", + encoding="utf-8", +) +PY + +echo "==> Smart-account Noir fixture generated in $OUTPUT_DIR" diff --git a/scripts/send_mina_auth_mode_tx.sh b/scripts/send_mina_auth_mode_tx.sh index 4c36c991..14a9b265 100755 --- a/scripts/send_mina_auth_mode_tx.sh +++ b/scripts/send_mina_auth_mode_tx.sh @@ -89,11 +89,23 @@ else } fi -go run -tags=purego ./scripts/devtools send-mina-auth-mode-tx \ - --grpc-addr "$GRPC_ADDR" \ - --chain-id "$CHAIN_ID" \ - --from "$FROM_ADDRESS" \ - --to "$RECIPIENT_ADDRESS" \ - --mina-private-key "$MINA_PRIVATE_KEY" \ - --amount "$AMOUNT" \ - --fees "$FEES" +for attempt in $(seq 1 10); do + if TX_OUTPUT="$(go run -tags=purego ./scripts/devtools send-mina-auth-mode-tx \ + --grpc-addr "$GRPC_ADDR" \ + --chain-id "$CHAIN_ID" \ + --from "$FROM_ADDRESS" \ + --to "$RECIPIENT_ADDRESS" \ + --mina-private-key "$MINA_PRIVATE_KEY" \ + --amount "$AMOUNT" \ + --fees "$FEES" 2>&1)"; then + printf '%s\n' "$TX_OUTPUT" + exit 0 + fi + + if [[ "$TX_OUTPUT" != *"account sequence mismatch"* || "$attempt" == "10" ]]; then + printf '%s\n' "$TX_OUTPUT" >&2 + exit 1 + fi + + sleep 1 +done diff --git a/scripts/send_smart_account_auth_mode_tx.sh b/scripts/send_smart_account_auth_mode_tx.sh deleted file mode 100755 index e8926c75..00000000 --- a/scripts/send_smart_account_auth_mode_tx.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -set -Eeuo pipefail - -SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" -REPO_ROOT="$(cd -- "$SCRIPT_DIR/.." && pwd)" -PROJECT_NAME="${PULSAR_DOCKER_PROJECT:-pulsar-testnet-3}" -CONTAINER="${PULSAR_VALIDATOR_CONTAINER:-${PROJECT_NAME}-validator1-1}" -VALIDATOR_HOME="${PULSAR_VALIDATOR_HOME:-/testnet/.pulsar-node1}" -CHAIN_ID="${CHAIN_ID:-mytestnet}" -OWNER_KEY="${AUTH_MODE_FROM_KEY:-validator1}" -RECIPIENT_KEY="${AUTH_MODE_RECIPIENT_KEY:-auth-mode-recipient}" -IDENTITY_HEX="${SMART_ACCOUNT_AUTH_MODE_IDENTITY_HEX:-a54bcb4b2f5749e85d7a4038e291882da23adfa36d2f8ad374d1847dc6eeb4ec}" -SESSION_PRIVATE_KEY="${SMART_ACCOUNT_AUTH_MODE_SESSION_PRIVATE_KEY:-517a96fb99ad7a1af9f2064c7f87738a5059c527b18c5ed6898f7b583862684c}" -AMOUNT="${AUTH_MODE_SEND_AMOUNT:-1pmina}" -FEES="${AUTH_MODE_FEES:-100pmina}" -GRPC_ADDR="${PULSAR_GRPC_ADDR:-127.0.0.1:9090}" - -WORK_DIR="$(mktemp -d "${TMPDIR:-/tmp}/pulsar-smart-account-auth.XXXXXX")" -trap 'rm -rf -- "$WORK_DIR"' EXIT - -docker inspect "$CONTAINER" >/dev/null - -if ! docker exec "$CONTAINER" pulsard keys show "$RECIPIENT_KEY" \ - --home "$VALIDATOR_HOME" --keyring-backend test >/dev/null 2>&1; then - docker exec "$CONTAINER" pulsard keys add "$RECIPIENT_KEY" \ - --home "$VALIDATOR_HOME" --keyring-backend test >/dev/null 2>&1 -fi - -OWNER_ADDRESS="$(docker exec "$CONTAINER" pulsard keys show "$OWNER_KEY" \ - --address --home "$VALIDATOR_HOME" --keyring-backend test)" -RECIPIENT_ADDRESS="$(docker exec "$CONTAINER" pulsard keys show "$RECIPIENT_KEY" \ - --address --home "$VALIDATOR_HOME" --keyring-backend test)" - -printf '%s\n' "$SESSION_PRIVATE_KEY" >"$WORK_DIR/session-key.hex" - -cd "$REPO_ROOT" -go run -tags=purego ./scripts/devtools send-smart-account-tx \ - --grpc-addr "$GRPC_ADDR" \ - --chain-id "$CHAIN_ID" \ - --from "$OWNER_ADDRESS" \ - --to "$RECIPIENT_ADDRESS" \ - --identity "$IDENTITY_HEX" \ - --session-key-file "$WORK_DIR/session-key.hex" \ - --amount "$AMOUNT" \ - --fees "$FEES" diff --git a/scripts/send_smart_account_tx.sh b/scripts/send_smart_account_tx.sh new file mode 100755 index 00000000..ef59fc3d --- /dev/null +++ b/scripts/send_smart_account_tx.sh @@ -0,0 +1,360 @@ +#!/usr/bin/env bash + +set -Eeuo pipefail + +SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd -- "$SCRIPT_DIR/.." && pwd)" +PROJECT_NAME="${PULSAR_DOCKER_PROJECT:-pulsar-testnet-3}" +CONTAINER="${PULSAR_VALIDATOR_CONTAINER:-${PROJECT_NAME}-validator1-1}" +VERIFIER_CONTAINER="${PULSAR_VERIFIER_CONTAINER:-${PROJECT_NAME}-verifier1-1}" +VALIDATOR_HOME="${PULSAR_VALIDATOR_HOME:-/testnet/.pulsar-node1}" +OWNER_KEY="${SMART_ACCOUNT_OWNER_KEY:-smart-account-owner}" +FIXTURE_GENERATOR="$SCRIPT_DIR/generate_smart_account_noir_fixture.sh" +SUBMISSION_PROTO_ROOT="$REPO_ROOT/testdata/smartaccounts/verifier-proto" +CHAIN_ID="${CHAIN_ID:-mytestnet}" +AMOUNT="${SMART_ACCOUNT_SEND_AMOUNT:-1pmina}" +FUND_AMOUNT="${SMART_ACCOUNT_FUND_AMOUNT:-1000000pmina}" +FEES="${SMART_ACCOUNT_FEES:-100pmina}" +GRPC_ADDR="${PULSAR_GRPC_ADDR:-127.0.0.1:9090}" +GRPCURL_IMAGE="${GRPCURL_IMAGE:-fullstorydev/grpcurl@sha256:085e183ca334eb4e81ca81ee12cbb2b2737505d1d77f5e33dabc5d066593d998}" +SESSION_PRIVATE_KEY="${SMART_ACCOUNT_SESSION_PRIVATE_KEY:-8a5eed4d959d619565a87e8193ad3c91abbce9d783497c004c1b08606c3d9b6b}" +IDENTITY_HEX="${SMART_ACCOUNT_IDENTITY_HEX:-2f833b7c56ed097e355807c19173647fd36cae0f66546b6d3c356a821d557e38}" +EXPIRATION_BLOCKS="${SMART_ACCOUNT_EXPIRATION_BLOCKS:-10000}" + +usage() { + cat <<'EOF' +usage: scripts/send_smart_account_tx.sh + +Runs the complete local smart-account end-to-end flow: + 1. generates a real UltraHonk proof with the pinned Nargo/Barretenberg tools + 2. submits the proof through the production verifier sidecar + 3. waits for the chain to finalize the proof as VALID + 4. funds the proof-bound Cosmos owner + 5. registers the proof-bound session key with AddPublicKey + 6. sends a bank transaction authenticated by that session key + +The chain must be deployed with verifier sidecars. The smartaccounts +verification_key_hash in config.yml must equal SHA-256 of this repository's +test-only smart-account circuit verification key. + +Optional environment variables: + PULSAR_DOCKER_PROJECT Compose project (default: pulsar-testnet-3) + PULSAR_VALIDATOR_CONTAINER validator1 container override + PULSAR_VERIFIER_CONTAINER verifier1 container override + SMART_ACCOUNT_SEND_AMOUNT final smart-account transfer (default: 1pmina) + SMART_ACCOUNT_FUND_AMOUNT owner funding amount (default: 1000000pmina) + SMART_ACCOUNT_FEES fee per transaction (default: 100pmina) + SMART_ACCOUNT_EXPIRATION_BLOCKS + session-key lifetime (default: 10000 blocks) + SMART_ACCOUNT_SESSION_PRIVATE_KEY + 32-byte field-compatible Ed25519 seed in hex + SMART_ACCOUNT_IDENTITY_HEX 32-byte field-compatible identity in hex + GRPCURL_IMAGE grpcurl container image +EOF +} + +case "${1:-}" in + -h | --help) + usage + exit 0 + ;; + "") ;; + *) + usage >&2 + exit 2 + ;; +esac + +fail() { + echo "error: $*" >&2 + exit 1 +} + +require_cmd() { + if ! command -v "$1" >/dev/null 2>&1; then + fail "missing required command: $1" + fi +} + +json_value() { + python3 -c 'import json,sys +value=json.load(open(sys.argv[1], encoding="utf-8")) +for key in sys.argv[2].split("."): + value=value[key] +print(value)' "$1" "$2" +} + +sha256_file() { + python3 -c 'import hashlib,pathlib,sys +print(hashlib.sha256(pathlib.Path(sys.argv[1]).read_bytes()).hexdigest())' "$1" +} + +wait_for_tx() { + local tx_hash="$1" + local output="$2" + + for _ in $(seq 1 60); do + if docker exec "$CONTAINER" pulsard query tx "$tx_hash" \ + --node tcp://127.0.0.1:26657 \ + --output json >"$output" 2>/dev/null; then + local code + code="$(json_value "$output" code)" + if [[ "$code" != "0" ]]; then + echo "transaction $tx_hash failed:" >&2 + cat "$output" >&2 + return 1 + fi + return 0 + fi + sleep 1 + done + + echo "transaction was not included: $tx_hash" >&2 + return 1 +} + +require_cmd docker +require_cmd go +require_cmd python3 + +[[ -x "$FIXTURE_GENERATOR" ]] || fail "fixture generator is not executable: $FIXTURE_GENERATOR" +if ! [[ "$EXPIRATION_BLOCKS" =~ ^[0-9]+$ ]] || (( EXPIRATION_BLOCKS < 1 )); then + fail "SMART_ACCOUNT_EXPIRATION_BLOCKS must be a positive integer" +fi + +SUBMISSION_PROTO="$SUBMISSION_PROTO_ROOT/pulsar/verifier/v1/submission_service.proto" +[[ -f "$SUBMISSION_PROTO" ]] || fail "submission-service proto not found: $SUBMISSION_PROTO" + +docker inspect "$CONTAINER" >/dev/null 2>&1 || \ + fail "validator container not found: $CONTAINER" +docker inspect "$VERIFIER_CONTAINER" >/dev/null 2>&1 || \ + fail "verifier container not found: $VERIFIER_CONTAINER; deploy with PULSAR_VERIFIER_IMAGE set" + +WORK_DIR="$(mktemp -d "${TMPDIR:-/tmp}/pulsar-smart-account.XXXXXX")" +trap 'rm -rf -- "$WORK_DIR"' EXIT +FIXTURE_DIR="$WORK_DIR/fixture" + +if ! docker exec "$CONTAINER" pulsard keys show "$OWNER_KEY" \ + --home "$VALIDATOR_HOME" \ + --keyring-backend test >/dev/null 2>&1; then + docker exec "$CONTAINER" pulsard keys add "$OWNER_KEY" \ + --home "$VALIDATOR_HOME" \ + --keyring-backend test >/dev/null 2>&1 +fi + +OWNER_ADDRESS="$(docker exec "$CONTAINER" pulsard keys show "$OWNER_KEY" \ + --address --home "$VALIDATOR_HOME" --keyring-backend test)" +VALIDATOR_ADDRESS="$(docker exec "$CONTAINER" pulsard keys show validator1 \ + --address --home "$VALIDATOR_HOME" --keyring-backend test)" +OWNER_ADDRESS_HEX="$(docker exec "$CONTAINER" pulsard debug addr "$OWNER_ADDRESS" \ + | sed -n 's/^Address (hex): //p' | tr '[:upper:]' '[:lower:]')" +[[ "$OWNER_ADDRESS_HEX" =~ ^[0-9a-f]{40}$ ]] || \ + fail "could not derive the 20-byte canonical address for $OWNER_ADDRESS" + +CURRENT_HEIGHT="$(docker exec "$CONTAINER" pulsard status 2>/dev/null \ + | python3 -c 'import json,sys; print(json.load(sys.stdin)["sync_info"]["latest_block_height"])')" +EXPIRES_AT_HEIGHT="$((CURRENT_HEIGHT + EXPIRATION_BLOCKS))" + +SESSION_PUBLIC_KEY_HEX="$( + cd "$REPO_ROOT" + go run -tags=purego ./scripts/devtools derive-ed25519-pub "$SESSION_PRIVATE_KEY" +)" + +echo "==> Generating the smart-account Noir proof" +"$FIXTURE_GENERATOR" \ + --output-dir "$FIXTURE_DIR" \ + --session-private-key "$SESSION_PRIVATE_KEY" \ + --session-public-key "$SESSION_PUBLIC_KEY_HEX" \ + --expires-at-height "$EXPIRES_AT_HEIGHT" \ + --identity "$IDENTITY_HEX" \ + --account-address "$OWNER_ADDRESS_HEX" + +PROOF_HASH="$(sha256_file "$FIXTURE_DIR/proof")" +PUBLIC_INPUTS_HASH="$(sha256_file "$FIXTURE_DIR/public_inputs")" +VERIFICATION_KEY_HASH="$(sha256_file "$FIXTURE_DIR/vk")" +VERIFICATION_ID_HEX="$(python3 - "$PROOF_HASH" "$PUBLIC_INPUTS_HASH" "$VERIFICATION_KEY_HASH" <<'PY' +import hashlib +import sys + +proof_hash, public_inputs_hash, verification_key_hash = map(bytes.fromhex, sys.argv[1:]) +payload = ( + b"pulsar/verification/v1\x00" + + (2).to_bytes(4, byteorder="big") + + proof_hash + + public_inputs_hash + + verification_key_hash +) +print(hashlib.sha256(payload).hexdigest()) +PY +)" + +docker exec "$CONTAINER" pulsard query smartaccounts params \ + --node tcp://127.0.0.1:26657 \ + --output json >"$WORK_DIR/smartaccounts-params.json" +CHAIN_VERIFICATION_KEY_HASH="$(python3 - "$WORK_DIR/smartaccounts-params.json" <<'PY' +import base64 +import json +import sys + +value = json.load(open(sys.argv[1], encoding="utf-8"))["params"]["verification_key_hash"] +print(base64.b64decode(value, validate=True).hex()) +PY +)" +if [[ "$CHAIN_VERIFICATION_KEY_HASH" != "$VERIFICATION_KEY_HASH" ]]; then + fail "smartaccounts verification_key_hash does not match SHA-256(vk); redeploy with SMART_ACCOUNTS_VERIFICATION_KEY_HASH=$VERIFICATION_KEY_HASH" +fi + +echo "==> Submitting the real Noir smart-account proof through verifier1" +TX_RAW_BASE64="$(docker exec "$CONTAINER" bash -ceu ' + work="$(mktemp -d)" + trap '\''rm -rf "$work"'\'' EXIT + pulsard tx verification submit-proof "$1" noir-barretenberg "$2" "$3" \ + --from validator1 \ + --home "$4" \ + --keyring-backend test \ + --chain-id "$5" \ + --fees "$6" \ + --generate-only \ + --output json >"$work/unsigned.json" + pulsard tx sign "$work/unsigned.json" \ + --from validator1 \ + --home "$4" \ + --keyring-backend test \ + --chain-id "$5" \ + --output-document "$work/signed.json" + pulsard tx encode "$work/signed.json" +' -- "$PROOF_HASH" "$PUBLIC_INPUTS_HASH" "$VERIFICATION_KEY_HASH" "$VALIDATOR_HOME" "$CHAIN_ID" "$FEES")" + +python3 - "$FIXTURE_DIR" "$TX_RAW_BASE64" >"$WORK_DIR/submission-request.json" <<'PY' +import base64 +import json +import pathlib +import sys + +fixture = pathlib.Path(sys.argv[1]) +payload = { + "proof": { + "proofType": "PROOF_TYPE_NOIR_BARRETENBERG", + "proof": base64.b64encode((fixture / "proof").read_bytes()).decode(), + "publicInputs": base64.b64encode((fixture / "public_inputs").read_bytes()).decode(), + "verificationKey": base64.b64encode((fixture / "vk").read_bytes()).decode(), + }, + "txRaw": sys.argv[2].strip(), +} +json.dump(payload, sys.stdout) +PY + +docker run --rm -i \ + --network "container:${VERIFIER_CONTAINER}" \ + --mount "type=bind,src=$SUBMISSION_PROTO_ROOT,dst=/proto,readonly" \ + "$GRPCURL_IMAGE" -plaintext \ + -max-time 30 \ + -import-path /proto \ + -proto pulsar/verifier/v1/submission_service.proto \ + -d @ 127.0.0.1:50052 \ + pulsar.verifier.v1.SubmissionService/SubmitProof \ + <"$WORK_DIR/submission-request.json" >"$WORK_DIR/submission-response.json" + +RESPONSE_VERIFICATION_ID_HEX="$(python3 - "$WORK_DIR/submission-response.json" <<'PY' +import base64 +import json +import sys + +response = json.load(open(sys.argv[1], encoding="utf-8")) +print(base64.b64decode(response["verificationId"], validate=True).hex()) +PY +)" +if [[ "$RESPONSE_VERIFICATION_ID_HEX" != "$VERIFICATION_ID_HEX" ]]; then + fail "sidecar returned an unexpected verification ID: $RESPONSE_VERIFICATION_ID_HEX" +fi + +VERIFICATION_TX_HASH="$(python3 - "$WORK_DIR/submission-response.json" <<'PY' +import base64 +import json +import sys + +response = json.load(open(sys.argv[1], encoding="utf-8")) +print(base64.b64decode(response["transactionHash"], validate=True).hex().upper()) +PY +)" +wait_for_tx "$VERIFICATION_TX_HASH" "$WORK_DIR/verification-tx-result.json" + +echo "==> Waiting for proof finalization: $VERIFICATION_ID_HEX" +VERIFICATION_STATUS="" +for _ in $(seq 1 90); do + if docker exec "$CONTAINER" pulsard query verification proof-by-verification-id \ + "$VERIFICATION_ID_HEX" \ + --node tcp://127.0.0.1:26657 \ + --output json >"$WORK_DIR/verification-result.json" 2>/dev/null; then + VERIFICATION_STATUS="$(python3 - "$WORK_DIR/verification-result.json" <<'PY' +import json +import sys + +def find_status(value): + if isinstance(value, dict): + if "status" in value: + return value["status"] + for child in value.values(): + found = find_status(child) + if found is not None: + return found + elif isinstance(value, list): + for child in value: + found = find_status(child) + if found is not None: + return found + return None + +status = find_status(json.load(open(sys.argv[1], encoding="utf-8"))) +print(status or "") +PY +)" + [[ -n "$VERIFICATION_STATUS" ]] && break + fi + sleep 2 +done + +[[ -n "$VERIFICATION_STATUS" ]] || fail "proof did not finalize before timeout: $VERIFICATION_ID_HEX" +[[ "$VERIFICATION_STATUS" == "PROOF_STATUS_VALID" ]] || \ + fail "proof finalized with status $VERIFICATION_STATUS" + +echo "==> Funding proof-bound smart-account owner: $OWNER_ADDRESS" +docker exec "$CONTAINER" pulsard tx bank send validator1 "$OWNER_ADDRESS" "$FUND_AMOUNT" \ + --from validator1 \ + --home "$VALIDATOR_HOME" \ + --keyring-backend test \ + --chain-id "$CHAIN_ID" \ + --node tcp://127.0.0.1:26657 \ + --gas 200000 \ + --fees "$FEES" \ + --yes \ + --output json >"$WORK_DIR/fund-broadcast.json" +FUND_TX_HASH="$(json_value "$WORK_DIR/fund-broadcast.json" txhash)" +wait_for_tx "$FUND_TX_HASH" "$WORK_DIR/fund-result.json" + +echo "==> Registering the proof-bound session key" +docker exec "$CONTAINER" pulsard tx smartaccounts add-public-key \ + "$VERIFICATION_ID_HEX" "$SESSION_PUBLIC_KEY_HEX" "$EXPIRES_AT_HEIGHT" "$IDENTITY_HEX" \ + --from "$OWNER_KEY" \ + --home "$VALIDATOR_HOME" \ + --keyring-backend test \ + --chain-id "$CHAIN_ID" \ + --node tcp://127.0.0.1:26657 \ + --gas 300000 \ + --fees "$FEES" \ + --yes \ + --output json >"$WORK_DIR/add-key-broadcast.json" +ADD_KEY_TX_HASH="$(json_value "$WORK_DIR/add-key-broadcast.json" txhash)" +wait_for_tx "$ADD_KEY_TX_HASH" "$WORK_DIR/add-key-result.json" + +echo "==> Sending $AMOUNT with the smart-account session key" +cd "$REPO_ROOT" +go run -tags=purego ./scripts/devtools send-smart-account-tx \ + --grpc-addr "$GRPC_ADDR" \ + --chain-id "$CHAIN_ID" \ + --from "$OWNER_ADDRESS" \ + --to "$VALIDATOR_ADDRESS" \ + --identity "$IDENTITY_HEX" \ + --session-key-file "$FIXTURE_DIR/session-key.hex" \ + --amount "$AMOUNT" \ + --fees "$FEES" diff --git a/scripts/setup_local_testnet.sh b/scripts/setup_local_testnet.sh index 4094400f..07f6202c 100755 --- a/scripts/setup_local_testnet.sh +++ b/scripts/setup_local_testnet.sh @@ -515,16 +515,11 @@ if [[ -z "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" ]]; then echo "smartaccounts verification key hash is required; set SMART_ACCOUNTS_VERIFICATION_KEY_HASH or genesis.app_state.smartaccounts.params.verification_key_hash in $CHAIN_CONFIG_PATH" >&2 exit 1 fi -SMART_ACCOUNT_AUTH_MODE_IDENTITY_HEX="${SMART_ACCOUNT_AUTH_MODE_IDENTITY_HEX:-a54bcb4b2f5749e85d7a4038e291882da23adfa36d2f8ad374d1847dc6eeb4ec}" -SMART_ACCOUNT_AUTH_MODE_SESSION_PRIVATE_KEY="${SMART_ACCOUNT_AUTH_MODE_SESSION_PRIVATE_KEY:-517a96fb99ad7a1af9f2064c7f87738a5059c527b18c5ed6898f7b583862684c}" -SMART_ACCOUNT_AUTH_MODE_EXPIRES_AT_HEIGHT="${SMART_ACCOUNT_AUTH_MODE_EXPIRES_AT_HEIGHT:-1000000}" - validate_positive_int "confirmation depth" "$BRIDGE_CONFIRMATION_DEPTH" validate_non_empty "contract address" "$BRIDGE_CONTRACT_ADDRESS" validate_positive_int "start block height" "$BRIDGE_START_BLOCK_HEIGHT" validate_positive_int "max block range" "$BRIDGE_MAX_BLOCK_RANGE" validate_positive_int "actions reduced root snapshot window size" "$BRIDGE_ACTIONS_REDUCED_ROOT_SNAPSHOT_WINDOW_SIZE" -validate_positive_int "smart-account auth-mode expiration height" "$SMART_ACCOUNT_AUTH_MODE_EXPIRES_AT_HEIGHT" if [[ "$ENABLE_VERIFIER_SIDECARS" != "0" && "$ENABLE_VERIFIER_SIDECARS" != "1" ]]; then echo "ENABLE_VERIFIER_SIDECARS must be 0 or 1" >&2 exit 1 @@ -650,27 +645,10 @@ for ((i = 1; i <= VALIDATOR_COUNT; i++)); do NODE_ADDRS[i]="$("$BINARY_PATH" keys show "${NODE_KEY_NAMES[i]}" --address --home "${NODE_HOMES[i]}" --keyring-backend "$KEYRING_BACKEND")" done -SMART_ACCOUNT_AUTH_MODE_ACCOUNT_ADDRESS_HEX="$( - "$BINARY_PATH" debug addr "${NODE_ADDRS[PRIMARY_NODE_INDEX]}" \ - | sed -n 's/^Address (hex): //p' \ - | tr '[:upper:]' '[:lower:]' -)" -if [[ ! "$SMART_ACCOUNT_AUTH_MODE_ACCOUNT_ADDRESS_HEX" =~ ^[0-9a-f]{40}$ ]]; then - echo "failed to derive smart-account auth-mode owner address bytes" >&2 - exit 1 -fi -SMART_ACCOUNT_AUTH_MODE_SESSION_PUBLIC_KEY="$( - "$DEVTOOLS_BINARY_PATH" derive-ed25519-pub "$SMART_ACCOUNT_AUTH_MODE_SESSION_PRIVATE_KEY" -)" - -echo "==> Setting smartaccounts genesis params and auth-mode fixture..." +echo "==> Setting smartaccounts genesis params..." python3 "$PYTHON_HELPER" patch-smartaccounts-genesis \ --genesis "$PRIMARY_GENESIS_FILE" \ - --verification-key-hash "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" \ - --identity "$SMART_ACCOUNT_AUTH_MODE_IDENTITY_HEX" \ - --account-address "$SMART_ACCOUNT_AUTH_MODE_ACCOUNT_ADDRESS_HEX" \ - --session-public-key "$SMART_ACCOUNT_AUTH_MODE_SESSION_PUBLIC_KEY" \ - --expires-at-height "$SMART_ACCOUNT_AUTH_MODE_EXPIRES_AT_HEIGHT" + --verification-key-hash "$SMART_ACCOUNTS_VERIFICATION_KEY_HASH" E2E_USER_MINA_PUB_KEY="" E2E_USER_COSMOS_PUB_KEY="" diff --git a/scripts/setup_local_testnet_helper.py b/scripts/setup_local_testnet_helper.py index 33e484c5..67c6ef15 100644 --- a/scripts/setup_local_testnet_helper.py +++ b/scripts/setup_local_testnet_helper.py @@ -794,10 +794,6 @@ def decode_smartaccounts_verification_key_hash(verification_key_hash: str) -> by def patch_smartaccounts_genesis( genesis_path: str, verification_key_hash: str, - identity: Optional[str] = None, - account_address: Optional[str] = None, - session_public_key: Optional[str] = None, - expires_at_height: Optional[str] = None, ) -> int: hash_bytes = decode_smartaccounts_verification_key_hash( verification_key_hash @@ -810,75 +806,7 @@ def patch_smartaccounts_genesis( smartaccounts["params"] = { "verification_key_hash": base64.b64encode(hash_bytes).decode("ascii") } - fixture_values = ( - identity, - account_address, - session_public_key, - expires_at_height, - ) - if any(value is not None for value in fixture_values): - if not all(value is not None for value in fixture_values): - raise SystemExit( - "smartaccounts auth-mode fixture fields must be supplied together" - ) - - def decode_fixture_value(value: str, expected_size: int, name: str) -> bytes: - encoded = value.strip() - hex_value = encoded[2:] if encoded.startswith("0x") else encoded - if re.fullmatch(r"[0-9a-fA-F]+", hex_value) and len(hex_value) % 2 == 0: - decoded = bytes.fromhex(hex_value) - else: - try: - decoded = base64.b64decode(encoded, validate=True) - except ValueError as exc: - raise SystemExit(f"{name} must be valid hex or base64") from exc - if len(decoded) != expected_size: - raise SystemExit( - f"{name} must be {expected_size} bytes: got {len(decoded)}" - ) - return decoded - - identity_bytes = decode_fixture_value(identity, 32, "identity") - account_address_bytes = decode_fixture_value( - account_address, 20, "account address" - ) - session_public_key_bytes = decode_fixture_value( - session_public_key, 32, "session public key" - ) - try: - expiration = int(expires_at_height) - except ValueError as exc: - raise SystemExit("expires at height must be an integer") from exc - if expiration <= 0 or expiration > 2**64 - 1: - raise SystemExit("expires at height must be a non-zero uint64") - - encoded_identity = base64.b64encode(identity_bytes).decode("ascii") - existing_accounts = smartaccounts.setdefault("smart_accounts", []) - smartaccounts["smart_accounts"] = [ - entry - for entry in existing_accounts - if entry.get("identity") != encoded_identity - ] - smartaccounts["smart_accounts"].append( - { - "identity": encoded_identity, - "account": { - "account_address": base64.b64encode( - account_address_bytes - ).decode("ascii"), - "session_keys": [ - { - "public_key": base64.b64encode( - session_public_key_bytes - ).decode("ascii"), - "expires_at_height": str(expiration), - } - ], - }, - } - ) - else: - smartaccounts.setdefault("smart_accounts", []) + smartaccounts.setdefault("smart_accounts", []) write_json(genesis_path, genesis) return 0 @@ -1097,10 +1025,6 @@ def build_parser() -> argparse.ArgumentParser: patch_smartaccounts = subparsers.add_parser("patch-smartaccounts-genesis") patch_smartaccounts.add_argument("--genesis", required=True) patch_smartaccounts.add_argument("--verification-key-hash", required=True) - patch_smartaccounts.add_argument("--identity") - patch_smartaccounts.add_argument("--account-address") - patch_smartaccounts.add_argument("--session-public-key") - patch_smartaccounts.add_argument("--expires-at-height") verify_registry = subparsers.add_parser("verify-validator-key-pairs") verify_registry.add_argument("--genesis", required=True) @@ -1193,10 +1117,6 @@ def main() -> int: return patch_smartaccounts_genesis( args.genesis, args.verification_key_hash, - args.identity, - args.account_address, - args.session_public_key, - args.expires_at_height, ) if args.command == "verify-validator-key-pairs": return verify_validator_key_pairs(args.genesis, args.cosmos_key) diff --git a/scripts/test_archive_wrapper_deployment.sh b/scripts/test_archive_wrapper_deployment.sh index ddf959b1..9515703c 100755 --- a/scripts/test_archive_wrapper_deployment.sh +++ b/scripts/test_archive_wrapper_deployment.sh @@ -7,6 +7,7 @@ REPO_ROOT="$(cd -- "$SCRIPT_DIR/.." && pwd)" WRAPPER_SOURCE="${ARCHIVE_WRAPPER_SOURCE:-$(cd -- "$REPO_ROOT/../archive-wrapper" && pwd)}" EXPECTED_WRAPPER_SHA="cd42a203ac6b43d24d9fbd57c323ecd52ea52bd5" ENABLE_VERIFIER_SIDECARS="${ENABLE_VERIFIER_SIDECARS:-0}" +AUTH_MODE_E2E_ONLY="${AUTH_MODE_E2E_ONLY:-0}" VERIFIER_SOURCE="${PULSAR_VERIFIER_SOURCE:-}" MODE="${1:-shared}" PROJECT="pulsar-wrapper-e2e-${MODE//[^a-zA-Z0-9]/-}-$$" @@ -310,15 +311,23 @@ esac require_cmd docker require_cmd git -require_cmd grpcurl -require_cmd node -require_cmd npm require_cmd python3 require_cmd timeout if [[ "$ENABLE_VERIFIER_SIDECARS" != "0" && "$ENABLE_VERIFIER_SIDECARS" != "1" ]]; then echo "ENABLE_VERIFIER_SIDECARS must be 0 or 1" >&2 exit 1 fi +if [[ "$AUTH_MODE_E2E_ONLY" != "0" && "$AUTH_MODE_E2E_ONLY" != "1" ]]; then + echo "AUTH_MODE_E2E_ONLY must be 0 or 1" >&2 + exit 1 +fi +if [[ "$AUTH_MODE_E2E_ONLY" == "1" ]]; then + require_cmd go +else + require_cmd grpcurl + require_cmd node + require_cmd npm +fi # Preserve the existing chain-only test unless verifier sidecars are explicitly enabled. if [[ "$ENABLE_VERIFIER_SIDECARS" == "1" ]]; then @@ -426,6 +435,32 @@ if [[ "$ENABLE_VERIFIER_SIDECARS" == "1" ]]; then compose up --no-build -d --wait --wait-timeout 240 verifier1 verifier2 verifier3 fi +if [[ "$AUTH_MODE_E2E_ONLY" == "1" ]]; then + validator1_container="$(compose ps -q validator1)" + auth_mode_env=( + "PULSAR_DOCKER_PROJECT=$PROJECT" + "PULSAR_VALIDATOR_CONTAINER=$validator1_container" + "PULSAR_GRPC_ADDR=127.0.0.1:${HOST_GRPC_PORTS[1]}" + ) + + echo "==> Sending a TX_AUTH_MODE_COSMOS transaction" + env "${auth_mode_env[@]}" "$SCRIPT_DIR/send_cosmos_auth_mode_tx.sh" + + echo "==> Sending a TX_AUTH_MODE_UNSPECIFIED transaction" + env "${auth_mode_env[@]}" "$SCRIPT_DIR/send_unspecified_auth_mode_tx.sh" + + echo "==> Registering a Mina key and sending a TX_AUTH_MODE_MINA transaction" + env "${auth_mode_env[@]}" "$SCRIPT_DIR/send_mina_auth_mode_tx.sh" + + if [[ "$ENABLE_VERIFIER_SIDECARS" == "1" ]]; then + echo "==> Generating, registering, and using a TX_AUTH_MODE_SMART_ACCOUNT transaction" + env "${auth_mode_env[@]}" "$SCRIPT_DIR/send_smart_account_tx.sh" + fi + + echo "Auth-mode transaction E2E passed" + exit 0 +fi + case "$MODE" in shared) wrapper_endpoints=(archive-wrapper:9095) ;; per-validator) diff --git a/scripts/test_deploy_local_lightnet.py b/scripts/test_deploy_local_lightnet.py index d14976ab..e1db55bb 100644 --- a/scripts/test_deploy_local_lightnet.py +++ b/scripts/test_deploy_local_lightnet.py @@ -138,6 +138,17 @@ def write_state(value): log.write(json.dumps(args) + "\n") if "cat-file" in args: + source = Path(args[args.index("-C") + 1]) + if not (source / ".git" / "fetched").exists() and "feedface" in args[-1]: + raise SystemExit(1) + raise SystemExit(0) +if "init" in args: + source = Path(args[args.index("-C") + 1]) + (source / ".git").mkdir(parents=True, exist_ok=True) + raise SystemExit(0) +if "fetch" in args: + source = Path(args[args.index("-C") + 1]) + (source / ".git" / "fetched").write_text("ok", encoding="utf-8") raise SystemExit(0) if "archive" in args: sys.stdout.buffer.write(b"fake archive") @@ -156,6 +167,7 @@ def setUp(self): self.home = self.root / "home" self.state_root = self.root / "state" self.wrapper_source = self.root / "archive-wrapper" + self.verifier_cache_root = self.root / "verifier-cache" self.fake_bin = self.root / "bin" self.docker_log = self.root / "docker.log" self.git_log = self.root / "git.log" @@ -186,6 +198,10 @@ def setUp(self): "PULSAR_DOCKER_IMAGE", "PULSAR_DOCKER_PROJECT", "PULSAR_DOCKER_STATE_ROOT", + "PULSAR_VERIFIER_IMAGE", + "PULSAR_VERIFIER_CACHE_ROOT", + "PULSAR_VERIFIER_SHA", + "PULSAR_VERIFIER_SOURCE", "VALIDATOR_STARTUP_TIMEOUT", ): self.env.pop(key, None) @@ -203,6 +219,8 @@ def setUp(self): "PATH": f"{self.fake_bin}{os.pathsep}{self.env['PATH']}", "PULSAR_DOCKER_PROJECT": self.project, "PULSAR_DOCKER_STATE_ROOT": str(self.state_root), + "PULSAR_VERIFIER_CACHE_ROOT": str(self.verifier_cache_root), + "PULSAR_VERIFIER_SHA": "feedface", "VALIDATOR_STARTUP_TIMEOUT": "1", } ) diff --git a/scripts/test_setup_local_testnet_helper.py b/scripts/test_setup_local_testnet_helper.py index 7965cb0b..1470f711 100644 --- a/scripts/test_setup_local_testnet_helper.py +++ b/scripts/test_setup_local_testnet_helper.py @@ -460,50 +460,6 @@ def test_patch_smartaccounts_genesis_sets_verification_key_hash(self): ) self.assertEqual([], smartaccounts["smart_accounts"]) - def test_patch_smartaccounts_genesis_adds_auth_mode_fixture(self): - genesis = self.write_temp("genesis.json", json.dumps({"app_state": {}})) - verification_key_hash = bytes(range(32)) - identity = bytes(range(32, 64)) - account_address = bytes(range(20)) - session_public_key = bytes(range(64, 96)) - - self.assertEqual( - 0, - helper.patch_smartaccounts_genesis( - str(genesis), - verification_key_hash.hex(), - identity.hex(), - account_address.hex(), - session_public_key.hex(), - "1000000", - ), - ) - - smartaccounts = json.loads(genesis.read_text(encoding="utf-8"))[ - "app_state" - ]["smartaccounts"] - self.assertEqual( - [ - { - "identity": base64.b64encode(identity).decode("ascii"), - "account": { - "account_address": base64.b64encode( - account_address - ).decode("ascii"), - "session_keys": [ - { - "public_key": base64.b64encode( - session_public_key - ).decode("ascii"), - "expires_at_height": "1000000", - } - ], - }, - } - ], - smartaccounts["smart_accounts"], - ) - def test_reads_module_params_through_the_same_generic_path(self): config = self.write_temp( "config.yml", diff --git a/testdata/smartaccounts/noir/bb-5.2.0/Nargo.toml b/testdata/smartaccounts/noir/bb-5.2.0/Nargo.toml new file mode 100644 index 00000000..18d1e028 --- /dev/null +++ b/testdata/smartaccounts/noir/bb-5.2.0/Nargo.toml @@ -0,0 +1,6 @@ +[package] +name = "smart_account_e2e" +type = "bin" +authors = [""] + +[dependencies] diff --git a/testdata/smartaccounts/noir/bb-5.2.0/README.md b/testdata/smartaccounts/noir/bb-5.2.0/README.md new file mode 100644 index 00000000..5e07b0e0 --- /dev/null +++ b/testdata/smartaccounts/noir/bb-5.2.0/README.md @@ -0,0 +1,32 @@ +# Smart-account Noir E2E circuit + +This test-only circuit binds a proof to the four public fields consumed by +`x/smartaccounts` in this exact order: + +1. 32-byte Ed25519 session public key +2. expiration block height, encoded as a 32-byte big-endian integer +3. 32-byte identity +4. 20-byte Cosmos account address, left-padded to 32 bytes + +The circuit is intentionally limited to exercising the complete local +prover, verifier, verification-module, smartaccounts, and ante-handler flow. +It does not prove ownership of a production identity provider account. + +The pinned artifact contract is: + +- Nargo `1.0.0-beta.25` +- Barretenberg `5.2.0` +- UltraHonk +- Poseidon2 transcript +- zero knowledge enabled +- IPA accumulation disabled + +The canonical `SHA-256(vk)` is: + +```text +1feb48cba9a74abcc6639cc79d49dc8e81ed9f4e791c371bdf6a5aa04b296eeb +``` + +The same value is configured for the local network in `config.yml`. + +Generate a proof with `scripts/generate_smart_account_noir_fixture.sh`. diff --git a/testdata/smartaccounts/noir/bb-5.2.0/src/main.nr b/testdata/smartaccounts/noir/bb-5.2.0/src/main.nr new file mode 100644 index 00000000..7a59f77f --- /dev/null +++ b/testdata/smartaccounts/noir/bb-5.2.0/src/main.nr @@ -0,0 +1,13 @@ +fn main( + session_public_key: pub Field, + expires_at_height: pub Field, + identity: pub Field, + account_address: pub Field, + witness: Field, +) { + assert(session_public_key != 0); + assert(expires_at_height != 0); + assert(identity != 0); + assert(account_address != 0); + assert(witness != 0); +} diff --git a/testdata/smartaccounts/verifier-proto/pulsar/verifier/v1/proof.proto b/testdata/smartaccounts/verifier-proto/pulsar/verifier/v1/proof.proto new file mode 100644 index 00000000..b08d712c --- /dev/null +++ b/testdata/smartaccounts/verifier-proto/pulsar/verifier/v1/proof.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package pulsar.verifier.v1; + +import "pulsarchain/verification/v1/types.proto"; + +// Proof carries every artifact required for independent verification. +message Proof { + pulsarchain.verification.v1.ProofType proof_type = 1; + bytes proof = 2; + bytes public_inputs = 3; + bytes verification_key = 4; +} diff --git a/testdata/smartaccounts/verifier-proto/pulsar/verifier/v1/submission_service.proto b/testdata/smartaccounts/verifier-proto/pulsar/verifier/v1/submission_service.proto new file mode 100644 index 00000000..1ce144d0 --- /dev/null +++ b/testdata/smartaccounts/verifier-proto/pulsar/verifier/v1/submission_service.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; + +package pulsar.verifier.v1; + +import "pulsar/verifier/v1/proof.proto"; + +// SubmissionService mirrors the production sidecar submission wire contract. +service SubmissionService { + rpc SubmitProof(SubmitProofRequest) returns (SubmitProofResponse); +} + +message SubmitProofRequest { + Proof proof = 1; + bytes tx_raw = 2; +} + +message SubmitProofResponse { + bytes verification_id = 1; + bytes transaction_hash = 2; +} diff --git a/testdata/smartaccounts/verifier-proto/pulsarchain/verification/v1/types.proto b/testdata/smartaccounts/verifier-proto/pulsarchain/verification/v1/types.proto new file mode 100644 index 00000000..4998167a --- /dev/null +++ b/testdata/smartaccounts/verifier-proto/pulsarchain/verification/v1/types.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package pulsarchain.verification.v1; + +// ProofType mirrors the chain-owned verifier-family wire enum. +enum ProofType { + PROOF_TYPE_UNSPECIFIED = 0; + PROOF_TYPE_MINA_PICKLES = 1; + PROOF_TYPE_NOIR_BARRETENBERG = 2; +} From 5f11bb85b92d7f09ad01658c5fa0850e7d194b96 Mon Sep 17 00:00:00 2001 From: Yusuf Date: Wed, 26 Aug 2026 21:52:33 +0300 Subject: [PATCH 47/51] fix: upgrade libcrypto3 package to patched version --- .gitignore | 1 + Dockerfile | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 07cfb1a0..8336f1d2 100644 --- a/.gitignore +++ b/.gitignore @@ -10,5 +10,6 @@ release/ *.ign .docker/ .cache/smartaccounts/ +.cache/pulsar-verifier/ __pycache__/ *.py[cod] diff --git a/Dockerfile b/Dockerfile index f08d95b2..66dbfe21 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,8 @@ FROM golang:1.26.5-alpine3.24@sha256:0178a641fbb4858c5f1b48e34bdaabe0350a330a1b1149aabd498d0699ff5fb2 AS builder +RUN apk upgrade --no-cache libcrypto3 libssl3 + WORKDIR /src COPY go.mod go.sum ./ @@ -17,7 +19,8 @@ RUN --mount=type=cache,target=/go/pkg/mod \ FROM alpine:3.24@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b AS runtime -RUN apk add --no-cache bash ca-certificates curl python3 +RUN apk upgrade --no-cache libcrypto3 libssl3 \ + && apk add --no-cache bash ca-certificates curl python3 WORKDIR /opt/pulsar From a5d1ba293a526e6e85c835e7d732de1d6d7a137a Mon Sep 17 00:00:00 2001 From: Yusuf Date: Wed, 26 Aug 2026 22:07:36 +0300 Subject: [PATCH 48/51] fix(e2e): use dedicated account for Mina authentication --- scripts/send_mina_auth_mode_tx.sh | 40 ++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/scripts/send_mina_auth_mode_tx.sh b/scripts/send_mina_auth_mode_tx.sh index 14a9b265..933eedcf 100755 --- a/scripts/send_mina_auth_mode_tx.sh +++ b/scripts/send_mina_auth_mode_tx.sh @@ -8,8 +8,10 @@ PROJECT_NAME="${PULSAR_DOCKER_PROJECT:-pulsar-testnet-3}" CONTAINER="${PULSAR_VALIDATOR_CONTAINER:-${PROJECT_NAME}-validator1-1}" VALIDATOR_HOME="${PULSAR_VALIDATOR_HOME:-/testnet/.pulsar-node1}" CHAIN_ID="${CHAIN_ID:-mytestnet}" -FROM_KEY="${AUTH_MODE_FROM_KEY:-validator1}" +FROM_KEY="${AUTH_MODE_FROM_KEY:-mina-auth-mode-sender}" +FUNDING_KEY="${AUTH_MODE_FUNDING_KEY:-validator1}" RECIPIENT_KEY="${AUTH_MODE_RECIPIENT_KEY:-auth-mode-recipient}" +FUNDING_AMOUNT="${AUTH_MODE_FUNDING_AMOUNT:-1000000pmina}" AMOUNT="${AUTH_MODE_SEND_AMOUNT:-1pmina}" FEES="${AUTH_MODE_FEES:-100pmina}" NODE="${PULSAR_NODE:-tcp://127.0.0.1:26657}" @@ -20,6 +22,12 @@ trap 'rm -rf -- "$WORK_DIR"' EXIT docker inspect "$CONTAINER" >/dev/null +if ! docker exec "$CONTAINER" pulsard keys show "$FROM_KEY" \ + --home "$VALIDATOR_HOME" --keyring-backend test >/dev/null 2>&1; then + docker exec "$CONTAINER" pulsard keys add "$FROM_KEY" \ + --home "$VALIDATOR_HOME" --keyring-backend test >/dev/null 2>&1 +fi + if ! docker exec "$CONTAINER" pulsard keys show "$RECIPIENT_KEY" \ --home "$VALIDATOR_HOME" --keyring-backend test >/dev/null 2>&1; then docker exec "$CONTAINER" pulsard keys add "$RECIPIENT_KEY" \ @@ -30,6 +38,36 @@ FROM_ADDRESS="$(docker exec "$CONTAINER" pulsard keys show "$FROM_KEY" \ --address --home "$VALIDATOR_HOME" --keyring-backend test)" RECIPIENT_ADDRESS="$(docker exec "$CONTAINER" pulsard keys show "$RECIPIENT_KEY" \ --address --home "$VALIDATOR_HOME" --keyring-backend test)" + +docker exec "$CONTAINER" pulsard tx bank send \ + "$FUNDING_KEY" "$FROM_ADDRESS" "$FUNDING_AMOUNT" \ + --home "$VALIDATOR_HOME" \ + --keyring-backend test \ + --chain-id "$CHAIN_ID" \ + --node "$NODE" \ + --gas 200000 \ + --fees "$FEES" \ + --yes \ + --output json >"$WORK_DIR/funding-broadcast.json" + +FUNDING_TX_HASH="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["txhash"])' "$WORK_DIR/funding-broadcast.json")" +for _ in $(seq 1 60); do + if docker exec "$CONTAINER" pulsard query tx "$FUNDING_TX_HASH" --node "$NODE" --output json \ + >"$WORK_DIR/funding-result.json" 2>/dev/null; then + FUNDING_CODE="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["code"])' "$WORK_DIR/funding-result.json")" + if [[ "$FUNDING_CODE" != "0" ]]; then + cat "$WORK_DIR/funding-result.json" >&2 + exit 1 + fi + break + fi + sleep 1 +done +[[ -f "$WORK_DIR/funding-result.json" ]] || { + echo "error: Mina auth-mode sender funding transaction was not included: $FUNDING_TX_HASH" >&2 + exit 1 +} + COSMOS_PUBLIC_KEY_BASE64="$(docker exec "$CONTAINER" pulsard keys show "$FROM_KEY" \ --pubkey --home "$VALIDATOR_HOME" --keyring-backend test \ | python3 -c 'import json,sys; print(json.load(sys.stdin)["key"])')" From 277ce6d094649972cd1ac2fa758c1354604b7c17 Mon Sep 17 00:00:00 2001 From: korayakpinar Date: Thu, 27 Aug 2026 17:21:03 +0300 Subject: [PATCH 49/51] chore(smartaccounts): document session key limit follow-up --- x/smartaccounts/keeper/keeper.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x/smartaccounts/keeper/keeper.go b/x/smartaccounts/keeper/keeper.go index b3a306dd..bde072b3 100644 --- a/x/smartaccounts/keeper/keeper.go +++ b/x/smartaccounts/keeper/keeper.go @@ -215,6 +215,8 @@ func (k Keeper) AppendSessionKeyToSmartAccount(ctx context.Context, identity, ac } } + // TODO: Evaluate and enforce a per-account session-key limit to keep + // state growth and authorization cost bounded. acc.SessionKeys = append(acc.SessionKeys, key) if err := k.smartAccounts.Set(ctx, identity, acc); err != nil { From 96bf86cbdd76235cd35ecb08c5a45bc127c16f7e Mon Sep 17 00:00:00 2001 From: korayakpinar Date: Thu, 27 Aug 2026 17:23:51 +0300 Subject: [PATCH 50/51] chore(api): regenerate smart accounts OpenAPI --- docs/static/openapi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/static/openapi.json b/docs/static/openapi.json index 5f0cd8f6..8d648ce5 100644 --- a/docs/static/openapi.json +++ b/docs/static/openapi.json @@ -1 +1 @@ -{"id":"github.com/node101-io/pulsar-chain","consumes":["application/json"],"produces":["application/json"],"swagger":"2.0","info":{"description":"Chain github.com/node101-io/pulsar-chain REST API","title":"HTTP API Console","contact":{"name":"github.com/node101-io/pulsar-chain"},"version":"version not set"},"paths":{"/node101-io/pulsar-chain/abci/v1/validator_set_with_powers/{block_height}":{"get":{"tags":["Query"],"operationId":"GithubComnode101IopulsarChainQuery_GetValidatorSetWithPowers","parameters":[{"type":"string","format":"int64","name":"block_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.abci.QueryGetValidatorSetWithPowersResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/abci/v1/vote_ext_body_by_height/{vote_extension_height}":{"get":{"tags":["Query"],"summary":"VoteExtBodyByHeight queries the vote extension body for a vote-extension\nconsensus height.","operationId":"GithubComnode101IopulsarChainQuery_VoteExtBodyByHeight","parameters":[{"type":"string","format":"int64","description":"vote_extension_height is the consensus height N where the vote extension is\nproduced. The returned body signs the transition from state N-2 to state N-1.","name":"vote_extension_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.abci.QueryVoteExtBodyByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/actions_reduced_root":{"get":{"tags":["Query"],"summary":"ActionsReducedRoot Queries a list of ActionsReducedRoot items.","operationId":"GithubComnode101IopulsarChainQuery_ActionsReducedRoot","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryActionsReducedRootResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/latest_action_hashes":{"get":{"tags":["Query"],"summary":"LatestActionHashes Queries a list of LatestActionHashes items.","operationId":"GithubComnode101IopulsarChainQuery_LatestActionHashes","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryLatestActionHashesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_user_cosmos_public_key/{user_mina_public_key}":{"get":{"tags":["Query"],"summary":"GetUserCosmosPublicKey Queries a list of GetUserCosmosPublicKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserCosmosPublicKey","parameters":[{"type":"string","format":"byte","name":"user_mina_public_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserCosmosPublicKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_user_mina_public_key/{user_cosmos_public_key}":{"get":{"tags":["Query"],"summary":"GetUserMinaPublicKey Queries a list of GetUserMinaPublicKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserMinaPublicKey","parameters":[{"type":"string","format":"byte","name":"user_cosmos_public_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserMinaPublicKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_cosmos_pub_key/{validator_mina_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorCosmosPubKey Queries a list of GetValidatorCosmosPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorCosmosPubKey","parameters":[{"type":"string","format":"byte","name":"validator_mina_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_mina_pub_key/{validator_cosmos_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorMinaPubKey Queries a list of GetValidatorMinaPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorMinaPubKey","parameters":[{"type":"string","format":"byte","name":"validator_cosmos_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_set_with_mina_keys":{"get":{"tags":["Query"],"summary":"GetValidatorSetWithMinaKeys returns the supplied validator set with each validator's registered Mina public key.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorSetWithMinaKeys","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorSetWithMinaKeysResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/key_signing_challenge":{"get":{"tags":["Query"],"summary":"GetKeySigningChallenge returns the state-bound field a Mina wallet must sign.","operationId":"GithubComnode101IopulsarChainQuery_GetKeySigningChallenge","parameters":[{"enum":["KEY_SIGNING_OPERATION_UNSPECIFIED","KEY_SIGNING_OPERATION_REGISTER","KEY_SIGNING_OPERATION_UPDATE"],"type":"string","default":"KEY_SIGNING_OPERATION_UNSPECIFIED","description":" - KEY_SIGNING_OPERATION_UNSPECIFIED: KEY_SIGNING_OPERATION_UNSPECIFIED is invalid for signing requests.\n - KEY_SIGNING_OPERATION_REGISTER: KEY_SIGNING_OPERATION_REGISTER creates the first stable-key association.\n - KEY_SIGNING_OPERATION_UPDATE: KEY_SIGNING_OPERATION_UPDATE replaces an existing Mina key.","name":"operation","in":"query"},{"enum":["ACTOR_TYPE_UNSPECIFIED","ACTOR_TYPE_USER","ACTOR_TYPE_VALIDATOR"],"type":"string","default":"ACTOR_TYPE_UNSPECIFIED","description":" - ACTOR_TYPE_UNSPECIFIED: ACTOR_TYPE_UNSPECIFIED is invalid for key-registry operations.\n - ACTOR_TYPE_USER: ACTOR_TYPE_USER identifies a user account key association.\n - ACTOR_TYPE_VALIDATOR: ACTOR_TYPE_VALIDATOR identifies a validator consensus key association.","name":"actor_type","in":"query"},{"type":"string","format":"byte","name":"cosmos_public_key","in":"query"},{"type":"string","format":"byte","name":"new_mina_public_key","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetKeySigningChallengeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin17","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/smartaccounts/v1/get_session_keys_by_identity":{"get":{"tags":["Query"],"summary":"GetSessionKeysByIdentity Queries a list of GetSessionKeysByIdentity items.","operationId":"GithubComnode101IopulsarChainQuery_GetSessionKeysByIdentity","parameters":[{"type":"string","format":"byte","name":"identity","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.smartaccounts.v1.QueryGetSessionKeysByIdentityResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/smartaccounts/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin22","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.smartaccounts.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/commitments/{validator}":{"get":{"tags":["Query"],"summary":"CommitmentsByValidator lists retained commitments for a validator.","operationId":"GithubComnode101IopulsarChainQuery_CommitmentsByValidator","parameters":[{"type":"string","name":"validator","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryCommitmentsByValidatorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/commitments/{validator}/{commitment_height}":{"get":{"tags":["Query"],"summary":"Commitment returns one retained validator commitment.","operationId":"GithubComnode101IopulsarChainQuery_Commitment","parameters":[{"type":"string","name":"validator","in":"path","required":true},{"type":"string","format":"uint64","name":"commitment_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryCommitmentResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/params":{"get":{"tags":["Query"],"summary":"Params returns module parameters.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin27","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/height/{submission_height}":{"get":{"tags":["Query"],"summary":"ProofsByHeight lists proofs submitted at a height.","operationId":"GithubComnode101IopulsarChainQuery_ProofsByHeight","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofsByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/verification-id/{verification_id}":{"get":{"tags":["Query"],"summary":"ProofByVerificationId resolves the permanent verification request registry.","operationId":"GithubComnode101IopulsarChainQuery_ProofByVerificationId","parameters":[{"type":"string","format":"byte","name":"verification_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"Proof returns a pending or finalized proof by key.","operationId":"GithubComnode101IopulsarChainQuery_Proof","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/results/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"FinalProofResult returns an immutable finalized result.","operationId":"GithubComnode101IopulsarChainQuery_FinalProofResult","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryFinalProofResultResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/tallies/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"ProofTally returns the active tally for a pending proof.","operationId":"GithubComnode101IopulsarChainQuery_ProofTally","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofTallyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/votes/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"VerificationVotes lists effective votes for a proof.","operationId":"GithubComnode101IopulsarChainQuery_VerificationVotes","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryVerificationVotesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/votes/{submission_height}/{index_in_block}/{validator}":{"get":{"tags":["Query"],"summary":"Vote returns one validator's effective vote for a proof.","operationId":"GithubComnode101IopulsarChainQuery_Vote","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true},{"type":"string","name":"validator","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryVoteResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/votepersistence/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin33","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/votepersistence/v1/vote_extensions":{"get":{"tags":["Query"],"summary":"VoteExtensions queries the currently persisted vote extensions.","operationId":"GithubComnode101IopulsarChainQuery_VoteExtensions","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.QueryVoteExtensionsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}}},"definitions":{"cosmos.base.query.v1beta1.PageRequest":{"description":"message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }","type":"object","title":"PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:","properties":{"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.","type":"boolean"},"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.","type":"string","format":"byte"},"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.","type":"string","format":"uint64"},"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.","type":"string","format":"uint64"},"reverse":{"description":"reverse is set to true if results are to be returned in the descending order.","type":"boolean"}}},"cosmos.base.query.v1beta1.PageResponse":{"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 }","type":"object","properties":{"next_key":{"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.","type":"string","format":"byte"},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}},"google.protobuf.Any":{"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{}},"google.rpc.Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"details":{"type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"message":{"type":"string"}}},"pulsarchain.abci.QueryGetValidatorSetWithPowersResponse":{"type":"object","properties":{"validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.common.ValidatorEntry"}}}},"pulsarchain.abci.QueryVoteExtBodyByHeightResponse":{"description":"QueryVoteExtBodyByHeightResponse defines the response for VoteExtBodyByHeight.","type":"object","properties":{"vote_ext_body":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.VoteExtBody"}}},"pulsarchain.bridge.v1.Params":{"description":"Params defines the parameters for the module.","type":"object","properties":{"actions_reduced_root_snapshot_window_size":{"description":"actions_reduced_root_snapshot_window_size is the retained consensus root window.","type":"string","format":"int64"},"confirmation_depth":{"description":"confirmation_depth is the Mina finality depth used by the archive wrapper.","type":"string","format":"int64"},"contract_address":{"description":"contract_address is the Mina bridge contract address.","type":"string"},"max_block_range":{"description":"max_block_range is the maximum Mina height span processed by one request.","type":"string","format":"int64"},"start_block_height":{"description":"start_block_height is the first Mina block indexed by the bridge.","type":"string","format":"int64"}}},"pulsarchain.bridge.v1.QueryActionsReducedRootResponse":{"description":"QueryActionsReducedRootResponse defines the QueryActionsReducedRootResponse message.","type":"object","properties":{"actions_reduced_root":{"type":"string"}}},"pulsarchain.bridge.v1.QueryLatestActionHashesResponse":{"description":"QueryLatestActionHashesResponse defines the QueryLatestActionHashesResponse message.","type":"object","properties":{"action_hashes":{"description":"action_hashes is the ordered canonical hash batch that reconstructs\nthe root transition for the source Cosmos block.","type":"array","items":{"type":"string"}},"action_hashes_cosmos_block_height":{"description":"action_hashes_cosmos_block_height is the Cosmos block height where\nthis query batch was produced.","type":"string","format":"int64"},"latest_fetched_mina_height":{"description":"latest_fetched_mina_height is the inclusive upper Mina cursor of the\ncurrent batch. Together with start_mina_height it defines the consumed\nMina interval (start_mina_height, latest_fetched_mina_height].","type":"string","format":"int64"},"start_mina_height":{"description":"start_mina_height is the exclusive lower Mina cursor of the current batch.","type":"string","format":"int64"}}},"pulsarchain.bridge.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.bridge.v1.Params"}}},"pulsarchain.common.ValidatorEntry":{"type":"object","properties":{"consensus_power":{"type":"string","format":"int64"},"validator_cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.ActorType":{"description":"ActorType identifies the key-registry actor authorized by a signing challenge.\n\n - ACTOR_TYPE_UNSPECIFIED: ACTOR_TYPE_UNSPECIFIED is invalid for key-registry operations.\n - ACTOR_TYPE_USER: ACTOR_TYPE_USER identifies a user account key association.\n - ACTOR_TYPE_VALIDATOR: ACTOR_TYPE_VALIDATOR identifies a validator consensus key association.","type":"string","default":"ACTOR_TYPE_UNSPECIFIED","enum":["ACTOR_TYPE_UNSPECIFIED","ACTOR_TYPE_USER","ACTOR_TYPE_VALIDATOR"]},"pulsarchain.keyregistry.v1.KeySigningOperation":{"description":"KeySigningOperation identifies the key-registry state transition authorized\nby a wallet field signature.\n\n - KEY_SIGNING_OPERATION_UNSPECIFIED: KEY_SIGNING_OPERATION_UNSPECIFIED is invalid for signing requests.\n - KEY_SIGNING_OPERATION_REGISTER: KEY_SIGNING_OPERATION_REGISTER creates the first stable-key association.\n - KEY_SIGNING_OPERATION_UPDATE: KEY_SIGNING_OPERATION_UPDATE replaces an existing Mina key.","type":"string","default":"KEY_SIGNING_OPERATION_UNSPECIFIED","enum":["KEY_SIGNING_OPERATION_UNSPECIFIED","KEY_SIGNING_OPERATION_REGISTER","KEY_SIGNING_OPERATION_UPDATE"]},"pulsarchain.keyregistry.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.keyregistry.v1.QueryGetKeySigningChallengeResponse":{"description":"QueryGetKeySigningChallengeResponse contains the exact field and state version to sign.","type":"object","properties":{"challenge":{"type":"string"},"challenge_bytes":{"type":"string","format":"byte"},"new_key_version":{"type":"string","format":"uint64"},"previous_mina_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetUserCosmosPublicKeyResponse":{"description":"QueryGetUserCosmosPublicKeyResponse defines the QueryGetUserCosmosPublicKeyResponse message.","type":"object","properties":{"user_cosmos_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetUserMinaPublicKeyResponse":{"description":"QueryGetUserMinaPublicKeyResponse defines the QueryGetUserMinaPublicKeyResponse message.","type":"object","properties":{"user_mina_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse":{"description":"QueryGetValidatorCosmosPubKeyResponse defines the QueryGetValidatorCosmosPubKeyResponse message.","type":"object","properties":{"validator_cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse":{"description":"QueryGetValidatorMinaPubKeyResponse defines the QueryGetValidatorMinaPubKeyResponse message.","type":"object","properties":{"validator_mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorSetWithMinaKeysResponse":{"description":"QueryGetValidatorSetWithMinaKeysResponse defines the response for GetValidatorSetWithMinaKeys.","type":"object","properties":{"registered_validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.keyregistry.v1.RegisteredValidatorSetEntry"}}}},"pulsarchain.keyregistry.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.keyregistry.v1.Params"}}},"pulsarchain.keyregistry.v1.RegisteredValidatorSetEntry":{"type":"object","properties":{"consensus_power":{"type":"string","format":"int64"},"validator_cosmos_pub_key":{"type":"string","format":"byte"},"validator_mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.smartaccounts.v1.Params":{"description":"Params defines the parameters for the module.","type":"object","properties":{"verification_key_hash":{"type":"string","format":"byte"}}},"pulsarchain.smartaccounts.v1.QueryGetSessionKeysByIdentityResponse":{"description":"QueryGetSessionKeysByIdentityResponse defines the QueryGetSessionKeysByIdentityResponse message.","type":"object","properties":{"account_address":{"type":"string","format":"byte"},"session_keys":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.smartaccounts.v1.SessionKey"}}}},"pulsarchain.smartaccounts.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.smartaccounts.v1.Params"}}},"pulsarchain.smartaccounts.v1.SessionKey":{"description":"SessionKey defines an Ed25519 public key and its exclusive expiration height.","type":"object","properties":{"expires_at_height":{"type":"string","format":"uint64"},"public_key":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.CommitmentEntry":{"description":"CommitmentEntry is a query representation of a retained commitment.","type":"object","properties":{"commitment":{"$ref":"#/definitions/pulsarchain.verification.v1.CommitmentRecord"},"commitment_height":{"type":"string","format":"uint64"},"validator":{"type":"string"}}},"pulsarchain.verification.v1.CommitmentRecord":{"description":"CommitmentRecord stores a validator commitment root.","type":"object","properties":{"commitment":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.FinalProofResult":{"description":"FinalProofResult stores an immutable finalized proof outcome.","type":"object","properties":{"finalized_height":{"type":"string","format":"uint64"},"invalid_voting_power":{"type":"string","format":"int64"},"proof_hash":{"type":"string","format":"byte"},"proof_type":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofType"},"public_inputs_hash":{"type":"string","format":"byte"},"status":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofStatus"},"submission_height":{"type":"string","format":"uint64"},"total_voting_power":{"type":"string","format":"int64"},"valid_voting_power":{"type":"string","format":"int64"},"verification_id":{"type":"string","format":"byte"},"verification_key_hash":{"type":"string","format":"byte"},"voting_power_threshold":{"type":"string","format":"int64"}}},"pulsarchain.verification.v1.Params":{"description":"Params defines the governance-controlled verification module parameters.","type":"object","properties":{"max_proofs_per_block":{"type":"integer","format":"int64"}}},"pulsarchain.verification.v1.ProofKey":{"description":"ProofKey identifies a proof by absolute block height and in-block index.","type":"object","properties":{"index_in_block":{"type":"integer","format":"int64"},"submission_height":{"type":"string","format":"uint64"}}},"pulsarchain.verification.v1.ProofRecord":{"description":"ProofRecord stores the complete descriptor and its chain-derived identity.","type":"object","properties":{"proof_hash":{"type":"string","format":"byte"},"proof_type":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofType"},"public_inputs_hash":{"type":"string","format":"byte"},"verification_id":{"type":"string","format":"byte"},"verification_key_hash":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.ProofStatus":{"description":"ProofStatus is the finalized verification outcome.\n\n - PROOF_STATUS_PENDING: PROOF_STATUS_PENDING is the non-finalized status.\n - PROOF_STATUS_VALID: PROOF_STATUS_VALID means valid voting power exceeded two thirds.\n - PROOF_STATUS_INVALID: PROOF_STATUS_INVALID means invalid voting power exceeded two thirds.\n - PROOF_STATUS_INCONCLUSIVE: PROOF_STATUS_INCONCLUSIVE means neither side reached threshold.","type":"string","default":"PROOF_STATUS_PENDING","enum":["PROOF_STATUS_PENDING","PROOF_STATUS_VALID","PROOF_STATUS_INVALID","PROOF_STATUS_INCONCLUSIVE"]},"pulsarchain.verification.v1.ProofTally":{"description":"ProofTally stores the historical consensus power behind effective votes.","type":"object","properties":{"invalid_voting_power":{"type":"string","format":"int64"},"valid_voting_power":{"type":"string","format":"int64"}}},"pulsarchain.verification.v1.ProofType":{"description":"ProofType selects the verifier family. The exact statement and circuit are\nbound separately by the public-input and verification-key hashes.\n\n - PROOF_TYPE_UNSPECIFIED: PROOF_TYPE_UNSPECIFIED is invalid for proof submission.\n - PROOF_TYPE_MINA_PICKLES: PROOF_TYPE_MINA_PICKLES selects Mina's Pickles proof system.\n - PROOF_TYPE_NOIR_BARRETENBERG: PROOF_TYPE_NOIR_BARRETENBERG selects Noir proofs using Barretenberg.","type":"string","default":"PROOF_TYPE_UNSPECIFIED","enum":["PROOF_TYPE_UNSPECIFIED","PROOF_TYPE_MINA_PICKLES","PROOF_TYPE_NOIR_BARRETENBERG"]},"pulsarchain.verification.v1.QueryCommitmentResponse":{"description":"QueryCommitmentResponse contains one retained commitment.","type":"object","properties":{"commitment":{"$ref":"#/definitions/pulsarchain.verification.v1.CommitmentEntry"}}},"pulsarchain.verification.v1.QueryCommitmentsByValidatorResponse":{"description":"QueryCommitmentsByValidatorResponse contains retained commitments.","type":"object","properties":{"commitments":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.CommitmentEntry"}},"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"pulsarchain.verification.v1.QueryFinalProofResultResponse":{"description":"QueryFinalProofResultResponse contains an immutable proof result.","type":"object","properties":{"final_result":{"$ref":"#/definitions/pulsarchain.verification.v1.FinalProofResult"},"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"}}},"pulsarchain.verification.v1.QueryParamsResponse":{"description":"QueryParamsResponse contains verification parameters.","type":"object","properties":{"params":{"$ref":"#/definitions/pulsarchain.verification.v1.Params"}}},"pulsarchain.verification.v1.QueryProofResponse":{"description":"QueryProofResponse contains either pending or finalized proof state.","type":"object","properties":{"final_result":{"$ref":"#/definitions/pulsarchain.verification.v1.FinalProofResult"},"pending":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofRecord"},"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"}}},"pulsarchain.verification.v1.QueryProofTallyResponse":{"description":"QueryProofTallyResponse contains a pending proof tally.","type":"object","properties":{"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"},"tally":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofTally"}}},"pulsarchain.verification.v1.QueryProofsByHeightResponse":{"description":"QueryProofsByHeightResponse contains a page of proofs.","type":"object","properties":{"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"proofs":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}}}},"pulsarchain.verification.v1.QueryVerificationVotesResponse":{"description":"QueryVerificationVotesResponse contains effective votes.","type":"object","properties":{"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"votes":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.VerificationVoteEntry"}}}},"pulsarchain.verification.v1.QueryVoteResponse":{"description":"QueryVoteResponse contains one effective vote.","type":"object","properties":{"vote":{"$ref":"#/definitions/pulsarchain.verification.v1.VerificationVoteEntry"}}},"pulsarchain.verification.v1.VerificationVoteEntry":{"description":"VerificationVoteEntry is a query representation of an effective vote.","type":"object","properties":{"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"},"state":{"$ref":"#/definitions/pulsarchain.verification.v1.VoteState"},"validator":{"type":"string"}}},"pulsarchain.verification.v1.VoteState":{"description":"VoteState tracks a validator's effective vote.\n\n - VOTE_STATE_NONE: VOTE_STATE_NONE means the validator has not voted.\n - VOTE_STATE_TRUE: VOTE_STATE_TRUE is an effective valid vote.\n - VOTE_STATE_FALSE: VOTE_STATE_FALSE is an effective invalid vote.\n - VOTE_STATE_EQUIVOCATED: VOTE_STATE_EQUIVOCATED excludes conflicting votes from the tally.","type":"string","default":"VOTE_STATE_NONE","enum":["VOTE_STATE_NONE","VOTE_STATE_TRUE","VOTE_STATE_FALSE","VOTE_STATE_EQUIVOCATED"]},"pulsarchain.votepersistence.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.votepersistence.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.votepersistence.v1.Params"}}},"pulsarchain.votepersistence.v1.QueryVoteExtensionsResponse":{"description":"QueryVoteExtensionsResponse defines the QueryVoteExtensionsResponse message.","type":"object","properties":{"persisted_vote_extensions_block_height":{"description":"persisted_vote_extensions_block_height is the signed source/current state\nheight. For vote extensions produced at height N, this value is N-2.","type":"string","format":"int64"},"query_block_height":{"type":"string","format":"int64"},"vote_extensions":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.votepersistence.v1.StoredVoteExtension"}}}},"pulsarchain.votepersistence.v1.StoredVoteExtension":{"description":"StoredVoteExtension defines a persisted Mina validator vote extension.","type":"object","properties":{"mina_public_key":{"type":"string","format":"byte"},"vote_extension":{"type":"string","format":"byte"}}},"pulsarchain.votepersistence.v1.VoteExtBody":{"description":"VoteExtBody defines the VoteExtBody message.","type":"object","properties":{"actions_reduced_root":{"type":"string","format":"byte"},"current_block_height":{"type":"string","format":"int64"},"current_state_root":{"type":"string","format":"byte"},"next_validator_set_hash":{"type":"string","format":"byte"}}}},"tags":[{"name":"VerificationService"},{"name":"Query"},{"name":"Msg"}]} \ No newline at end of file +{"id":"github.com/node101-io/pulsar-chain","consumes":["application/json"],"produces":["application/json"],"swagger":"2.0","info":{"description":"Chain github.com/node101-io/pulsar-chain REST API","title":"HTTP API Console","contact":{"name":"github.com/node101-io/pulsar-chain"},"version":"version not set"},"paths":{"/node101-io/pulsar-chain/abci/v1/validator_set_with_powers/{block_height}":{"get":{"tags":["Query"],"operationId":"GithubComnode101IopulsarChainQuery_GetValidatorSetWithPowers","parameters":[{"type":"string","format":"int64","name":"block_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.abci.QueryGetValidatorSetWithPowersResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/abci/v1/vote_ext_body_by_height/{vote_extension_height}":{"get":{"tags":["Query"],"summary":"VoteExtBodyByHeight queries the vote extension body for a vote-extension\nconsensus height.","operationId":"GithubComnode101IopulsarChainQuery_VoteExtBodyByHeight","parameters":[{"type":"string","format":"int64","description":"vote_extension_height is the consensus height N where the vote extension is\nproduced. The returned body signs the transition from state N-2 to state N-1.","name":"vote_extension_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.abci.QueryVoteExtBodyByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/actions_reduced_root":{"get":{"tags":["Query"],"summary":"ActionsReducedRoot Queries a list of ActionsReducedRoot items.","operationId":"GithubComnode101IopulsarChainQuery_ActionsReducedRoot","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryActionsReducedRootResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/latest_action_hashes":{"get":{"tags":["Query"],"summary":"LatestActionHashes Queries a list of LatestActionHashes items.","operationId":"GithubComnode101IopulsarChainQuery_LatestActionHashes","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryLatestActionHashesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/bridge/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_Params","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.bridge.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_user_cosmos_public_key/{user_mina_public_key}":{"get":{"tags":["Query"],"summary":"GetUserCosmosPublicKey Queries a list of GetUserCosmosPublicKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserCosmosPublicKey","parameters":[{"type":"string","format":"byte","name":"user_mina_public_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserCosmosPublicKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_user_mina_public_key/{user_cosmos_public_key}":{"get":{"tags":["Query"],"summary":"GetUserMinaPublicKey Queries a list of GetUserMinaPublicKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetUserMinaPublicKey","parameters":[{"type":"string","format":"byte","name":"user_cosmos_public_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetUserMinaPublicKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_cosmos_pub_key/{validator_mina_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorCosmosPubKey Queries a list of GetValidatorCosmosPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorCosmosPubKey","parameters":[{"type":"string","format":"byte","name":"validator_mina_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_mina_pub_key/{validator_cosmos_pub_key}":{"get":{"tags":["Query"],"summary":"GetValidatorMinaPubKey Queries a list of GetValidatorMinaPubKey items.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorMinaPubKey","parameters":[{"type":"string","format":"byte","name":"validator_cosmos_pub_key","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/get_validator_set_with_mina_keys":{"get":{"tags":["Query"],"summary":"GetValidatorSetWithMinaKeys returns the supplied validator set with each validator's registered Mina public key.","operationId":"GithubComnode101IopulsarChainQuery_GetValidatorSetWithMinaKeys","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetValidatorSetWithMinaKeysResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/key_signing_challenge":{"get":{"tags":["Query"],"summary":"GetKeySigningChallenge returns the state-bound field a Mina wallet must sign.","operationId":"GithubComnode101IopulsarChainQuery_GetKeySigningChallenge","parameters":[{"enum":["KEY_SIGNING_OPERATION_UNSPECIFIED","KEY_SIGNING_OPERATION_REGISTER","KEY_SIGNING_OPERATION_UPDATE"],"type":"string","default":"KEY_SIGNING_OPERATION_UNSPECIFIED","description":" - KEY_SIGNING_OPERATION_UNSPECIFIED: KEY_SIGNING_OPERATION_UNSPECIFIED is invalid for signing requests.\n - KEY_SIGNING_OPERATION_REGISTER: KEY_SIGNING_OPERATION_REGISTER creates the first stable-key association.\n - KEY_SIGNING_OPERATION_UPDATE: KEY_SIGNING_OPERATION_UPDATE replaces an existing Mina key.","name":"operation","in":"query"},{"enum":["ACTOR_TYPE_UNSPECIFIED","ACTOR_TYPE_USER","ACTOR_TYPE_VALIDATOR"],"type":"string","default":"ACTOR_TYPE_UNSPECIFIED","description":" - ACTOR_TYPE_UNSPECIFIED: ACTOR_TYPE_UNSPECIFIED is invalid for key-registry operations.\n - ACTOR_TYPE_USER: ACTOR_TYPE_USER identifies a user account key association.\n - ACTOR_TYPE_VALIDATOR: ACTOR_TYPE_VALIDATOR identifies a validator consensus key association.","name":"actor_type","in":"query"},{"type":"string","format":"byte","name":"cosmos_public_key","in":"query"},{"type":"string","format":"byte","name":"new_mina_public_key","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryGetKeySigningChallengeResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/keyregistry/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin17","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.keyregistry.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/smartaccounts/v1/get_session_keys_by_identity":{"get":{"tags":["Query"],"summary":"GetSessionKeysByIdentity Queries a list of GetSessionKeysByIdentity items.","operationId":"GithubComnode101IopulsarChainQuery_GetSessionKeysByIdentity","parameters":[{"type":"string","format":"byte","name":"identity","in":"query"},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.smartaccounts.v1.QueryGetSessionKeysByIdentityResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/smartaccounts/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin22","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.smartaccounts.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/commitments/{validator}":{"get":{"tags":["Query"],"summary":"CommitmentsByValidator lists retained commitments for a validator.","operationId":"GithubComnode101IopulsarChainQuery_CommitmentsByValidator","parameters":[{"type":"string","name":"validator","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryCommitmentsByValidatorResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/commitments/{validator}/{commitment_height}":{"get":{"tags":["Query"],"summary":"Commitment returns one retained validator commitment.","operationId":"GithubComnode101IopulsarChainQuery_Commitment","parameters":[{"type":"string","name":"validator","in":"path","required":true},{"type":"string","format":"uint64","name":"commitment_height","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryCommitmentResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/params":{"get":{"tags":["Query"],"summary":"Params returns module parameters.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin27","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/height/{submission_height}":{"get":{"tags":["Query"],"summary":"ProofsByHeight lists proofs submitted at a height.","operationId":"GithubComnode101IopulsarChainQuery_ProofsByHeight","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofsByHeightResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/verification-id/{verification_id}":{"get":{"tags":["Query"],"summary":"ProofByVerificationId resolves the permanent verification request registry.","operationId":"GithubComnode101IopulsarChainQuery_ProofByVerificationId","parameters":[{"type":"string","format":"byte","name":"verification_id","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/proofs/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"Proof returns a pending or finalized proof by key.","operationId":"GithubComnode101IopulsarChainQuery_Proof","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/results/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"FinalProofResult returns an immutable finalized result.","operationId":"GithubComnode101IopulsarChainQuery_FinalProofResult","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryFinalProofResultResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/tallies/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"ProofTally returns the active tally for a pending proof.","operationId":"GithubComnode101IopulsarChainQuery_ProofTally","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryProofTallyResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/votes/{submission_height}/{index_in_block}":{"get":{"tags":["Query"],"summary":"VerificationVotes lists effective votes for a proof.","operationId":"GithubComnode101IopulsarChainQuery_VerificationVotes","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true},{"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.","name":"pagination.key","in":"query"},{"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.","name":"pagination.offset","in":"query"},{"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.","name":"pagination.limit","in":"query"},{"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.","name":"pagination.count_total","in":"query"},{"type":"boolean","description":"reverse is set to true if results are to be returned in the descending order.","name":"pagination.reverse","in":"query"}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryVerificationVotesResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/verification/v1/votes/{submission_height}/{index_in_block}/{validator}":{"get":{"tags":["Query"],"summary":"Vote returns one validator's effective vote for a proof.","operationId":"GithubComnode101IopulsarChainQuery_Vote","parameters":[{"type":"string","format":"uint64","name":"submission_height","in":"path","required":true},{"type":"integer","format":"int64","name":"index_in_block","in":"path","required":true},{"type":"string","name":"validator","in":"path","required":true}],"responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.verification.v1.QueryVoteResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/votepersistence/v1/params":{"get":{"tags":["Query"],"summary":"Parameters queries the parameters of the module.","operationId":"GithubComnode101IopulsarChainQuery_ParamsMixin33","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.QueryParamsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}},"/node101-io/pulsar-chain/votepersistence/v1/vote_extensions":{"get":{"tags":["Query"],"summary":"VoteExtensions queries the currently persisted vote extensions.","operationId":"GithubComnode101IopulsarChainQuery_VoteExtensions","responses":{"200":{"description":"A successful response.","schema":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.QueryVoteExtensionsResponse"}},"default":{"description":"An unexpected error response.","schema":{"$ref":"#/definitions/google.rpc.Status"}}}}}},"definitions":{"cosmos.base.query.v1beta1.PageRequest":{"description":"message SomeRequest {\n Foo some_parameter = 1;\n PageRequest pagination = 2;\n }","type":"object","title":"PageRequest is to be embedded in gRPC request messages for efficient\npagination. Ex:","properties":{"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.","type":"boolean"},"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.","type":"string","format":"byte"},"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.","type":"string","format":"uint64"},"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.","type":"string","format":"uint64"},"reverse":{"description":"reverse is set to true if results are to be returned in the descending order.","type":"boolean"}}},"cosmos.base.query.v1beta1.PageResponse":{"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 }","type":"object","properties":{"next_key":{"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.","type":"string","format":"byte"},"total":{"type":"string","format":"uint64","title":"total is total number of results available if PageRequest.count_total\nwas set, its value is undefined otherwise"}}},"google.protobuf.Any":{"type":"object","properties":{"@type":{"type":"string"}},"additionalProperties":{}},"google.rpc.Status":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"details":{"type":"array","items":{"type":"object","$ref":"#/definitions/google.protobuf.Any"}},"message":{"type":"string"}}},"pulsarchain.abci.QueryGetValidatorSetWithPowersResponse":{"type":"object","properties":{"validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.common.ValidatorEntry"}}}},"pulsarchain.abci.QueryVoteExtBodyByHeightResponse":{"description":"QueryVoteExtBodyByHeightResponse defines the response for VoteExtBodyByHeight.","type":"object","properties":{"vote_ext_body":{"$ref":"#/definitions/pulsarchain.votepersistence.v1.VoteExtBody"}}},"pulsarchain.bridge.v1.Params":{"description":"Params defines the parameters for the module.","type":"object","properties":{"actions_reduced_root_snapshot_window_size":{"description":"actions_reduced_root_snapshot_window_size is the retained consensus root window.","type":"string","format":"int64"},"confirmation_depth":{"description":"confirmation_depth is the Mina finality depth used by the archive wrapper.","type":"string","format":"int64"},"contract_address":{"description":"contract_address is the Mina bridge contract address.","type":"string"},"max_block_range":{"description":"max_block_range is the maximum Mina height span processed by one request.","type":"string","format":"int64"},"start_block_height":{"description":"start_block_height is the first Mina block indexed by the bridge.","type":"string","format":"int64"}}},"pulsarchain.bridge.v1.QueryActionsReducedRootResponse":{"description":"QueryActionsReducedRootResponse defines the QueryActionsReducedRootResponse message.","type":"object","properties":{"actions_reduced_root":{"type":"string"}}},"pulsarchain.bridge.v1.QueryLatestActionHashesResponse":{"description":"QueryLatestActionHashesResponse defines the QueryLatestActionHashesResponse message.","type":"object","properties":{"action_hashes":{"description":"action_hashes is the ordered canonical hash batch that reconstructs\nthe root transition for the source Cosmos block.","type":"array","items":{"type":"string"}},"action_hashes_cosmos_block_height":{"description":"action_hashes_cosmos_block_height is the Cosmos block height where\nthis query batch was produced.","type":"string","format":"int64"},"latest_fetched_mina_height":{"description":"latest_fetched_mina_height is the inclusive upper Mina cursor of the\ncurrent batch. Together with start_mina_height it defines the consumed\nMina interval (start_mina_height, latest_fetched_mina_height].","type":"string","format":"int64"},"start_mina_height":{"description":"start_mina_height is the exclusive lower Mina cursor of the current batch.","type":"string","format":"int64"}}},"pulsarchain.bridge.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.bridge.v1.Params"}}},"pulsarchain.common.ValidatorEntry":{"type":"object","properties":{"consensus_power":{"type":"string","format":"int64"},"validator_cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.ActorType":{"description":"ActorType identifies the key-registry actor authorized by a signing challenge.\n\n - ACTOR_TYPE_UNSPECIFIED: ACTOR_TYPE_UNSPECIFIED is invalid for key-registry operations.\n - ACTOR_TYPE_USER: ACTOR_TYPE_USER identifies a user account key association.\n - ACTOR_TYPE_VALIDATOR: ACTOR_TYPE_VALIDATOR identifies a validator consensus key association.","type":"string","default":"ACTOR_TYPE_UNSPECIFIED","enum":["ACTOR_TYPE_UNSPECIFIED","ACTOR_TYPE_USER","ACTOR_TYPE_VALIDATOR"]},"pulsarchain.keyregistry.v1.KeySigningOperation":{"description":"KeySigningOperation identifies the key-registry state transition authorized\nby a wallet field signature.\n\n - KEY_SIGNING_OPERATION_UNSPECIFIED: KEY_SIGNING_OPERATION_UNSPECIFIED is invalid for signing requests.\n - KEY_SIGNING_OPERATION_REGISTER: KEY_SIGNING_OPERATION_REGISTER creates the first stable-key association.\n - KEY_SIGNING_OPERATION_UPDATE: KEY_SIGNING_OPERATION_UPDATE replaces an existing Mina key.","type":"string","default":"KEY_SIGNING_OPERATION_UNSPECIFIED","enum":["KEY_SIGNING_OPERATION_UNSPECIFIED","KEY_SIGNING_OPERATION_REGISTER","KEY_SIGNING_OPERATION_UPDATE"]},"pulsarchain.keyregistry.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.keyregistry.v1.QueryGetKeySigningChallengeResponse":{"description":"QueryGetKeySigningChallengeResponse contains the exact field and state version to sign.","type":"object","properties":{"challenge":{"type":"string"},"challenge_bytes":{"type":"string","format":"byte"},"new_key_version":{"type":"string","format":"uint64"},"previous_mina_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetUserCosmosPublicKeyResponse":{"description":"QueryGetUserCosmosPublicKeyResponse defines the QueryGetUserCosmosPublicKeyResponse message.","type":"object","properties":{"user_cosmos_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetUserMinaPublicKeyResponse":{"description":"QueryGetUserMinaPublicKeyResponse defines the QueryGetUserMinaPublicKeyResponse message.","type":"object","properties":{"user_mina_public_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorCosmosPubKeyResponse":{"description":"QueryGetValidatorCosmosPubKeyResponse defines the QueryGetValidatorCosmosPubKeyResponse message.","type":"object","properties":{"validator_cosmos_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorMinaPubKeyResponse":{"description":"QueryGetValidatorMinaPubKeyResponse defines the QueryGetValidatorMinaPubKeyResponse message.","type":"object","properties":{"validator_mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.keyregistry.v1.QueryGetValidatorSetWithMinaKeysResponse":{"description":"QueryGetValidatorSetWithMinaKeysResponse defines the response for GetValidatorSetWithMinaKeys.","type":"object","properties":{"registered_validators":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.keyregistry.v1.RegisteredValidatorSetEntry"}}}},"pulsarchain.keyregistry.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.keyregistry.v1.Params"}}},"pulsarchain.keyregistry.v1.RegisteredValidatorSetEntry":{"type":"object","properties":{"consensus_power":{"type":"string","format":"int64"},"validator_cosmos_pub_key":{"type":"string","format":"byte"},"validator_mina_pub_key":{"type":"string","format":"byte"}}},"pulsarchain.smartaccounts.v1.Params":{"description":"Params defines the parameters for the module.","type":"object","properties":{"verification_key_hash":{"type":"string","format":"byte"}}},"pulsarchain.smartaccounts.v1.QueryGetSessionKeysByIdentityResponse":{"description":"QueryGetSessionKeysByIdentityResponse defines the QueryGetSessionKeysByIdentityResponse message.","type":"object","properties":{"account_address":{"type":"string","format":"byte"},"pagination":{"description":"pagination describes this page of session keys.","$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"session_keys":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.smartaccounts.v1.SessionKey"}}}},"pulsarchain.smartaccounts.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.smartaccounts.v1.Params"}}},"pulsarchain.smartaccounts.v1.SessionKey":{"description":"SessionKey defines an Ed25519 public key and its exclusive expiration height.","type":"object","properties":{"expires_at_height":{"type":"string","format":"uint64"},"public_key":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.CommitmentEntry":{"description":"CommitmentEntry is a query representation of a retained commitment.","type":"object","properties":{"commitment":{"$ref":"#/definitions/pulsarchain.verification.v1.CommitmentRecord"},"commitment_height":{"type":"string","format":"uint64"},"validator":{"type":"string"}}},"pulsarchain.verification.v1.CommitmentRecord":{"description":"CommitmentRecord stores a validator commitment root.","type":"object","properties":{"commitment":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.FinalProofResult":{"description":"FinalProofResult stores an immutable finalized proof outcome.","type":"object","properties":{"finalized_height":{"type":"string","format":"uint64"},"invalid_voting_power":{"type":"string","format":"int64"},"proof_hash":{"type":"string","format":"byte"},"proof_type":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofType"},"public_inputs_hash":{"type":"string","format":"byte"},"status":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofStatus"},"submission_height":{"type":"string","format":"uint64"},"total_voting_power":{"type":"string","format":"int64"},"valid_voting_power":{"type":"string","format":"int64"},"verification_id":{"type":"string","format":"byte"},"verification_key_hash":{"type":"string","format":"byte"},"voting_power_threshold":{"type":"string","format":"int64"}}},"pulsarchain.verification.v1.Params":{"description":"Params defines the governance-controlled verification module parameters.","type":"object","properties":{"max_proofs_per_block":{"type":"integer","format":"int64"}}},"pulsarchain.verification.v1.ProofKey":{"description":"ProofKey identifies a proof by absolute block height and in-block index.","type":"object","properties":{"index_in_block":{"type":"integer","format":"int64"},"submission_height":{"type":"string","format":"uint64"}}},"pulsarchain.verification.v1.ProofRecord":{"description":"ProofRecord stores the complete descriptor and its chain-derived identity.","type":"object","properties":{"proof_hash":{"type":"string","format":"byte"},"proof_type":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofType"},"public_inputs_hash":{"type":"string","format":"byte"},"verification_id":{"type":"string","format":"byte"},"verification_key_hash":{"type":"string","format":"byte"}}},"pulsarchain.verification.v1.ProofStatus":{"description":"ProofStatus is the finalized verification outcome.\n\n - PROOF_STATUS_PENDING: PROOF_STATUS_PENDING is the non-finalized status.\n - PROOF_STATUS_VALID: PROOF_STATUS_VALID means valid voting power exceeded two thirds.\n - PROOF_STATUS_INVALID: PROOF_STATUS_INVALID means invalid voting power exceeded two thirds.\n - PROOF_STATUS_INCONCLUSIVE: PROOF_STATUS_INCONCLUSIVE means neither side reached threshold.","type":"string","default":"PROOF_STATUS_PENDING","enum":["PROOF_STATUS_PENDING","PROOF_STATUS_VALID","PROOF_STATUS_INVALID","PROOF_STATUS_INCONCLUSIVE"]},"pulsarchain.verification.v1.ProofTally":{"description":"ProofTally stores the historical consensus power behind effective votes.","type":"object","properties":{"invalid_voting_power":{"type":"string","format":"int64"},"valid_voting_power":{"type":"string","format":"int64"}}},"pulsarchain.verification.v1.ProofType":{"description":"ProofType selects the verifier family. The exact statement and circuit are\nbound separately by the public-input and verification-key hashes.\n\n - PROOF_TYPE_UNSPECIFIED: PROOF_TYPE_UNSPECIFIED is invalid for proof submission.\n - PROOF_TYPE_MINA_PICKLES: PROOF_TYPE_MINA_PICKLES selects Mina's Pickles proof system.\n - PROOF_TYPE_NOIR_BARRETENBERG: PROOF_TYPE_NOIR_BARRETENBERG selects Noir proofs using Barretenberg.","type":"string","default":"PROOF_TYPE_UNSPECIFIED","enum":["PROOF_TYPE_UNSPECIFIED","PROOF_TYPE_MINA_PICKLES","PROOF_TYPE_NOIR_BARRETENBERG"]},"pulsarchain.verification.v1.QueryCommitmentResponse":{"description":"QueryCommitmentResponse contains one retained commitment.","type":"object","properties":{"commitment":{"$ref":"#/definitions/pulsarchain.verification.v1.CommitmentEntry"}}},"pulsarchain.verification.v1.QueryCommitmentsByValidatorResponse":{"description":"QueryCommitmentsByValidatorResponse contains retained commitments.","type":"object","properties":{"commitments":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.CommitmentEntry"}},"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"}}},"pulsarchain.verification.v1.QueryFinalProofResultResponse":{"description":"QueryFinalProofResultResponse contains an immutable proof result.","type":"object","properties":{"final_result":{"$ref":"#/definitions/pulsarchain.verification.v1.FinalProofResult"},"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"}}},"pulsarchain.verification.v1.QueryParamsResponse":{"description":"QueryParamsResponse contains verification parameters.","type":"object","properties":{"params":{"$ref":"#/definitions/pulsarchain.verification.v1.Params"}}},"pulsarchain.verification.v1.QueryProofResponse":{"description":"QueryProofResponse contains either pending or finalized proof state.","type":"object","properties":{"final_result":{"$ref":"#/definitions/pulsarchain.verification.v1.FinalProofResult"},"pending":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofRecord"},"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"}}},"pulsarchain.verification.v1.QueryProofTallyResponse":{"description":"QueryProofTallyResponse contains a pending proof tally.","type":"object","properties":{"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"},"tally":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofTally"}}},"pulsarchain.verification.v1.QueryProofsByHeightResponse":{"description":"QueryProofsByHeightResponse contains a page of proofs.","type":"object","properties":{"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"proofs":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.QueryProofResponse"}}}},"pulsarchain.verification.v1.QueryVerificationVotesResponse":{"description":"QueryVerificationVotesResponse contains effective votes.","type":"object","properties":{"pagination":{"$ref":"#/definitions/cosmos.base.query.v1beta1.PageResponse"},"votes":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.verification.v1.VerificationVoteEntry"}}}},"pulsarchain.verification.v1.QueryVoteResponse":{"description":"QueryVoteResponse contains one effective vote.","type":"object","properties":{"vote":{"$ref":"#/definitions/pulsarchain.verification.v1.VerificationVoteEntry"}}},"pulsarchain.verification.v1.VerificationVoteEntry":{"description":"VerificationVoteEntry is a query representation of an effective vote.","type":"object","properties":{"proof_key":{"$ref":"#/definitions/pulsarchain.verification.v1.ProofKey"},"state":{"$ref":"#/definitions/pulsarchain.verification.v1.VoteState"},"validator":{"type":"string"}}},"pulsarchain.verification.v1.VoteState":{"description":"VoteState tracks a validator's effective vote.\n\n - VOTE_STATE_NONE: VOTE_STATE_NONE means the validator has not voted.\n - VOTE_STATE_TRUE: VOTE_STATE_TRUE is an effective valid vote.\n - VOTE_STATE_FALSE: VOTE_STATE_FALSE is an effective invalid vote.\n - VOTE_STATE_EQUIVOCATED: VOTE_STATE_EQUIVOCATED excludes conflicting votes from the tally.","type":"string","default":"VOTE_STATE_NONE","enum":["VOTE_STATE_NONE","VOTE_STATE_TRUE","VOTE_STATE_FALSE","VOTE_STATE_EQUIVOCATED"]},"pulsarchain.votepersistence.v1.Params":{"description":"Params defines the parameters for the module.","type":"object"},"pulsarchain.votepersistence.v1.QueryParamsResponse":{"description":"QueryParamsResponse is response type for the Query/Params RPC method.","type":"object","properties":{"params":{"description":"params holds all the parameters of this module.","$ref":"#/definitions/pulsarchain.votepersistence.v1.Params"}}},"pulsarchain.votepersistence.v1.QueryVoteExtensionsResponse":{"description":"QueryVoteExtensionsResponse defines the QueryVoteExtensionsResponse message.","type":"object","properties":{"persisted_vote_extensions_block_height":{"description":"persisted_vote_extensions_block_height is the signed source/current state\nheight. For vote extensions produced at height N, this value is N-2.","type":"string","format":"int64"},"query_block_height":{"type":"string","format":"int64"},"vote_extensions":{"type":"array","items":{"type":"object","$ref":"#/definitions/pulsarchain.votepersistence.v1.StoredVoteExtension"}}}},"pulsarchain.votepersistence.v1.StoredVoteExtension":{"description":"StoredVoteExtension defines a persisted Mina validator vote extension.","type":"object","properties":{"mina_public_key":{"type":"string","format":"byte"},"vote_extension":{"type":"string","format":"byte"}}},"pulsarchain.votepersistence.v1.VoteExtBody":{"description":"VoteExtBody defines the VoteExtBody message.","type":"object","properties":{"actions_reduced_root":{"type":"string","format":"byte"},"current_block_height":{"type":"string","format":"int64"},"current_state_root":{"type":"string","format":"byte"},"next_validator_set_hash":{"type":"string","format":"byte"}}}},"tags":[{"name":"VerificationService"},{"name":"Query"},{"name":"Msg"}]} \ No newline at end of file From ac88f898146fa5e1862dda233fd904241885f83e Mon Sep 17 00:00:00 2001 From: korayakpinar Date: Thu, 27 Aug 2026 17:39:01 +0300 Subject: [PATCH 51/51] fix(deploy): keep verifier sidecars opt-in --- scripts/deploy_local_lightnet.sh | 81 ++++++++++++++++--------- scripts/test_deploy_local_lightnet.py | 86 +++++++++++++++++++++++++++ 2 files changed, 138 insertions(+), 29 deletions(-) diff --git a/scripts/deploy_local_lightnet.sh b/scripts/deploy_local_lightnet.sh index 9b5d814b..c0386ddb 100755 --- a/scripts/deploy_local_lightnet.sh +++ b/scripts/deploy_local_lightnet.sh @@ -29,6 +29,7 @@ VERIFIER_SHA="${PULSAR_VERIFIER_SHA:-e7582ba2aea2fa12b765221003a366868f39b3e8}" VERIFIER_IMAGE="${PULSAR_VERIFIER_IMAGE:-pulsar-verifier:lightnet}" VERIFIER_CACHE_ROOT="${PULSAR_VERIFIER_CACHE_ROOT:-$REPO_ROOT/.cache/pulsar-verifier}" VERIFIER_REPOSITORY="https://github.com/node101-io/pulsar-verifier.git" +ENABLE_VERIFIER_SIDECARS="${ENABLE_VERIFIER_SIDECARS:-0}" PULSAR_IMAGE="" BRIDGE_CONFIRMATION_DEPTH="${BRIDGE_CONFIRMATION_DEPTH:-3}" BRIDGE_START_BLOCK_HEIGHT="${BRIDGE_START_BLOCK_HEIGHT:-1}" @@ -49,7 +50,7 @@ Recreates the local development stack with: - an existing running Mina Lightnet, or a new Dockerized Lightnet - the blocks_inserted LISTEN/NOTIFY trigger - one shared archive-wrapper in Docker - - one pulsar-verifier sidecar per validator + - optionally, one pulsar-verifier sidecar per validator - the requested number of Pulsar validators in Docker Destructive behavior: @@ -73,6 +74,8 @@ Optional environment variables: PULSAR_VERIFIER_IMAGE built image name (default: pulsar-verifier:lightnet) PULSAR_VERIFIER_CACHE_ROOT automatic source cache (default: .cache/pulsar-verifier) + ENABLE_VERIFIER_SIDECARS set to 1 to build and start verifier sidecars + (default: 0, chain-only deployment) PULSAR_DOCKER_PROJECT Compose project (default: pulsar-testnet-N) PULSAR_DOCKER_STATE_ROOT generated state root (default: .docker) PULSAR_DOCKER_IMAGE Pulsar image name (default derived from N) @@ -321,6 +324,10 @@ validate_positive_int "validator startup timeout" "$VALIDATOR_STARTUP_TIMEOUT" validate_positive_int "bridge confirmation depth" "$BRIDGE_CONFIRMATION_DEPTH" validate_positive_int "bridge start block height" "$BRIDGE_START_BLOCK_HEIGHT" validate_positive_int "bridge max block range" "$BRIDGE_MAX_BLOCK_RANGE" +if [[ "$ENABLE_VERIFIER_SIDECARS" != "0" && "$ENABLE_VERIFIER_SIDECARS" != "1" ]]; then + echo "ENABLE_VERIFIER_SIDECARS must be 0 or 1" >&2 + exit 1 +fi case "$DOCKER_PLATFORM" in linux/arm64 | linux/amd64) ;; @@ -357,31 +364,33 @@ fi WRAPPER_SOURCE="$(cd -- "$WRAPPER_SOURCE" && pwd)" git -C "$WRAPPER_SOURCE" cat-file -e "${WRAPPER_SHA}^{commit}" -if [[ -z "$VERIFIER_SOURCE" ]]; then - VERIFIER_CACHE_ROOT="$(python3 -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' "$VERIFIER_CACHE_ROOT")" - VERIFIER_SOURCE="$VERIFIER_CACHE_ROOT/$VERIFIER_SHA" - if [[ ! -d "$VERIFIER_SOURCE/.git" ]]; then - if [[ -e "$VERIFIER_SOURCE" && ! -d "$VERIFIER_SOURCE" ]]; then - echo "refusing invalid pulsar-verifier cache path: $VERIFIER_SOURCE" >&2 - exit 1 +if [[ "$ENABLE_VERIFIER_SIDECARS" == "1" ]]; then + if [[ -z "$VERIFIER_SOURCE" ]]; then + VERIFIER_CACHE_ROOT="$(python3 -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' "$VERIFIER_CACHE_ROOT")" + VERIFIER_SOURCE="$VERIFIER_CACHE_ROOT/$VERIFIER_SHA" + if [[ ! -d "$VERIFIER_SOURCE/.git" ]]; then + if [[ -e "$VERIFIER_SOURCE" && ! -d "$VERIFIER_SOURCE" ]]; then + echo "refusing invalid pulsar-verifier cache path: $VERIFIER_SOURCE" >&2 + exit 1 + fi + mkdir -p "$VERIFIER_SOURCE" + git -C "$VERIFIER_SOURCE" init --quiet fi - mkdir -p "$VERIFIER_SOURCE" - git -C "$VERIFIER_SOURCE" init --quiet - fi - if ! git -C "$VERIFIER_SOURCE" cat-file -e "${VERIFIER_SHA}^{commit}" 2>/dev/null; then - echo "==> Downloading pinned pulsar-verifier source" - git -C "$VERIFIER_SOURCE" fetch --depth 1 "$VERIFIER_REPOSITORY" "$VERIFIER_SHA" + if ! git -C "$VERIFIER_SOURCE" cat-file -e "${VERIFIER_SHA}^{commit}" 2>/dev/null; then + echo "==> Downloading pinned pulsar-verifier source" + git -C "$VERIFIER_SOURCE" fetch --depth 1 "$VERIFIER_REPOSITORY" "$VERIFIER_SHA" + fi + elif [[ ! -d "$VERIFIER_SOURCE/.git" ]]; then + echo "pulsar-verifier checkout not found at: $VERIFIER_SOURCE" >&2 + exit 1 fi -elif [[ ! -d "$VERIFIER_SOURCE/.git" ]]; then - echo "pulsar-verifier checkout not found at: $VERIFIER_SOURCE" >&2 - exit 1 + VERIFIER_SOURCE="$(cd -- "$VERIFIER_SOURCE" && pwd)" + git -C "$VERIFIER_SOURCE" cat-file -e "${VERIFIER_SHA}^{commit}" fi -VERIFIER_SOURCE="$(cd -- "$VERIFIER_SOURCE" && pwd)" -git -C "$VERIFIER_SOURCE" cat-file -e "${VERIFIER_SHA}^{commit}" detect_running_lightnet -echo "==> 1/6 Removing previous Pulsar, archive-wrapper, and verifier state" +echo "==> 1/6 Removing previous Pulsar and archive-wrapper state" if (( REUSE_LIGHTNET == 1 )); then echo " preserving running owned Lightnet container: $LIGHTNET_CONTAINER" else @@ -432,13 +441,19 @@ git -C "$WRAPPER_SOURCE" archive "$WRAPPER_SHA" | -t "$WRAPPER_IMAGE" \ - -echo "==> 5/6 Building the pulsar-verifier image" -git -C "$VERIFIER_SOURCE" archive "$VERIFIER_SHA" | - docker buildx build \ - --load \ - --platform linux/amd64 \ - -t "$VERIFIER_IMAGE" \ - - +if [[ "$ENABLE_VERIFIER_SIDECARS" == "1" ]]; then + echo "==> 5/6 Building the pulsar-verifier image" + # TODO: Build the verifier for DOCKER_PLATFORM when a pinned + # Barretenberg arm64 artifact is available; it currently requires amd64. + git -C "$VERIFIER_SOURCE" archive "$VERIFIER_SHA" | + docker buildx build \ + --load \ + --platform linux/amd64 \ + -t "$VERIFIER_IMAGE" \ + - +else + echo "==> 5/6 Verifier sidecars disabled" +fi PG_USER="$(docker exec "$LIGHTNET_CONTAINER" printenv POSTGRES_USER)" PG_PASSWORD="$(docker exec "$LIGHTNET_CONTAINER" printenv POSTGRES_PASSWORD)" @@ -458,7 +473,11 @@ export ARCHIVE_WRAPPER_MODE="shared" export ARCHIVE_WRAPPER_IMAGE="$WRAPPER_IMAGE" export ARCHIVE_WRAPPER_ADD_HOST_GATEWAY=1 export PULSAR_DOCKER_IMAGE="$PULSAR_IMAGE" -export PULSAR_VERIFIER_IMAGE="$VERIFIER_IMAGE" +if [[ "$ENABLE_VERIFIER_SIDECARS" == "1" ]]; then + export PULSAR_VERIFIER_IMAGE="$VERIFIER_IMAGE" +else + unset PULSAR_VERIFIER_IMAGE +fi export PULSAR_DOCKER_PROJECT="$PROJECT_NAME" export PULSAR_DOCKER_STATE_ROOT="$STATE_ROOT" export PULSAR_BIND_HOST="127.0.0.1" @@ -468,7 +487,11 @@ export BRIDGE_START_BLOCK_HEIGHT export BRIDGE_MAX_BLOCK_RANGE export VALIDATOR_STARTUP_TIMEOUT -echo "==> 6/6 Starting Pulsar with $VALIDATOR_COUNT validators and verifier sidecars" +if [[ "$ENABLE_VERIFIER_SIDECARS" == "1" ]]; then + echo "==> 6/6 Starting Pulsar with $VALIDATOR_COUNT validators and verifier sidecars" +else + echo "==> 6/6 Starting Pulsar with $VALIDATOR_COUNT validators" +fi "$SCRIPT_DIR/docker_testnet.sh" up "$VALIDATOR_COUNT" for ((index = 1; index <= VALIDATOR_COUNT; index++)); do diff --git a/scripts/test_deploy_local_lightnet.py b/scripts/test_deploy_local_lightnet.py index e1db55bb..71d7e8a9 100644 --- a/scripts/test_deploy_local_lightnet.py +++ b/scripts/test_deploy_local_lightnet.py @@ -191,6 +191,7 @@ def setUp(self): "BRIDGE_MAX_BLOCK_RANGE", "BRIDGE_START_BLOCK_HEIGHT", "DOCKER_PLATFORM", + "ENABLE_VERIFIER_SIDECARS", "LIGHTNET_CONTAINER", "LIGHTNET_IMAGE", "LIGHTNET_POSTGRES_PORT", @@ -277,6 +278,7 @@ def test_help_documents_cleanup_options_and_lifecycle_guide(self): "LIGHTNET_IMAGE", "LIGHTNET_READY_HEIGHT", "PULSAR_DOCKER_STATE_ROOT", + "ENABLE_VERIFIER_SIDECARS", "PULSAR_DOCKER_IMAGE", "BRIDGE_CONFIRMATION_DEPTH", "docs/local-lightnet-deployment.md", @@ -286,6 +288,89 @@ def test_help_documents_cleanup_options_and_lifecycle_guide(self): self.assertEqual([], self.read_calls(self.docker_log)) self.assertEqual([], self.read_calls(self.git_log)) + def test_defaults_to_chain_only_without_verifier_work(self): + self.set_lightnet_state("running-owned") + + result = self.run_deploy() + + self.assertEqual(0, result.returncode, result.stderr) + self.assertIn("Verifier sidecars disabled", result.stdout) + self.assertFalse(self.verifier_cache_root.exists()) + self.assertFalse( + any("feedface" in " ".join(call) for call in self.read_calls(self.git_log)) + ) + self.assertFalse( + any( + "pulsar-verifier" in " ".join(call) + for call in self.read_calls(self.docker_log) + ) + ) + + compose = json.loads( + (self.state_root / self.project / "compose.json").read_text( + encoding="utf-8" + ) + ) + self.assertEqual( + "0", compose["services"]["setup"]["environment"]["ENABLE_VERIFIER_SIDECARS"] + ) + self.assertNotIn("verifier1", compose["services"]) + self.assertNotIn("verifier2", compose["services"]) + + def test_explicit_zero_ignores_an_inherited_verifier_image(self): + self.set_lightnet_state("running-owned") + + result = self.run_deploy( + ENABLE_VERIFIER_SIDECARS="0", + PULSAR_VERIFIER_IMAGE="inherited-verifier:test", + ) + + self.assertEqual(0, result.returncode, result.stderr) + self.assertFalse( + any( + "inherited-verifier:test" in " ".join(call) + for call in self.read_calls(self.docker_log) + ) + ) + compose = json.loads( + (self.state_root / self.project / "compose.json").read_text( + encoding="utf-8" + ) + ) + self.assertEqual( + "0", compose["services"]["setup"]["environment"]["ENABLE_VERIFIER_SIDECARS"] + ) + self.assertNotIn("verifier1", compose["services"]) + self.assertNotIn("verifier2", compose["services"]) + + def test_explicit_opt_in_builds_and_starts_verifier_sidecars(self): + self.set_lightnet_state("running-owned") + + result = self.run_deploy(ENABLE_VERIFIER_SIDECARS="1") + + self.assertEqual(0, result.returncode, result.stderr) + self.assertIn("Building the pulsar-verifier image", result.stdout) + self.assertTrue( + (self.verifier_cache_root / "feedface" / ".git" / "fetched").exists() + ) + self.assertTrue( + any( + "pulsar-verifier:lightnet" in " ".join(call) + for call in self.read_calls(self.docker_log) + ) + ) + + compose = json.loads( + (self.state_root / self.project / "compose.json").read_text( + encoding="utf-8" + ) + ) + self.assertEqual( + "1", compose["services"]["setup"]["environment"]["ENABLE_VERIFIER_SIDECARS"] + ) + self.assertIn("verifier1", compose["services"]) + self.assertIn("verifier2", compose["services"]) + def test_cleans_only_selected_project_and_reuses_owned_running_lightnet(self): _, selected_sentinel = self.create_owned_project(self.project) unrelated_root, unrelated_sentinel = self.create_owned_project( @@ -393,6 +478,7 @@ def test_invalid_runtime_overrides_are_rejected_before_cleanup(self): ("BRIDGE_CONFIRMATION_DEPTH", "0", "positive integer"), ("BRIDGE_START_BLOCK_HEIGHT", "0", "positive integer"), ("BRIDGE_MAX_BLOCK_RANGE", "0", "positive integer"), + ("ENABLE_VERIFIER_SIDECARS", "yes", "must be 0 or 1"), ("DOCKER_PLATFORM", "linux/s390x", "Docker platform"), )